| 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; | |
| 12 struct BrowserPluginMsg_UpdateRect_Params; | 11 struct BrowserPluginMsg_UpdateRect_Params; |
| 13 class WebCursor; | 12 class WebCursor; |
| 14 | 13 |
| 15 namespace gfx { | 14 namespace gfx { |
| 16 class Point; | 15 class Point; |
| 17 } | 16 } |
| 18 | 17 |
| 19 namespace content { | 18 namespace content { |
| 20 | 19 |
| 21 class BrowserPluginManagerImpl : public BrowserPluginManager { | 20 class BrowserPluginManagerImpl : public BrowserPluginManager { |
| 22 public: | 21 public: |
| 23 BrowserPluginManagerImpl(RenderViewImpl* render_view); | 22 BrowserPluginManagerImpl(RenderViewImpl* render_view); |
| 24 | 23 |
| 25 // BrowserPluginManager implementation. | 24 // BrowserPluginManager implementation. |
| 26 virtual BrowserPlugin* CreateBrowserPlugin( | 25 virtual BrowserPlugin* CreateBrowserPlugin( |
| 27 RenderViewImpl* render_view, | 26 RenderViewImpl* render_view, |
| 28 WebKit::WebFrame* frame, | 27 WebKit::WebFrame* frame, |
| 29 const WebKit::WebPluginParams& params) OVERRIDE; | 28 const WebKit::WebPluginParams& params) OVERRIDE; |
| 30 | 29 |
| 31 // IPC::Sender implementation. | 30 // IPC::Sender implementation. |
| 32 virtual bool Send(IPC::Message* msg) OVERRIDE; | 31 virtual bool Send(IPC::Message* msg) OVERRIDE; |
| 33 | 32 |
| 34 // RenderViewObserver override. Call on render thread. | 33 // RenderViewObserver override. Call on render thread. |
| 35 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; | 34 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; |
| 36 private: | 35 private: |
| 37 virtual ~BrowserPluginManagerImpl(); | 36 virtual ~BrowserPluginManagerImpl(); |
| 38 | 37 |
| 39 void OnUpdateRect(int instance_id, | |
| 40 int message_id, | |
| 41 const BrowserPluginMsg_UpdateRect_Params& params); | |
| 42 void OnGuestGone(int instance_id, int process_id, int status); | |
| 43 void OnAdvanceFocus(int instance_id, bool reverse); | |
| 44 void OnGuestContentWindowReady(int instance_id, int guest_routing_id); | |
| 45 void OnShouldAcceptTouchEvents(int instance_id, bool accept); | |
| 46 void OnLoadStart(int instance_id, | |
| 47 const GURL& url, | |
| 48 bool is_top_level); | |
| 49 void OnLoadCommit(int instance_id, | |
| 50 const BrowserPluginMsg_LoadCommit_Params& params); | |
| 51 void OnLoadStop(int instance_id); | |
| 52 void OnLoadAbort(int instance_id, | |
| 53 const GURL& url, | |
| 54 bool is_top_level, | |
| 55 const std::string& type); | |
| 56 void OnLoadRedirect(int instance_id, | |
| 57 const GURL& old_url, | |
| 58 const GURL& new_url, | |
| 59 bool is_top_level); | |
| 60 void OnSetCursor(int instance_id, | |
| 61 const WebCursor& cursor); | |
| 62 void OnPluginAtPositionRequest(const IPC::Message& message, | 38 void OnPluginAtPositionRequest(const IPC::Message& message, |
| 63 int request_id, | 39 int request_id, |
| 64 const gfx::Point& position); | 40 const gfx::Point& position); |
| 65 void OnGuestUnresponsive(int instance_id, int process_id); | |
| 66 void OnGuestResponsive(int instance_id, int process_id); | |
| 67 | 41 |
| 42 // Register BrowserPlugin messages to forward to the appropriate BrowserPlugin |
| 43 // object. BrowserPlugin messages are expected to have |instance_id| as their |
| 44 // first field. |
| 45 void RegisterBrowserPluginMessages(); |
| 46 |
| 47 std::set<uint32> browser_plugin_messages_; |
| 68 DISALLOW_COPY_AND_ASSIGN(BrowserPluginManagerImpl); | 48 DISALLOW_COPY_AND_ASSIGN(BrowserPluginManagerImpl); |
| 69 }; | 49 }; |
| 70 | 50 |
| 71 } // namespace content | 51 } // namespace content |
| 72 | 52 |
| 73 #endif // CONTENT_RENDERER_BROWSER_PLUGIN_BROWSER_PLUGIN_MANAGER_IMPL_H_ | 53 #endif // CONTENT_RENDERER_BROWSER_PLUGIN_BROWSER_PLUGIN_MANAGER_IMPL_H_ |
| OLD | NEW |