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
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
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
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
When scaling an integer point or size, return a floating point
result. Implicitly flooring hides design problems and bugs. Add
conversion functions to floor or ceil a SizeF or PointF
into an integer format again.
All existing behaviour has been preserved by replacing uses of
foo.Scale() with ToFlooredFoo(foo.Scale()).
R=sky
BUG=147395
Review URL: https://chromiumcodereview.appspot.com/11081007
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@160970 0039d316-1c4b-4281-b951-d872f2087c98
Old implementation will be togglable by a flag kEnableBrowserPluginOldImplementation.
There are two js shims to create shadow DOM for two implementations, since we need to handle src differently in new path.
This would also fix src attribute setting behavior in apps for the new path.
Pending
1. Write tests to verify set src attribute fix for apps in new implementation path.
BUG=153629,142379
TESTED=BrowserTest tests pending. Checked with platform app: a. set src initially. b. set src later via js using element.src c. set src later via js using elem.setAttribute('src', ...)
Review URL: https://chromiumcodereview.appspot.com/11052019
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@160225 0039d316-1c4b-4281-b951-d872f2087c98
This doesn't actually do much more checking of the permissions, but it should wire it up everywhere we'll need it. It will also at least only return public interfaces via GetInterface in the proxy now unless other bits are supplied.
Review URL: https://codereview.chromium.org/10984094
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@159729 0039d316-1c4b-4281-b951-d872f2087c98
This would fix guest painting in: set no src + resize + navigate to src case.
Without this change, for the scenario above, we don't get any dib at all from
embedder upon setting the non-empty src. Now we also ship dib on NavigateGuest
if necessary. This dib is the last accumulated dib from updateGeometry().
Note that our unit test exercises this case, but doesn't look for correct
painting, it only expects UpdateRect to be called with correct size. I've updated the test now to look for correct sized damage buffer instead.
BUG=151948
TEST= Create an empty src guest and keep changing its size in
SetInterval from the embedder, then in the middle set a non-empty src. Observed
that guest paints correctly with final size. Updated unit test to look for damage buffer with correct size instead of looking for UpdateRect with correct size.
Review URL: https://chromiumcodereview.appspot.com/10965048
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@159404 0039d316-1c4b-4281-b951-d872f2087c98
The browser (RenderWidgetHost) does not send touch-events to the renderer unless
there are touch-event handlers on the page. So, if a guest in a browser-plugin has
touch-event handlers (or stops having touch handlers), then it needs to notify the
embedder, so that the embedder can in turn notify the browser whether to send
touch-events to the embedder or not.
BUG=152494
Review URL: https://codereview.chromium.org/10996023
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@159285 0039d316-1c4b-4281-b951-d872f2087c98
This mainly affects bits of code using the old Rect Rect::Scale(float) function. There are, thankfully, not too many. I've replaced this legacy function with Rect Rect::ScaleUnsafe(float) and when this lands, I will open a bug for switching from ScaleUnsafe to a Scale followed by a ToEnclosedRect or ToEnclosingRect.
BUG=152596
Review URL: https://chromiumcodereview.appspot.com/10996037
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@159256 0039d316-1c4b-4281-b951-d872f2087c98
Cleanup no longer requires knowledge of the parent frame of the
BrowserPlugin and so we no longer need any references to the frame_id.
This patch cleans up cruft left over from old cleanup code.
BUG=none
Review URL: https://chromiumcodereview.appspot.com/10982068
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@159123 0039d316-1c4b-4281-b951-d872f2087c98
When we commit a navigation, we forward the RenderProcessHost ID to the Browser Plugin in the embedder so that
we can query it via getProcessId()
BUG=151212
Review URL: https://codereview.chromium.org/10965017
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@157994 0039d316-1c4b-4281-b951-d872f2087c98
Fairly simple change. Just a whole lot of plumbing to call the following:
void BrowserPluginGuest::Stop() {
web_contents()->Stop();
}
void BrowserPluginGuest::Reload() {
web_contents()->GetController().Reload(false);
}
This includes the parsing the methods in browser_plugin_bindings.cc, the IPCs in browser_plugin.cc, the plumbing to the embedder and from the embedder to the appropriate guest.
This also includes tests to verify that these two operations do indeed get plumbed correctly.
BUG=148981
Review URL: https://codereview.chromium.org/10917225
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@157988 0039d316-1c4b-4281-b951-d872f2087c98
Split Embedder and Guest 'roles' for browser plugin, web contents can now play any or both roles, main idea is to have more readable separation between the two.
Also stop creating browser_plugin counterpart in browser/host for every web_contents, instead create them only when there's a browser_plugin element.
BUG= 141232
Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=157650
Review URL: https://chromiumcodereview.appspot.com/10868012
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@157773 0039d316-1c4b-4281-b951-d872f2087c98
Introduced too many static initializers - broke linux sizes.
Split Embedder and Guest 'roles' for browser plugin, web contents can now play any or both roles, main idea is to have more readable separation between the two.
Also stop creating browser_plugin counterpart in browser/host for every web_contents, instead create them only when there's a browser_plugin element.
BUG= 141232
Review URL: https://chromiumcodereview.appspot.com/10868012TBR=lazyboy@chromium.org
Review URL: https://codereview.chromium.org/10946044
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@157656 0039d316-1c4b-4281-b951-d872f2087c98
Split Embedder and Guest 'roles' for browser plugin, web contents can now play any or both roles, main idea is to have more readable separation between the two.
Also stop creating browser_plugin counterpart in browser/host for every web_contents, instead create them only when there's a browser_plugin element.
BUG= 141232
Review URL: https://chromiumcodereview.appspot.com/10868012
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@157650 0039d316-1c4b-4281-b951-d872f2087c98
Some builds don't like two files in a project with the same name.
This addresses the issue.
BUG=140306
Review URL: https://chromiumcodereview.appspot.com/10830204
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@150498 0039d316-1c4b-4281-b951-d872f2087c98
Move the existing implementation of the browser plugin to the content::old
to avoid class name collisions with the new version currently being upstreamed.
BUG=140306
Review URL: https://chromiumcodereview.appspot.com/10829219
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@150387 0039d316-1c4b-4281-b951-d872f2087c98
The upcoming rewrite of the browser plugin has colliding names for IPC messages.
Rename existing messages to Old in preparation for the new implementation.
BUG=none
Review URL: https://chromiumcodereview.appspot.com/10829074
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@149116 0039d316-1c4b-4281-b951-d872f2087c98
With this CL: if the GPU process crashes we will probably get the correct URL whether the crash occurred during off or onscreen context command processing.
If we still see blank URLs, more work can be done on the webkit side to report offscreen context URLs via webkitplatformsupport.
BUG=131466
Review URL: https://chromiumcodereview.appspot.com/10695133
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@146488 0039d316-1c4b-4281-b951-d872f2087c98
Now I see that all browser_plugin/* files are moved to browser_plugin/old/* dir, I'll adjust the change if this patch seems reasonable.
BUG=133517
TEST=Gtk,without force compositing on all pages flag, can see guests being rendered with this patch. Also checked if regular pages (no browser plugin and not supposed to have h/w accelerating) correctly has acceleratedRendering set to false.
Review URL: https://chromiumcodereview.appspot.com/10581034
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@143222 0039d316-1c4b-4281-b951-d872f2087c98
A new implementation is coming but this current implementation is still in use.
Moving the current implementation to old directories to make it easy to get rid
of once the new implementation has been upstreamed.
BUG=none
TEST=manually, browser plugin continues to work.
Review URL: https://chromiumcodereview.appspot.com/10555029
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@142743 0039d316-1c4b-4281-b951-d872f2087c98