OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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/browser/browser_plugin/browser_plugin_embedder.h" | 5 #include "content/browser/browser_plugin/browser_plugin_embedder.h" |
6 | 6 |
7 #include "base/values.h" | 7 #include "base/values.h" |
8 #include "content/browser/browser_plugin/browser_plugin_guest.h" | 8 #include "content/browser/browser_plugin/browser_plugin_guest.h" |
9 #include "content/browser/browser_plugin/browser_plugin_guest_manager.h" | 9 #include "content/browser/browser_plugin/browser_plugin_guest_manager.h" |
10 #include "content/browser/browser_plugin/browser_plugin_host_factory.h" | 10 #include "content/browser/browser_plugin/browser_plugin_host_factory.h" |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
82 GetBrowserPluginGuestManager()->DidSendScreenRects( | 82 GetBrowserPluginGuestManager()->DidSendScreenRects( |
83 static_cast<WebContentsImpl*>(web_contents())); | 83 static_cast<WebContentsImpl*>(web_contents())); |
84 } | 84 } |
85 | 85 |
86 bool BrowserPluginEmbedder::HandleKeyboardEvent( | 86 bool BrowserPluginEmbedder::HandleKeyboardEvent( |
87 const NativeWebKeyboardEvent& event) { | 87 const NativeWebKeyboardEvent& event) { |
88 return GetBrowserPluginGuestManager()->UnlockMouseIfNecessary( | 88 return GetBrowserPluginGuestManager()->UnlockMouseIfNecessary( |
89 static_cast<WebContentsImpl*>(web_contents()), event); | 89 static_cast<WebContentsImpl*>(web_contents()), event); |
90 } | 90 } |
91 | 91 |
92 void BrowserPluginEmbedder::RenderViewGone(base::TerminationStatus status) { | 92 void BrowserPluginEmbedder::RenderProcessGone(base::TerminationStatus status) { |
93 CleanUp(); | 93 CleanUp(); |
94 } | 94 } |
95 | 95 |
96 bool BrowserPluginEmbedder::OnMessageReceived(const IPC::Message& message) { | 96 bool BrowserPluginEmbedder::OnMessageReceived(const IPC::Message& message) { |
97 bool handled = true; | 97 bool handled = true; |
98 IPC_BEGIN_MESSAGE_MAP(BrowserPluginEmbedder, message) | 98 IPC_BEGIN_MESSAGE_MAP(BrowserPluginEmbedder, message) |
99 IPC_MESSAGE_HANDLER(BrowserPluginHostMsg_AllocateInstanceID, | 99 IPC_MESSAGE_HANDLER(BrowserPluginHostMsg_AllocateInstanceID, |
100 OnAllocateInstanceID) | 100 OnAllocateInstanceID) |
101 IPC_MESSAGE_HANDLER(BrowserPluginHostMsg_Attach, OnAttach) | 101 IPC_MESSAGE_HANDLER(BrowserPluginHostMsg_Attach, OnAttach) |
102 IPC_MESSAGE_HANDLER(BrowserPluginHostMsg_PluginAtPositionResponse, | 102 IPC_MESSAGE_HANDLER(BrowserPluginHostMsg_PluginAtPositionResponse, |
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
225 if (guest) | 225 if (guest) |
226 render_view_host = guest->GetWebContents()->GetRenderViewHost(); | 226 render_view_host = guest->GetWebContents()->GetRenderViewHost(); |
227 else // No plugin, use embedder's RenderViewHost. | 227 else // No plugin, use embedder's RenderViewHost. |
228 render_view_host = web_contents()->GetRenderViewHost(); | 228 render_view_host = web_contents()->GetRenderViewHost(); |
229 | 229 |
230 callback_iter->second.Run(render_view_host, position.x(), position.y()); | 230 callback_iter->second.Run(render_view_host, position.x(), position.y()); |
231 pending_get_render_view_callbacks_.erase(callback_iter); | 231 pending_get_render_view_callbacks_.erase(callback_iter); |
232 } | 232 } |
233 | 233 |
234 } // namespace content | 234 } // namespace content |
OLD | NEW |