| 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 | 10 |
| (...skipping 26 matching lines...) Expand all Loading... |
| 37 IPC_BEGIN_MESSAGE_MAP(BrowserPluginManagerImpl, message) | 37 IPC_BEGIN_MESSAGE_MAP(BrowserPluginManagerImpl, message) |
| 38 IPC_MESSAGE_HANDLER(BrowserPluginMsg_UpdateRect, OnUpdateRect) | 38 IPC_MESSAGE_HANDLER(BrowserPluginMsg_UpdateRect, OnUpdateRect) |
| 39 IPC_MESSAGE_HANDLER(BrowserPluginMsg_GuestCrashed, OnGuestCrashed) | 39 IPC_MESSAGE_HANDLER(BrowserPluginMsg_GuestCrashed, OnGuestCrashed) |
| 40 IPC_MESSAGE_HANDLER(BrowserPluginMsg_DidNavigate, OnDidNavigate) | 40 IPC_MESSAGE_HANDLER(BrowserPluginMsg_DidNavigate, OnDidNavigate) |
| 41 IPC_MESSAGE_HANDLER(BrowserPluginMsg_AdvanceFocus, OnAdvanceFocus) | 41 IPC_MESSAGE_HANDLER(BrowserPluginMsg_AdvanceFocus, OnAdvanceFocus) |
| 42 IPC_MESSAGE_HANDLER(BrowserPluginMsg_ShouldAcceptTouchEvents, | 42 IPC_MESSAGE_HANDLER(BrowserPluginMsg_ShouldAcceptTouchEvents, |
| 43 OnShouldAcceptTouchEvents) | 43 OnShouldAcceptTouchEvents) |
| 44 IPC_MESSAGE_HANDLER(BrowserPluginMsg_LoadStart, OnLoadStart) | 44 IPC_MESSAGE_HANDLER(BrowserPluginMsg_LoadStart, OnLoadStart) |
| 45 IPC_MESSAGE_HANDLER(BrowserPluginMsg_LoadAbort, OnLoadAbort) | 45 IPC_MESSAGE_HANDLER(BrowserPluginMsg_LoadAbort, OnLoadAbort) |
| 46 IPC_MESSAGE_HANDLER(BrowserPluginMsg_LoadRedirect, OnLoadRedirect) | 46 IPC_MESSAGE_HANDLER(BrowserPluginMsg_LoadRedirect, OnLoadRedirect) |
| 47 IPC_MESSAGE_HANDLER(BrowserPluginMsg_TitleChanged, OnTitleChanged) |
| 47 IPC_MESSAGE_UNHANDLED(handled = false) | 48 IPC_MESSAGE_UNHANDLED(handled = false) |
| 48 IPC_END_MESSAGE_MAP() | 49 IPC_END_MESSAGE_MAP() |
| 49 return handled; | 50 return handled; |
| 50 } | 51 } |
| 51 | 52 |
| 52 void BrowserPluginManagerImpl::OnUpdateRect( | 53 void BrowserPluginManagerImpl::OnUpdateRect( |
| 53 int instance_id, | 54 int instance_id, |
| 54 int message_id, | 55 int message_id, |
| 55 const BrowserPluginMsg_UpdateRect_Params& params) { | 56 const BrowserPluginMsg_UpdateRect_Params& params) { |
| 56 BrowserPlugin* plugin = GetBrowserPlugin(instance_id); | 57 BrowserPlugin* plugin = GetBrowserPlugin(instance_id); |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 104 | 105 |
| 105 void BrowserPluginManagerImpl::OnLoadRedirect(int instance_id, | 106 void BrowserPluginManagerImpl::OnLoadRedirect(int instance_id, |
| 106 const GURL& old_url, | 107 const GURL& old_url, |
| 107 const GURL& new_url, | 108 const GURL& new_url, |
| 108 bool is_top_level) { | 109 bool is_top_level) { |
| 109 BrowserPlugin* plugin = GetBrowserPlugin(instance_id); | 110 BrowserPlugin* plugin = GetBrowserPlugin(instance_id); |
| 110 if (plugin) | 111 if (plugin) |
| 111 plugin->LoadRedirect(old_url, new_url, is_top_level); | 112 plugin->LoadRedirect(old_url, new_url, is_top_level); |
| 112 } | 113 } |
| 113 | 114 |
| 115 void BrowserPluginManagerImpl::OnTitleChanged(int instance_id, |
| 116 const string16& title) { |
| 117 BrowserPlugin* plugin = GetBrowserPlugin(instance_id); |
| 118 if (plugin) |
| 119 plugin->TitleChanged(title); |
| 120 } |
| 121 |
| 114 } // namespace content | 122 } // namespace content |
| OLD | NEW |