Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(151)

Side by Side Diff: content/renderer/browser_plugin/browser_plugin.cc

Issue 2396123002: Add IPC to notify BrowserPlugin when RenderProcess is ready. (Closed)
Patch Set: Fix comment typo. Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « content/renderer/browser_plugin/browser_plugin.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/renderer/browser_plugin/browser_plugin.h" 5 #include "content/renderer/browser_plugin/browser_plugin.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 } 97 }
98 98
99 BrowserPluginManager::Get()->RemoveBrowserPlugin(browser_plugin_instance_id_); 99 BrowserPluginManager::Get()->RemoveBrowserPlugin(browser_plugin_instance_id_);
100 } 100 }
101 101
102 bool BrowserPlugin::OnMessageReceived(const IPC::Message& message) { 102 bool BrowserPlugin::OnMessageReceived(const IPC::Message& message) {
103 bool handled = true; 103 bool handled = true;
104 IPC_BEGIN_MESSAGE_MAP(BrowserPlugin, message) 104 IPC_BEGIN_MESSAGE_MAP(BrowserPlugin, message)
105 IPC_MESSAGE_HANDLER(BrowserPluginMsg_AdvanceFocus, OnAdvanceFocus) 105 IPC_MESSAGE_HANDLER(BrowserPluginMsg_AdvanceFocus, OnAdvanceFocus)
106 IPC_MESSAGE_HANDLER(BrowserPluginMsg_GuestGone, OnGuestGone) 106 IPC_MESSAGE_HANDLER(BrowserPluginMsg_GuestGone, OnGuestGone)
107 IPC_MESSAGE_HANDLER(BrowserPluginMsg_GuestReady, OnGuestReady)
107 IPC_MESSAGE_HANDLER(BrowserPluginMsg_SetCursor, OnSetCursor) 108 IPC_MESSAGE_HANDLER(BrowserPluginMsg_SetCursor, OnSetCursor)
108 IPC_MESSAGE_HANDLER(BrowserPluginMsg_SetMouseLock, OnSetMouseLock) 109 IPC_MESSAGE_HANDLER(BrowserPluginMsg_SetMouseLock, OnSetMouseLock)
109 IPC_MESSAGE_HANDLER(BrowserPluginMsg_SetTooltipText, OnSetTooltipText) 110 IPC_MESSAGE_HANDLER(BrowserPluginMsg_SetTooltipText, OnSetTooltipText)
110 IPC_MESSAGE_HANDLER(BrowserPluginMsg_ShouldAcceptTouchEvents, 111 IPC_MESSAGE_HANDLER(BrowserPluginMsg_ShouldAcceptTouchEvents,
111 OnShouldAcceptTouchEvents) 112 OnShouldAcceptTouchEvents)
112 IPC_MESSAGE_HANDLER(BrowserPluginMsg_SetChildFrameSurface, 113 IPC_MESSAGE_HANDLER(BrowserPluginMsg_SetChildFrameSurface,
113 OnSetChildFrameSurface) 114 OnSetChildFrameSurface)
114 IPC_END_MESSAGE_MAP() 115 IPC_END_MESSAGE_MAP()
115 return handled; 116 return handled;
116 } 117 }
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
206 render_view->GetWebView()->advanceFocus(reverse); 207 render_view->GetWebView()->advanceFocus(reverse);
207 } 208 }
208 209
209 void BrowserPlugin::OnGuestGone(int browser_plugin_instance_id) { 210 void BrowserPlugin::OnGuestGone(int browser_plugin_instance_id) {
210 guest_crashed_ = true; 211 guest_crashed_ = true;
211 212
212 EnableCompositing(true); 213 EnableCompositing(true);
213 compositing_helper_->ChildFrameGone(); 214 compositing_helper_->ChildFrameGone();
214 } 215 }
215 216
217 void BrowserPlugin::OnGuestReady(int browser_plugin_instance_id) {
218 guest_crashed_ = false;
219 }
220
216 void BrowserPlugin::OnSetCursor(int browser_plugin_instance_id, 221 void BrowserPlugin::OnSetCursor(int browser_plugin_instance_id,
217 const WebCursor& cursor) { 222 const WebCursor& cursor) {
218 cursor_ = cursor; 223 cursor_ = cursor;
219 } 224 }
220 225
221 void BrowserPlugin::OnSetMouseLock(int browser_plugin_instance_id, 226 void BrowserPlugin::OnSetMouseLock(int browser_plugin_instance_id,
222 bool enable) { 227 bool enable) {
223 auto* render_frame = 228 auto* render_frame =
224 RenderFrameImpl::FromRoutingID(render_frame_routing_id()); 229 RenderFrameImpl::FromRoutingID(render_frame_routing_id());
225 auto* render_view = static_cast<RenderViewImpl*>( 230 auto* render_view = static_cast<RenderViewImpl*>(
(...skipping 375 matching lines...) Expand 10 before | Expand all | Expand 10 after
601 606
602 bool BrowserPlugin::HandleMouseLockedInputEvent( 607 bool BrowserPlugin::HandleMouseLockedInputEvent(
603 const blink::WebMouseEvent& event) { 608 const blink::WebMouseEvent& event) {
604 BrowserPluginManager::Get()->Send( 609 BrowserPluginManager::Get()->Send(
605 new BrowserPluginHostMsg_HandleInputEvent(browser_plugin_instance_id_, 610 new BrowserPluginHostMsg_HandleInputEvent(browser_plugin_instance_id_,
606 &event)); 611 &event));
607 return true; 612 return true;
608 } 613 }
609 614
610 } // namespace content 615 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/browser_plugin/browser_plugin.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698