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_NavigationStateUpdate, |
| 48 OnNavigationStateUpdate) |
47 IPC_MESSAGE_UNHANDLED(handled = false) | 49 IPC_MESSAGE_UNHANDLED(handled = false) |
48 IPC_END_MESSAGE_MAP() | 50 IPC_END_MESSAGE_MAP() |
49 return handled; | 51 return handled; |
50 } | 52 } |
51 | 53 |
52 void BrowserPluginManagerImpl::OnUpdateRect( | 54 void BrowserPluginManagerImpl::OnUpdateRect( |
53 int instance_id, | 55 int instance_id, |
54 int message_id, | 56 int message_id, |
55 const BrowserPluginMsg_UpdateRect_Params& params) { | 57 const BrowserPluginMsg_UpdateRect_Params& params) { |
56 BrowserPlugin* plugin = GetBrowserPlugin(instance_id); | 58 BrowserPlugin* plugin = GetBrowserPlugin(instance_id); |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
104 | 106 |
105 void BrowserPluginManagerImpl::OnLoadRedirect(int instance_id, | 107 void BrowserPluginManagerImpl::OnLoadRedirect(int instance_id, |
106 const GURL& old_url, | 108 const GURL& old_url, |
107 const GURL& new_url, | 109 const GURL& new_url, |
108 bool is_top_level) { | 110 bool is_top_level) { |
109 BrowserPlugin* plugin = GetBrowserPlugin(instance_id); | 111 BrowserPlugin* plugin = GetBrowserPlugin(instance_id); |
110 if (plugin) | 112 if (plugin) |
111 plugin->LoadRedirect(old_url, new_url, is_top_level); | 113 plugin->LoadRedirect(old_url, new_url, is_top_level); |
112 } | 114 } |
113 | 115 |
| 116 void BrowserPluginManagerImpl::OnNavigationStateUpdate(int instance_id, |
| 117 int current_entry_index, |
| 118 int entry_count) { |
| 119 BrowserPlugin* plugin = GetBrowserPlugin(instance_id); |
| 120 if (plugin) |
| 121 plugin->NavigationStateUpdate(current_entry_index, entry_count); |
| 122 } |
| 123 |
114 } // namespace content | 124 } // namespace content |
OLD | NEW |