| 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 | 10 |
| 11 struct BrowserPluginMsg_UpdateRect_Params; | 11 struct BrowserPluginMsg_UpdateRect_Params; |
| 12 class WebCursor; | 12 class WebCursor; |
| 13 | 13 |
| 14 namespace gfx { | 14 namespace gfx { |
| 15 class Point; | 15 class Point; |
| 16 } | 16 } |
| 17 | 17 |
| 18 namespace content { | 18 namespace content { |
| 19 | 19 |
| 20 class BrowserPluginManagerImpl : public BrowserPluginManager { | 20 class BrowserPluginManagerImpl : public BrowserPluginManager { |
| 21 public: | 21 public: |
| 22 BrowserPluginManagerImpl(RenderViewImpl* render_view); | 22 BrowserPluginManagerImpl(RenderViewImpl* render_view); |
| 23 | 23 |
| 24 // BrowserPluginManager implementation. | 24 // BrowserPluginManager implementation. |
| 25 virtual BrowserPlugin* CreateBrowserPlugin( | 25 virtual BrowserPlugin* CreateBrowserPlugin( |
| 26 RenderViewImpl* render_view, | 26 RenderViewImpl* render_view, |
| 27 WebKit::WebFrame* frame, | 27 WebKit::WebFrame* frame, |
| 28 const WebKit::WebPluginParams& params) OVERRIDE; | 28 const WebKit::WebPluginParams& params) OVERRIDE; |
| 29 virtual void AllocateInstanceID(BrowserPlugin* browser_plugin) OVERRIDE; |
| 29 | 30 |
| 30 // IPC::Sender implementation. | 31 // IPC::Sender implementation. |
| 31 virtual bool Send(IPC::Message* msg) OVERRIDE; | 32 virtual bool Send(IPC::Message* msg) OVERRIDE; |
| 32 | 33 |
| 33 // RenderViewObserver override. Call on render thread. | 34 // RenderViewObserver override. Call on render thread. |
| 34 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; | 35 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; |
| 35 private: | 36 private: |
| 36 virtual ~BrowserPluginManagerImpl(); | 37 virtual ~BrowserPluginManagerImpl(); |
| 37 | 38 |
| 39 void OnAllocateInstanceIDResponse(const IPC::Message& message); |
| 38 void OnPluginAtPositionRequest(const IPC::Message& message, | 40 void OnPluginAtPositionRequest(const IPC::Message& message, |
| 39 int request_id, | 41 int request_id, |
| 40 const gfx::Point& position); | 42 const gfx::Point& position); |
| 41 | 43 |
| 42 // Returns whether a message should be forwarded to BrowserPlugins. | 44 // Returns whether a message should be forwarded to BrowserPlugins. |
| 43 static bool ShouldForwardToBrowserPlugin(const IPC::Message& message); | 45 static bool ShouldForwardToBrowserPlugin(const IPC::Message& message); |
| 44 | 46 |
| 47 int request_counter_; |
| 48 IDMap<BrowserPlugin> requests_; |
| 49 |
| 45 DISALLOW_COPY_AND_ASSIGN(BrowserPluginManagerImpl); | 50 DISALLOW_COPY_AND_ASSIGN(BrowserPluginManagerImpl); |
| 46 }; | 51 }; |
| 47 | 52 |
| 48 } // namespace content | 53 } // namespace content |
| 49 | 54 |
| 50 #endif // CONTENT_RENDERER_BROWSER_PLUGIN_BROWSER_PLUGIN_MANAGER_IMPL_H_ | 55 #endif // CONTENT_RENDERER_BROWSER_PLUGIN_BROWSER_PLUGIN_MANAGER_IMPL_H_ |
| OLD | NEW |