summaryrefslogtreecommitdiffstats
path: root/content/browser/browser_plugin/browser_plugin_guest_helper.cc
Commit message (Collapse)AuthorAgeFilesLines
* Remove BrowserPluginGuestHelper since it's not needed. BrowserPluginGuest ↵jam@chromium.org2013-10-241-55/+0
| | | | | | | | | | | | | already swallowed the IPCs that it dispatched. For the two that weren't dispatched but were swallowed by BrowserPluginGuestHelper, we can use empty IPC_MESSAGE_HANDLER_GENERIC statements. This also removes duplication of the list of handled IPCs. This is part of the work in removing RenderViewHostObserver. BUG=306569 R=fsamuel@chromium.org Review URL: https://codereview.chromium.org/35853003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@230729 0039d316-1c4b-4281-b951-d872f2087c98
* Fixed drag and drop into and out of Browser Plugin.mthiesse@chromium.org2013-05-031-1/+2
| | | | | | | | | | | | | | | | | | | | | | Only works when the --enable-browser-plugin-compositing flag is used, which causes web_contents_view_guest to be used. How the flow works: When a drag event is initiated on the web page, the BrowserPluginGuest receives an DragHostMsg_StartDragging IPC, and keeps track of that fact that it has initiated a drag event, but doesn't handle the IPC. The IPC is then passed down the chain (not sure by who) and eventually calls WebContentsViewGuest::StartDragging. WebContentsViewGuest::StartDragging calls the platform dependent WebContentsView of the embedder and starts the OS drag event. Now, we get updates on the drag event from 2 places, BrowserPlugin::handleDragStatusUpdate, and RenderViewImpl::OnDragTargetDragOver of the embedder process. BrowserPlugin::handleDragStatusUpdate goes through the guest to call RenderViewHostImpl::DragTargetDragOver on the guest process (but only when the mouse is hovering over the guest) RenderViewImpl::OnDragTargetDragOver also calls RenderViewHostImpl::DragTargetDragOver but on the embedder process, and it always calls the function, whether or not the mouse is over the guest. For that reason, we keep track of if the mouse if over the guest, and use the embedder to capture and ignore the DragTargetDragOver message on the embedder process when the mouse is over the guest (or we get a flickering mouse). Now, when the mouse is released, the native drag_host calls RenderViewImpl::OnDragSourceSystemDragEnded, which in turn calls webview()->dragSourceSystemDragEnded(); on the embedder process. However, the guest process webview() is not informed that the drag has ended, so it still blocks user input. So we send a new IPC, DragHostMsg_DragStopped to the embedder to let it inform the guest, who in turn informs the guest webview, that the drag has ended. BUG= 161112 Review URL: https://chromiumcodereview.appspot.com/12086095 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@198119 0039d316-1c4b-4281-b951-d872f2087c98
* Browser Plugin: Added gesture recognizer per guest RenderView.fsamuel@chromium.org2013-03-241-1/+0
| | | | | | | | | | Each BrowserPlugin gets its own gesture recognizer in RenderWidgetHostViewGuest. BUG=181313 Review URL: https://chromiumcodereview.appspot.com/12792012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@190173 0039d316-1c4b-4281-b951-d872f2087c98
* Implemented PointerLock for BrowserPlugin by forwarding PointerLock requests ↵mthiesse@chromium.org2013-03-051-0/+2
| | | | | | | | | | | | | to the embedder, and routing responses back to the guest (essentially). Added interactive tests for pointerlock that work on Windows and Linux. Manually tested and working on Mac, but mouse movements in test don't seem to work on mac. BUG=166228 Review URL: https://chromiumcodereview.appspot.com/12047125 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@186068 0039d316-1c4b-4281-b951-d872f2087c98
* <webview>: Add name attributefsamuel@chromium.org2013-01-091-0/+1
| | | | | | | | | | | | | This change requires this WebKit patch: https://bugs.webkit.org/show_bug.cgi?id=104404 This change enables access to the guest's window's name attribute from the embedder <webview>. It also enables changes to the window name attribute from the embedder WebContents. BUG=140316 Test=BrowserPluginHostTest.ChangeWindowName Review URL: https://codereview.chromium.org/11554030 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@175681 0039d316-1c4b-4281-b951-d872f2087c98
* Browser Plugin: Simplify BrowserPluginGuestHelperfsamuel@chromium.org2012-12-181-59/+22
| | | | | | | | | | | | | | | | | | | | | | | Since BrowserPlugin was first implemented, support for cross-process navigation was dropped but BrowserPlugin*Helper classes maintain a lot of complexity that was no longer necessary. This CL attempts to reduce some of this complexity by simplifying BrowserPluginGuestHelper. It is only needed now to intercept ViewHostMsg_* before arriving to RenderViewHost. It is still a separate class because RenderViewHostObserver's lifetime is managed by RenderViewHost and BrowserPluginGuest's lifetime is managed by WebContentsImpl. This refactor/simplification is a prerequisite to introducing a BrowserPluginGuestObserver class. Further changes will come in a subsequent CL to simplify the message routing from BrowserPluginEmbedderHelper --> BrowserPluginEmbedder --> BrowserPluginGuest BUG=166165 Test=BrowserPluginHostTest.* Review URL: https://codereview.chromium.org/11606005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@173804 0039d316-1c4b-4281-b951-d872f2087c98
* Browser Plugin: Fix <select> popup positioning on Macfsamuel@chromium.org2012-12-121-0/+13
| | | | | | | | | | BUG=165204 Test=Manually Review URL: https://chromiumcodereview.appspot.com/11488017 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@172489 0039d316-1c4b-4281-b951-d872f2087c98
* Change the InputEventAck codepath to use a tri-state-enum instead of a booleanyusufo@chromium.org2012-11-301-2/+3
| | | | | | | | | | | | | Right now whenever an input event ACK is sent back to render_widget_host_impl we do not distinguish between events that are returned because they didn't hit any touch event handlers vs events not handled by touch event handler when there is a hit. This change adds a tri-state enum to the IPC message that will be used to distinguish NotProcessed touch events from Returned touch events. BUG=135818 Review URL: https://chromiumcodereview.appspot.com/11363133 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@170304 0039d316-1c4b-4281-b951-d872f2087c98
* browser-plugin: Allow accepting drag-n-drop events.sadrul@chromium.org2012-10-121-0/+7
| | | | | | | | | | | 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
* browser-plugin: Correctly notify the embedder when the guest starts/stops ↵sadrul@chromium.org2012-09-281-0/+6
| | | | | | | | | | | | | | | | listening for touch-events. 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 is followup from Charlie's comments on Fady's cl: ↵lazyboy@chromium.org2012-09-201-0/+62
| | | | | | | | | | | | | | | | | | | | http://chromiumcodereview.appspot.com/10560022, it seems I cannot upload patch to that issue (since I'm not owner), I'm creating a new one. 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 Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=157773 NOTRY=true Review URL: https://chromiumcodereview.appspot.com/10868012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@157808 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 157773 - This is followup from Charlie's comments on Fady's cl: ↵zea@chromium.org2012-09-201-62/+0
| | | | | | | | | | | | | | | | | | | | | http://chromiumcodereview.appspot.com/10560022, it seems I cannot upload patch to that issue (since I'm not owner), I'm creating a new one. NavigateGuest is flaky on windows (crashes at shutdown) 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 TBR=lazyboy@chromium.org Review URL: https://codereview.chromium.org/10968015 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@157801 0039d316-1c4b-4281-b951-d872f2087c98
* This is followup from Charlie's comments on Fady's cl: ↵lazyboy@chromium.org2012-09-201-0/+62
| | | | | | | | | | | | | | | | http://chromiumcodereview.appspot.com/10560022, it seems I cannot upload patch to that issue (since I'm not owner), I'm creating a new one. 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
* Revert 157650 - This is followup from Charlie's comments on Fady's cl: ↵zea@chromium.org2012-09-191-62/+0
| | | | | | | | | | | | | | | | | | | http://chromiumcodereview.appspot.com/10560022, it seems I cannot upload patch to that issue (since I'm not owner), I'm creating a new one. 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/10868012 TBR=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
* This is followup from Charlie's comments on Fady's cl: ↵lazyboy@chromium.org2012-09-191-0/+62
http://chromiumcodereview.appspot.com/10560022, it seems I cannot upload patch to that issue (since I'm not owner), I'm creating a new one. 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