| 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_LoadCommit_Params; | 11 struct BrowserPluginMsg_LoadCommit_Params; |
| 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(); | 23 BrowserPluginManagerImpl(RenderViewImpl* render_view); |
| 24 virtual ~BrowserPluginManagerImpl(); | |
| 25 | 24 |
| 26 // BrowserPluginManager implementation. | 25 // BrowserPluginManager implementation. |
| 27 virtual BrowserPlugin* CreateBrowserPlugin( | 26 virtual BrowserPlugin* CreateBrowserPlugin( |
| 28 RenderViewImpl* render_view, | 27 RenderViewImpl* render_view, |
| 29 WebKit::WebFrame* frame, | 28 WebKit::WebFrame* frame, |
| 30 const WebKit::WebPluginParams& params) OVERRIDE; | 29 const WebKit::WebPluginParams& params) OVERRIDE; |
| 31 | 30 |
| 32 // IPC::Sender implementation. | 31 // IPC::Sender implementation. |
| 33 virtual bool Send(IPC::Message* msg) OVERRIDE; | 32 virtual bool Send(IPC::Message* msg) OVERRIDE; |
| 34 | 33 |
| 35 // RenderProcessObserver override. Call on render thread. | 34 // RenderViewObserver override. Call on render thread. |
| 36 virtual bool OnControlMessageReceived(const IPC::Message& message) OVERRIDE; | 35 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; |
| 37 private: | 36 private: |
| 37 virtual ~BrowserPluginManagerImpl(); |
| 38 |
| 38 void OnUpdateRect(int instance_id, | 39 void OnUpdateRect(int instance_id, |
| 39 int message_id, | 40 int message_id, |
| 40 const BrowserPluginMsg_UpdateRect_Params& params); | 41 const BrowserPluginMsg_UpdateRect_Params& params); |
| 41 void OnGuestGone(int instance_id, int process_id, int status); | 42 void OnGuestGone(int instance_id, int process_id, int status); |
| 42 void OnAdvanceFocus(int instance_id, bool reverse); | 43 void OnAdvanceFocus(int instance_id, bool reverse); |
| 43 void OnGuestContentWindowReady(int instance_id, int guest_routing_id); | 44 void OnGuestContentWindowReady(int instance_id, int guest_routing_id); |
| 44 void OnShouldAcceptTouchEvents(int instance_id, bool accept); | 45 void OnShouldAcceptTouchEvents(int instance_id, bool accept); |
| 45 void OnLoadStart(int instance_id, | 46 void OnLoadStart(int instance_id, |
| 46 const GURL& url, | 47 const GURL& url, |
| 47 bool is_top_level); | 48 bool is_top_level); |
| 48 void OnLoadCommit(int instance_id, | 49 void OnLoadCommit(int instance_id, |
| 49 const BrowserPluginMsg_LoadCommit_Params& params); | 50 const BrowserPluginMsg_LoadCommit_Params& params); |
| 50 void OnLoadStop(int instance_id); | 51 void OnLoadStop(int instance_id); |
| 51 void OnLoadAbort(int instance_id, | 52 void OnLoadAbort(int instance_id, |
| 52 const GURL& url, | 53 const GURL& url, |
| 53 bool is_top_level, | 54 bool is_top_level, |
| 54 const std::string& type); | 55 const std::string& type); |
| 55 void OnLoadRedirect(int instance_id, | 56 void OnLoadRedirect(int instance_id, |
| 56 const GURL& old_url, | 57 const GURL& old_url, |
| 57 const GURL& new_url, | 58 const GURL& new_url, |
| 58 bool is_top_level); | 59 bool is_top_level); |
| 59 void OnSetCursor(int instance_id, | 60 void OnSetCursor(int instance_id, |
| 60 const WebCursor& cursor); | 61 const WebCursor& cursor); |
| 61 void OnPluginAtPositionRequest(int source_routing_id, | 62 void OnPluginAtPositionRequest(int request_id, |
| 62 int request_id, | |
| 63 const gfx::Point& position); | 63 const gfx::Point& position); |
| 64 | 64 |
| 65 DISALLOW_COPY_AND_ASSIGN(BrowserPluginManagerImpl); | 65 DISALLOW_COPY_AND_ASSIGN(BrowserPluginManagerImpl); |
| 66 }; | 66 }; |
| 67 | 67 |
| 68 } // namespace content | 68 } // namespace content |
| 69 | 69 |
| 70 #endif // CONTENT_RENDERER_BROWSER_PLUGIN_BROWSER_PLUGIN_MANAGER_IMPL_H_ | 70 #endif // CONTENT_RENDERER_BROWSER_PLUGIN_BROWSER_PLUGIN_MANAGER_IMPL_H_ |
| OLD | NEW |