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 #ifndef CONTENT_RENDERER_BROWSER_PLUGIN_BROWSER_PLUGIN_MANAGER_IMPL_H_ | 5 #ifndef CONTENT_RENDERER_BROWSER_PLUGIN_BROWSER_PLUGIN_MANAGER_IMPL_H_ |
6 #define CONTENT_RENDERER_BROWSER_PLUGIN_BROWSER_PLUGIN_MANAGER_IMPL_H_ | 6 #define CONTENT_RENDERER_BROWSER_PLUGIN_BROWSER_PLUGIN_MANAGER_IMPL_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 | 9 |
10 #include "content/renderer/browser_plugin/browser_plugin_manager.h" | 10 #include "content/renderer/browser_plugin/browser_plugin_manager.h" |
11 #include "ui/gfx/size.h" | 11 #include "ui/gfx/size.h" |
12 | 12 |
13 namespace gfx { | 13 namespace gfx { |
14 class Point; | 14 class Point; |
15 } | 15 } |
16 | 16 |
17 namespace content { | 17 namespace content { |
18 | 18 |
19 class BrowserPluginManagerImpl : public BrowserPluginManager { | 19 class BrowserPluginManagerImpl : public BrowserPluginManager { |
20 public: | 20 public: |
21 explicit BrowserPluginManagerImpl(RenderViewImpl* render_view); | 21 explicit BrowserPluginManagerImpl(RenderViewImpl* render_view); |
22 | 22 |
23 // BrowserPluginManager implementation. | 23 // BrowserPluginManager implementation. |
24 virtual BrowserPlugin* CreateBrowserPlugin( | 24 virtual BrowserPlugin* CreateBrowserPlugin( |
25 RenderViewImpl* render_view, | 25 RenderViewImpl* render_view, |
26 blink::WebFrame* frame, | 26 blink::WebFrame* frame, |
27 bool auto_navigate) OVERRIDE; | 27 bool auto_navigate) OVERRIDE; |
28 virtual void AllocateInstanceID( | 28 virtual void AllocateInstanceID( |
29 const base::WeakPtr<BrowserPlugin>& browser_plugin) OVERRIDE; | 29 const base::WeakPtr<BrowserPlugin>& browser_plugin, |
| 30 const std::string& src) OVERRIDE; |
30 | 31 |
31 // IPC::Sender implementation. | 32 // IPC::Sender implementation. |
32 virtual bool Send(IPC::Message* msg) OVERRIDE; | 33 virtual bool Send(IPC::Message* msg) OVERRIDE; |
33 | 34 |
34 // RenderViewObserver override. Call on render thread. | 35 // RenderViewObserver override. Call on render thread. |
35 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; | 36 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; |
36 virtual void DidCommitCompositorFrame() OVERRIDE; | 37 virtual void DidCommitCompositorFrame() OVERRIDE; |
37 | 38 |
38 private: | 39 private: |
39 virtual ~BrowserPluginManagerImpl(); | 40 virtual ~BrowserPluginManagerImpl(); |
40 | 41 |
41 void OnAllocateInstanceIDACK(const IPC::Message& message, | 42 void OnAllocateInstanceIDACK(const IPC::Message& message, |
42 int request_id, | 43 int request_id, |
43 int guest_instance_id); | 44 int guest_instance_id); |
44 | 45 |
45 int request_id_counter_; | 46 int request_id_counter_; |
46 typedef std::map<int, const base::WeakPtr<BrowserPlugin> > InstanceIDMap; | 47 typedef std::map<int, const base::WeakPtr<BrowserPlugin> > InstanceIDMap; |
47 InstanceIDMap pending_allocate_guest_instance_id_requests_; | 48 InstanceIDMap pending_allocate_guest_instance_id_requests_; |
48 | 49 |
49 DISALLOW_COPY_AND_ASSIGN(BrowserPluginManagerImpl); | 50 DISALLOW_COPY_AND_ASSIGN(BrowserPluginManagerImpl); |
50 }; | 51 }; |
51 | 52 |
52 } // namespace content | 53 } // namespace content |
53 | 54 |
54 #endif // CONTENT_RENDERER_BROWSER_PLUGIN_BROWSER_PLUGIN_MANAGER_IMPL_H_ | 55 #endif // CONTENT_RENDERER_BROWSER_PLUGIN_BROWSER_PLUGIN_MANAGER_IMPL_H_ |
OLD | NEW |