| 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/renderer/browser_plugin/browser_plugin_manager_impl.h" | 5 #include "content/renderer/browser_plugin/browser_plugin_manager_impl.h" |
| 6 | 6 |
| 7 #include "content/common/browser_plugin_messages.h" | 7 #include "content/common/browser_plugin_messages.h" |
| 8 #include "content/renderer/browser_plugin/browser_plugin.h" | 8 #include "content/renderer/browser_plugin/browser_plugin.h" |
| 9 #include "content/renderer/render_thread_impl.h" | 9 #include "content/renderer/render_thread_impl.h" |
| 10 #include "ui/gfx/point.h" | 10 #include "ui/gfx/point.h" |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 48 IPC_MESSAGE_HANDLER(BrowserPluginMsg_LoadStart, OnLoadStart) | 48 IPC_MESSAGE_HANDLER(BrowserPluginMsg_LoadStart, OnLoadStart) |
| 49 IPC_MESSAGE_HANDLER(BrowserPluginMsg_LoadAbort, OnLoadAbort) | 49 IPC_MESSAGE_HANDLER(BrowserPluginMsg_LoadAbort, OnLoadAbort) |
| 50 IPC_MESSAGE_HANDLER(BrowserPluginMsg_LoadRedirect, OnLoadRedirect) | 50 IPC_MESSAGE_HANDLER(BrowserPluginMsg_LoadRedirect, OnLoadRedirect) |
| 51 IPC_MESSAGE_HANDLER(BrowserPluginMsg_LoadCommit, OnLoadCommit) | 51 IPC_MESSAGE_HANDLER(BrowserPluginMsg_LoadCommit, OnLoadCommit) |
| 52 IPC_MESSAGE_HANDLER(BrowserPluginMsg_LoadStop, OnLoadStop) | 52 IPC_MESSAGE_HANDLER(BrowserPluginMsg_LoadStop, OnLoadStop) |
| 53 IPC_MESSAGE_HANDLER(BrowserPluginMsg_SetCursor, OnSetCursor) | 53 IPC_MESSAGE_HANDLER(BrowserPluginMsg_SetCursor, OnSetCursor) |
| 54 IPC_MESSAGE_HANDLER(BrowserPluginMsg_PluginAtPositionRequest, | 54 IPC_MESSAGE_HANDLER(BrowserPluginMsg_PluginAtPositionRequest, |
| 55 OnPluginAtPositionRequest); | 55 OnPluginAtPositionRequest); |
| 56 IPC_MESSAGE_HANDLER(BrowserPluginMsg_GuestUnresponsive, OnGuestUnresponsive) | 56 IPC_MESSAGE_HANDLER(BrowserPluginMsg_GuestUnresponsive, OnGuestUnresponsive) |
| 57 IPC_MESSAGE_HANDLER(BrowserPluginMsg_GuestResponsive, OnGuestResponsive) | 57 IPC_MESSAGE_HANDLER(BrowserPluginMsg_GuestResponsive, OnGuestResponsive) |
| 58 IPC_MESSAGE_HANDLER(BrowserPluginMsg_UpdatedName, OnUpdatedName) |
| 58 IPC_MESSAGE_UNHANDLED(handled = false) | 59 IPC_MESSAGE_UNHANDLED(handled = false) |
| 59 IPC_END_MESSAGE_MAP() | 60 IPC_END_MESSAGE_MAP() |
| 60 return handled; | 61 return handled; |
| 61 } | 62 } |
| 62 | 63 |
| 63 void BrowserPluginManagerImpl::OnPluginAtPositionRequest( | 64 void BrowserPluginManagerImpl::OnPluginAtPositionRequest( |
| 64 const IPC::Message& message, | 65 const IPC::Message& message, |
| 65 int request_id, | 66 int request_id, |
| 66 const gfx::Point& position) { | 67 const gfx::Point& position) { |
| 67 int instance_id = -1; | 68 int instance_id = -1; |
| (...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 178 if (plugin) | 179 if (plugin) |
| 179 plugin->GuestUnresponsive(process_id); | 180 plugin->GuestUnresponsive(process_id); |
| 180 } | 181 } |
| 181 | 182 |
| 182 void BrowserPluginManagerImpl::OnGuestResponsive(int instance_id, | 183 void BrowserPluginManagerImpl::OnGuestResponsive(int instance_id, |
| 183 int process_id) { | 184 int process_id) { |
| 184 BrowserPlugin* plugin = GetBrowserPlugin(instance_id); | 185 BrowserPlugin* plugin = GetBrowserPlugin(instance_id); |
| 185 if (plugin) | 186 if (plugin) |
| 186 plugin->GuestResponsive(process_id); | 187 plugin->GuestResponsive(process_id); |
| 187 } | 188 } |
| 189 |
| 190 void BrowserPluginManagerImpl::OnUpdatedName( |
| 191 int instance_id, |
| 192 const std::string& name) { |
| 193 BrowserPlugin* plugin = GetBrowserPlugin(instance_id); |
| 194 if (plugin) |
| 195 plugin->UpdatedName(name); |
| 196 } |
| 197 |
| 188 } // namespace content | 198 } // namespace content |
| OLD | NEW |