Switch from posting file operations on the file thread to posting them
on the blocking worker pool. Previous instrumentation indicated that
this reduces hung-plugin infobars by around 20%.
BUG=153383
Review URL: https://chromiumcodereview.appspot.com/11093059
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@161459 0039d316-1c4b-4281-b951-d872f2087c98
On windows, chrome used to switch between raw-touch and gesture modes depending on
whether the touch-start event was processed by the renderer or not. But now, the
switch happens iff touch-events is enabled (using command-line flag) on appropriate
version of windows. So cleanup the relevant code.
BUG=138153
TBR=avi@chromium.org (content/port/)
Review URL: https://codereview.chromium.org/11028144
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@161458 0039d316-1c4b-4281-b951-d872f2087c98
This allows dragging content from within the embedder (or other windows) into
the browser-tag plugin.
BUG=120264
Review URL: https://codereview.chromium.org/11088043
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@161457 0039d316-1c4b-4281-b951-d872f2087c98
Also, for each such shared library included in an apk, create a link in
the appropriate directory in <(android_product_out) to enable annotating
native stack traces for those apks.
BUG=
Review URL: https://chromiumcodereview.appspot.com/11096038
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@161440 0039d316-1c4b-4281-b951-d872f2087c98
This change allows you to call a function that expects a floating point
object with an integer object and have things just work. The addition
operator for Points is outside the Point classes so it can add/subtract integer
and float points together implicitly.
Tested to verify compilation with:
ui_unittests:RectTest.ToRectF
ui_unittests:SizeTest.ToSizeF
ui_unittests:PointTest.ToPointF
BUG=147395
R=sky@chromium.org
Review URL: https://chromiumcodereview.appspot.com/11028127
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@161415 0039d316-1c4b-4281-b951-d872f2087c98
createPluginReplacement and didCreateScriptContext is no longer
in WebKit::WebFrameClient or called anywhere else. Removing them.
numberOfWheelEventHandlersChanged and hasTouchEventHandlers are
overriding methods from WebKit::WebViewClient. Moving them up.
Review URL: https://chromiumcodereview.appspot.com/11094062
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@161384 0039d316-1c4b-4281-b951-d872f2087c98
This change makes sure deviceScalefactor is initialized consistently with the deviceInfo
value.
BUG=136745
Review URL: https://chromiumcodereview.appspot.com/11087067
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@161365 0039d316-1c4b-4281-b951-d872f2087c98
Adds browser_main_loop.cc to the build on iOS and ifdefs out the parts that are
not supported on iOS.
Review URL: https://chromiumcodereview.appspot.com/11087007
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@161362 0039d316-1c4b-4281-b951-d872f2087c98
The one difference is to check if ResourceBundle is initialized before initializing it. This is needed because on content_browsertests it's not initialized while in browser_tests it is. We can't make the two browser test binaries behave the same because of differences in how chrome's browser_tests and unit_tests can share the same test suite while in content that's not possible.
TBR=cpu
Review URL: https://codereview.chromium.org/11091058
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@161361 0039d316-1c4b-4281-b951-d872f2087c98
When AwSettings.getAllowFileAccess returns false, data URIs loaded with a non-data base URL should be able to access file:///android_asset and file:///android_res/, but not the wider filesystem.
We grant the WebView process access to file:// via ChildProcessSecurityPolicy (as WebView is single process we do this on process startup) and add a field to ViewMsg_NavigateParams that indicates if the URL being loaded should have access to local loads. This is bit is checked when the provisional load commits and if set, grants the SecurityOrigin access to local resources. The bit defaults to false and is only set in android_webview when AwContents loads a data URL with a non-data base URL, so there should be no behavior change outside of android_webview.
Once the SecurityOrigin allows local loads, code already present in android_webview controls whether the URL should be able to load either only android_asset and android_res or any file:// URL (see https://codereview.chromium.org/11090003/).
[1]
http://developer.android.com/reference/android/webkit/WebView.html#loadDataWithBaseURL(java.lang.String,
java.lang.String, java.lang.String, java.lang.String, java.lang.String)
BUG=152223
Review URL: https://codereview.chromium.org/10990056
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@161355 0039d316-1c4b-4281-b951-d872f2087c98
This patch upstreams code to display text selection handles in the Android
content shell. While in selection mode, we also display an action bar with
editing commands; I have stubbed this out because we don't yet have the
necessary resources (added a TODO for that).
BUG=138468
TEST=none
Review URL: https://chromiumcodereview.appspot.com/11068010
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@161353 0039d316-1c4b-4281-b951-d872f2087c98
This is now configured in the ShellURLRequestContext
BUG=111316
TEST=none
Review URL: https://chromiumcodereview.appspot.com/11093069
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@161337 0039d316-1c4b-4281-b951-d872f2087c98
Changes were made to this file downstream to attempt to fix flakyness with tests
using this class.
BUG=
Review URL: https://chromiumcodereview.appspot.com/11103016
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@161267 0039d316-1c4b-4281-b951-d872f2087c98
This fixes the conversion of print settings units ands adds some sanity checks
to the ppapi printing test.
BUG=none
TBR=brettw
Review URL: https://chromiumcodereview.appspot.com/11098034
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@161266 0039d316-1c4b-4281-b951-d872f2087c98
Output jar created by apks, currently have chromium_ prefix, this
prefix is also used by jar targets, to avoid name space collision
change the prefix from chromium to chromium_apk.
BUG=
Review URL: https://chromiumcodereview.appspot.com/11094015
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@161238 0039d316-1c4b-4281-b951-d872f2087c98
WebMediaPlayerMS can be disabled by using "--disable-web-media-player-ms"
Create a static function in MediaStreamImpl for checking whether a URL is media stream. This can save some overhead in render_view_impl.cc.
BUG=142988
Review URL: https://codereview.chromium.org/11066101
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@161230 0039d316-1c4b-4281-b951-d872f2087c98
and a PlatformSurface. This is used to replace the PlatformCanvas that was being
passed to BackingStore to return pixels.
The problem to solve is that PlatformCanvas is an extension of SkCanvas, and
SkCanvas is losing the ability to have its backend specified after its
constructor (for performance reasons).
The BackingStore interface only needs to return a copy of its pixels, and offer
a platform-specific way to draw into it (i.e. BitBlt). The PlatformSurface is
sufficient for this, so the larger infrastructure of PlatformCanvas/PlatformDevice
is not required.
Review URL: https://codereview.chromium.org/11031055
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@161163 0039d316-1c4b-4281-b951-d872f2087c98
content_shell does not have the sad plugin asset. On crash, we attempt to
paint the sad plugin asset without verifying whether or not it's available.
In this patch we do that check. If it is not available we paint black instead.
As a small added bonus, this patch introduces the small optimization of destroying
the backing store when the guest crashes because we have no need of it. Subsequent
navigations will request a new backing store anyway.
BUG=155059
Review URL: https://chromiumcodereview.appspot.com/11085044
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@161162 0039d316-1c4b-4281-b951-d872f2087c98
If you create a context when you are low memory, this context may get
into a bad state where geomerty is corrupted and the screen takes seconds
to paint. The context remains in this state until it is destroyed, even
if more memory comes available.
This disabled accelerated compositing to limit the exposure to this bug.
I plan to integrate this into M23. We shouldn't re-enable accelerated
compositing until we have a more robust workaround, or NVIDIA fixes the
context creation bug.
BUG=145600
Review URL: https://chromiumcodereview.appspot.com/11095006
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@161150 0039d316-1c4b-4281-b951-d872f2087c98
The changes introduced in the behaviour and construction of TouchCommon by https://codereview.chromium.org/11085008/ have busted many of our downstream tests. Revert to the old behaviour for now.
BUG=155083
Review URL: https://codereview.chromium.org/11090050
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@161146 0039d316-1c4b-4281-b951-d872f2087c98
This means I had to move the flag that forcefully enables browser plugin everywhere from chrome/ to content/.
Reasoning for the change:
Enabling browser plugin in regular pages (other than apps), breaks same origin policy: The embedder is allowed to inject javascript: URLs into the browser plugin, and it will soon be able to call executeScript. That means the embedder can do whatever it wants with the guest.
The concern is also true for content_shell, since anyone who embeds Chrome is facing a similar risk if they don't disable the browser plugin.
BUG=154360
TEST=Tested with content_shell, by default browser plugin doesn't load anymore. content_browsertests would also not run, made the change to enable them.
Ran Tests:
content_browsertests:BrowserPluginHostTest*
content_browsertests:BrowserPluginTest*
browser_tests:BrowserTag*
Review URL: https://chromiumcodereview.appspot.com/11035070
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@161142 0039d316-1c4b-4281-b951-d872f2087c98
This is a set of short-term fixes for BrowserPlugin events to address abarth@'s concerns.
1. Use frame's v8 context instead of creating a new one.
2. Use v8::Local<v8::Object> type for local handle to event objects.
3. Copy listener event listener vector before executing listeners to avoid referencing member variables in case one of the listeners deallocates the BrowserPlugin.
A longer term fix will involve exposing CustomEvent to the WebKit API and constructing
WebCustomEvents in browser_plugin.cc.
BUG=155044
TEST=BrowserPluginHostTest.*, BrowserPluginTest.* pass
Review URL: https://chromiumcodereview.appspot.com/11086025
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@161123 0039d316-1c4b-4281-b951-d872f2087c98
We are not depending on much functionality from ContentClient yet, so most
methods are either no-op, left unimplemented with a TODO, or copied straight
from the ChromeContentsClient implementation.
BUG=
Review URL: https://chromiumcodereview.appspot.com/11017024
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@161120 0039d316-1c4b-4281-b951-d872f2087c98