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_impl.h" | 8 #include "content/renderer/browser_plugin/browser_plugin_impl.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 15 matching lines...) Expand all Loading... |
26 WebKit::WebFrame* frame, | 26 WebKit::WebFrame* frame, |
27 const WebKit::WebPluginParams& params) { | 27 const WebKit::WebPluginParams& params) { |
28 return new BrowserPluginImpl(render_view, frame, params); | 28 return new BrowserPluginImpl(render_view, frame, params); |
29 } | 29 } |
30 | 30 |
31 void BrowserPluginManagerImpl::AllocateInstanceID( | 31 void BrowserPluginManagerImpl::AllocateInstanceID( |
32 BrowserPluginImpl* browser_plugin) { | 32 BrowserPluginImpl* browser_plugin) { |
33 int request_id = request_id_counter_++; | 33 int request_id = request_id_counter_++; |
34 pending_allocate_instance_id_requests_.AddWithID(browser_plugin, request_id); | 34 pending_allocate_instance_id_requests_.AddWithID(browser_plugin, request_id); |
35 Send(new BrowserPluginHostMsg_AllocateInstanceID( | 35 Send(new BrowserPluginHostMsg_AllocateInstanceID( |
36 browser_plugin->render_view_routing_id(), request_id)); | 36 browser_plugin->GetRoutingID(), request_id)); |
37 } | 37 } |
38 | 38 |
39 bool BrowserPluginManagerImpl::Send(IPC::Message* msg) { | 39 bool BrowserPluginManagerImpl::Send(IPC::Message* msg) { |
40 return RenderThread::Get()->Send(msg); | 40 return RenderThread::Get()->Send(msg); |
41 } | 41 } |
42 | 42 |
43 bool BrowserPluginManagerImpl::OnMessageReceived( | 43 bool BrowserPluginManagerImpl::OnMessageReceived( |
44 const IPC::Message& message) { | 44 const IPC::Message& message) { |
45 if (ShouldForwardToBrowserPlugin(message)) { | 45 if (ShouldForwardToBrowserPlugin(message)) { |
46 int instance_id = 0; | 46 int instance_id = 0; |
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
139 case BrowserPluginMsg_UpdatedName::ID: | 139 case BrowserPluginMsg_UpdatedName::ID: |
140 case BrowserPluginMsg_UpdateRect::ID: | 140 case BrowserPluginMsg_UpdateRect::ID: |
141 return true; | 141 return true; |
142 default: | 142 default: |
143 break; | 143 break; |
144 } | 144 } |
145 return false; | 145 return false; |
146 } | 146 } |
147 | 147 |
148 } // namespace content | 148 } // namespace content |
OLD | NEW |