0
Commit Graph

8485 Commits

Author SHA1 Message Date
64ce9d05be Take out ResourceBundle initialization from ContentTestSuite. This isn't needed right now, and it's causing issues on ChromeOS heapcheck bot.
Review URL: https://codereview.chromium.org/11092089

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@161467 0039d316-1c4b-4281-b951-d872f2087c98
2012-10-12 01:12:19 +00:00
f5eabc375b Use blocking worker pool for sync file operations in Pepper.
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
2012-10-12 00:33:55 +00:00
5d5e26adfa touch: Cleanup touch-event mode switching on windows.
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
2012-10-12 00:20:56 +00:00
972cdd84b7 browser-plugin: Allow accepting drag-n-drop events.
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
2012-10-12 00:19:03 +00:00
2a1706cb7c Update webrtc to 2918 and libjingle to 203.
TEST=apprtc.appspot.com and chrome/test/functional/webrtc_call.py

Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=160781
Review URL: https://codereview.chromium.org/11066063

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@161450 0039d316-1c4b-4281-b951-d872f2087c98
2012-10-11 23:57:04 +00:00
cbd76ebec7 Move shared library copy and strip to java_apk.gypi
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
2012-10-11 23:23:49 +00:00
f11d79c7c2 [content shell] remove spurious printf format
BUG=111316
TEST=pixel tests that pass actually pass

Review URL: https://codereview.chromium.org/11085091

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@161416 0039d316-1c4b-4281-b951-d872f2087c98
2012-10-11 21:53:44 +00:00
95af087dc0 Implicit coversion operators from integer geometry types to floating point.
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
2012-10-11 21:52:22 +00:00
81289ac3e1 Browser Plugin: Implement CanGoBack/CanGoForward
BUG=154831


Review URL: https://chromiumcodereview.appspot.com/11092023

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@161414 0039d316-1c4b-4281-b951-d872f2087c98
2012-10-11 21:50:06 +00:00
ba42ac4fc3 Enable WebMediaPlayerMS only when ENABLE_WEBRTC is defined.
Some platforms have gyp define enable_webrt=0.

BUG=142988
Review URL: https://codereview.chromium.org/11066123

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@161392 0039d316-1c4b-4281-b951-d872f2087c98
2012-10-11 20:28:14 +00:00
572a6ca8cc Cleanup RenderViewImpl override methods from WebKit
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
2012-10-11 19:38:01 +00:00
7758b734b7 Upstream latest DownloadController changes for android.
Review URL: https://codereview.chromium.org/11103040

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@161378 0039d316-1c4b-4281-b951-d872f2087c98
2012-10-11 18:51:46 +00:00
43b0600f98 Upstream deviceScaleFactor initialization in render_view_impl
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
2012-10-11 17:13:26 +00:00
a34087bd0f Build browser_main_loop.cc on iOS.
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
2012-10-11 17:05:30 +00:00
45df03fa72 Reland r161256: Fix the crash that was happening on the buildbot (but not trybots, for a strange reason) because ResourceBundle was initialized twice for tests that use the RenderViewTest harness.
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
2012-10-11 16:50:05 +00:00
951a6483b7 This change is motivated by the need to implement the Android WebView.loadDataWithBaseURL API[1], which allows access to local file:// resources (depending on AwSettings.getAllowFileAccess) as long as the base URL provided is not "data:".
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
2012-10-11 16:26:37 +00:00
3a74304c6b Show selection handles around selected text.
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
2012-10-11 16:19:04 +00:00
8771512b6e [content shell] Add layout test specific font setup (for linux only right now)
BUG=111316
TEST=css1/basic/comments.html passes
TBR=jam

Review URL: https://codereview.chromium.org/11093068

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@161351 0039d316-1c4b-4281-b951-d872f2087c98
2012-10-11 15:53:06 +00:00
452e50c1e8 [content shell] remove dead code (disabling ssl certificate checks for layout tests)
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
2012-10-11 13:31:04 +00:00
64699b7fb1 Ifdef out the parts of navigation_controller.h that are not supported on iOS.
Review URL: https://chromiumcodereview.appspot.com/11092005

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@161329 0039d316-1c4b-4281-b951-d872f2087c98
2012-10-11 11:54:44 +00:00
1d2c3afe6d BrowserTestBase::CreateTestServer should accept FilePath
BUG=none
TEST=browser_tests, content_browsertests


Review URL: https://chromiumcodereview.appspot.com/11094040

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@161318 0039d316-1c4b-4281-b951-d872f2087c98
2012-10-11 08:56:10 +00:00
c75a4dc8dd Converted GetOriginsForHostTask to use base::PostTaskAndReply(). Deleted superclasses GetOriginsTaskBase, HelperTask. Also deleted QuotaTaskThread class as nothing references that anymore.
BUG=139270


Review URL: https://chromiumcodereview.appspot.com/11091042

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@161307 0039d316-1c4b-4281-b951-d872f2087c98
2012-10-11 06:49:47 +00:00
bedfbd7f55 Removing webkit diff with Android tree
Removes some :: global namespace scoping and updates comments.

BUG=


Review URL: https://chromiumcodereview.appspot.com/11098054

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@161276 0039d316-1c4b-4281-b951-d872f2087c98
2012-10-11 03:11:09 +00:00
c422db02d3 Revert 161256 - Fix the crash that was happening on the buildbot (but not trybots, for a strange reason) because ResourceBundle was initialized twice for tests that use the RenderViewTest harness.
Review URL: https://codereview.chromium.org/11090061

TBR=jam@chromium.org
Review URL: https://codereview.chromium.org/11103025

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@161275 0039d316-1c4b-4281-b951-d872f2087c98
2012-10-11 03:04:29 +00:00
5b1e074e18 [Android] Upstreaming CommandLine.java diff
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
2012-10-11 02:07:27 +00:00
d305da0cd8 Fix print settings units conversion for PPB_Printing.
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
2012-10-11 02:07:03 +00:00
ae526e5d4d Fix the crash that was happening on the buildbot (but not trybots, for a strange reason) because ResourceBundle was initialized twice for tests that use the RenderViewTest harness.
Review URL: https://codereview.chromium.org/11090061

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@161256 0039d316-1c4b-4281-b951-d872f2087c98
2012-10-11 01:17:56 +00:00
529be50db1 Revert: Flapper field trial to use workerpool for sync file operations.
Original: https://chromiumcodereview.appspot.com/11016016

The field trial indicated a 20% improvement using blocking workerpool.
That seems worth merging to M-23.  Revert the change so that a clean
change can be landed and drover'ed over.

BUG=153383
TBR=yzshen@chromium.org

Review URL: https://codereview.chromium.org/11087068

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@161253 0039d316-1c4b-4281-b951-d872f2087c98
2012-10-11 01:11:49 +00:00
b45cd35e68 Rename output jar created by apks to have chromium_apk_ prefix.
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
2012-10-11 00:07:20 +00:00
161232dcc3 Remove unused stuff from ContentViewClient
Also removing a diff.

BUG=

Review URL: https://codereview.chromium.org/11028126

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@161233 0039d316-1c4b-4281-b951-d872f2087c98
2012-10-10 23:46:05 +00:00
1fba73c14c Tentatively turn on WebMediaPlayerMS by default.
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
2012-10-10 23:36:20 +00:00
cb5815dfc5 Expose getDefaultUserAgent to java
This is needed for webview

BUG=


Review URL: https://chromiumcodereview.appspot.com/11098036

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@161225 0039d316-1c4b-4281-b951-d872f2087c98
2012-10-10 23:02:45 +00:00
40627a7d1a Disable ResourceBundle change from 161202 while I figure out why it's failing on buildbot but not trybot. TBR=cpu
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@161222 0039d316-1c4b-4281-b951-d872f2087c98
2012-10-10 22:55:24 +00:00
57aece2bf8 Only register the newer one of {bundled, component} Pepper Flash.
BUG=151716


Review URL: https://chromiumcodereview.appspot.com/11090018

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@161210 0039d316-1c4b-4281-b951-d872f2087c98
2012-10-10 22:10:27 +00:00
a3261d04ba Plumb through surface size for --enable-partial-swaps on OSX
BUG=none
TEST=by hand with http://www.webkit.org/blog-files/3d-transforms/poster-circle.html and --enable-partial-swaps


Review URL: https://chromiumcodereview.appspot.com/11099037

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@161209 0039d316-1c4b-4281-b951-d872f2087c98
2012-10-10 22:04:20 +00:00
495d3f3bfd Fix a test which uses the RenderViewTest harness running in unit_test binaries. This gives an assert in WebKit in debug builds because WebKit is only supposed to be initialized once. The fix is to separate the test from the harness.
Review URL: https://codereview.chromium.org/11066098

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@161202 0039d316-1c4b-4281-b951-d872f2087c98
2012-10-10 21:48:56 +00:00
5e402fdb19 Shift EnsureNoPendingDownloads() implementation into tests.
R=benjhayden@chromium.org


Review URL: https://chromiumcodereview.appspot.com/11050003

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@161184 0039d316-1c4b-4281-b951-d872f2087c98
2012-10-10 20:42:00 +00:00
3b798343ad Introduce PlatformBitmap, which is a minimal helper class that wraps an SkBitmap
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
2012-10-10 19:57:15 +00:00
b27ccd4d94 Browser Plugin: When Guest crashes Embedder crashes in content shell
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
2012-10-10 19:53:00 +00:00
04d3f9a1d1 Blacklist video and flash acceleration on NVIDIA Linux drivers.
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
2012-10-10 19:23:49 +00:00
195d1eb7a0 [Android] Restore the previous behaviour of TouchCommon.
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
2012-10-10 19:16:45 +00:00
538941221f <browser> Disable browser plugin in content_shell by default.
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
2012-10-10 19:03:41 +00:00
0737ea62f7 Add UMA counter for hung renderers on cross-site navigation.
BUG=104346


Review URL: https://chromiumcodereview.appspot.com/10907182

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@161141 0039d316-1c4b-4281-b951-d872f2087c98
2012-10-10 19:01:58 +00:00
eb040998b0 DevTools: [remote debugging] introduce json/new and json/close for creating and closing the tabs.
Review URL: https://chromiumcodereview.appspot.com/11033046

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@161126 0039d316-1c4b-4281-b951-d872f2087c98
2012-10-10 16:56:00 +00:00
31455d23b9 Browser Plugin: Fix Events
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
2012-10-10 16:33:47 +00:00
9b57401b4b Implement AwContentsClient and remove dependency on chrome/
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
2012-10-10 16:01:47 +00:00
354ba46913 [Android] Upstream WebView.allow{Content|File}Access implementation.
R=benm@chromium.org,joth@chromium.org
BUG=153516


Review URL: https://chromiumcodereview.appspot.com/11090003

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@161103 0039d316-1c4b-4281-b951-d872f2087c98
2012-10-10 12:41:41 +00:00
1052ff3757 Fix comments per Avi's request.
TBR=avi@chromium.org
BUG=none


Review URL: https://chromiumcodereview.appspot.com/11087049

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@161102 0039d316-1c4b-4281-b951-d872f2087c98
2012-10-10 12:41:03 +00:00
58b7e70ddc [Android] Upstream content detection and ChromeBrowserProvider tests.
BUG=125390,138755

Review URL: https://codereview.chromium.org/11085008

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@161101 0039d316-1c4b-4281-b951-d872f2087c98
2012-10-10 12:38:27 +00:00
481e370e60 Remove NOTIMPLEMENTED in shell_web_contents_view_delegate to avoid log spew.
BUG=154251
TEST=


Review URL: https://chromiumcodereview.appspot.com/11087003

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@161093 0039d316-1c4b-4281-b951-d872f2087c98
2012-10-10 12:28:45 +00:00