| 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 "content/renderer/browser_plugin/browser_plugin_manager.h" | 8 #include "content/renderer/browser_plugin/browser_plugin_manager.h" |
| 9 #include "googleurl/src/gurl.h" | 9 #include "googleurl/src/gurl.h" |
| 10 #include "ui/gfx/size.h" | 10 #include "ui/gfx/size.h" |
| 11 | 11 |
| 12 struct BrowserPluginMsg_UpdateRect_Params; | 12 struct BrowserPluginMsg_UpdateRect_Params; |
| 13 class WebCursor; | 13 class WebCursor; |
| 14 | 14 |
| 15 namespace gfx { | 15 namespace gfx { |
| 16 class Point; | 16 class Point; |
| 17 } | 17 } |
| 18 | 18 |
| 19 namespace content { | 19 namespace content { |
| 20 | 20 |
| 21 class BrowserPluginManagerImpl : public BrowserPluginManager { | 21 class BrowserPluginManagerImpl : public BrowserPluginManager { |
| 22 public: | 22 public: |
| 23 BrowserPluginManagerImpl(RenderViewImpl* render_view); | 23 BrowserPluginManagerImpl(RenderViewImpl* render_view); |
| 24 | 24 |
| 25 // BrowserPluginManager implementation. | 25 // BrowserPluginManager implementation. |
| 26 virtual BrowserPlugin* CreateBrowserPlugin( | 26 virtual BrowserPluginImpl* CreateBrowserPlugin( |
| 27 RenderViewImpl* render_view, | 27 RenderViewImpl* render_view, |
| 28 WebKit::WebFrame* frame, | 28 WebKit::WebFrame* frame, |
| 29 const WebKit::WebPluginParams& params) OVERRIDE; | 29 const WebKit::WebPluginParams& params) OVERRIDE; |
| 30 virtual void AllocateInstanceID(BrowserPlugin* browser_plugin) OVERRIDE; | 30 virtual void AllocateInstanceID(BrowserPluginImpl* browser_plugin) OVERRIDE; |
| 31 | 31 |
| 32 // IPC::Sender implementation. | 32 // IPC::Sender implementation. |
| 33 virtual bool Send(IPC::Message* msg) OVERRIDE; | 33 virtual bool Send(IPC::Message* msg) OVERRIDE; |
| 34 | 34 |
| 35 // RenderViewObserver override. Call on render thread. | 35 // RenderViewObserver override. Call on render thread. |
| 36 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; | 36 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; |
| 37 private: | 37 private: |
| 38 virtual ~BrowserPluginManagerImpl(); | 38 virtual ~BrowserPluginManagerImpl(); |
| 39 | 39 |
| 40 void OnAllocateInstanceIDACK(const IPC::Message& message, | 40 void OnAllocateInstanceIDACK(const IPC::Message& message, |
| 41 int request_id, | 41 int request_id, |
| 42 int instance_id); | 42 int instance_id); |
| 43 void OnPluginAtPositionRequest(const IPC::Message& message, | 43 void OnPluginAtPositionRequest(const IPC::Message& message, |
| 44 int request_id, | 44 int request_id, |
| 45 const gfx::Point& position); | 45 const gfx::Point& position); |
| 46 void OnUnhandledSwap(const IPC::Message& message, | 46 void OnUnhandledSwap(const IPC::Message& message, |
| 47 int instance_id, | 47 int instance_id, |
| 48 const gfx::Size& size, | 48 const gfx::Size& size, |
| 49 std::string mailbox_name, | 49 std::string mailbox_name, |
| 50 int gpu_route_id, | 50 int gpu_route_id, |
| 51 int gpu_host_id); | 51 int gpu_host_id); |
| 52 | 52 |
| 53 // Returns whether a message should be forwarded to BrowserPlugins. | 53 // Returns whether a message should be forwarded to BrowserPlugins. |
| 54 static bool ShouldForwardToBrowserPlugin(const IPC::Message& message); | 54 static bool ShouldForwardToBrowserPlugin(const IPC::Message& message); |
| 55 | 55 |
| 56 int request_id_counter_; | 56 int request_id_counter_; |
| 57 IDMap<BrowserPlugin> pending_allocate_instance_id_requests_; | 57 IDMap<BrowserPluginImpl> pending_allocate_instance_id_requests_; |
| 58 | 58 |
| 59 DISALLOW_COPY_AND_ASSIGN(BrowserPluginManagerImpl); | 59 DISALLOW_COPY_AND_ASSIGN(BrowserPluginManagerImpl); |
| 60 }; | 60 }; |
| 61 | 61 |
| 62 } // namespace content | 62 } // namespace content |
| 63 | 63 |
| 64 #endif // CONTENT_RENDERER_BROWSER_PLUGIN_BROWSER_PLUGIN_MANAGER_IMPL_H_ | 64 #endif // CONTENT_RENDERER_BROWSER_PLUGIN_BROWSER_PLUGIN_MANAGER_IMPL_H_ |
| OLD | NEW |