| 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_BROWSER_BROWSER_PLUGIN_BROWSER_PLUGIN_EMBEDDER_HELPER_H_ | 5 #ifndef CONTENT_BROWSER_BROWSER_PLUGIN_BROWSER_PLUGIN_EMBEDDER_HELPER_H_ |
| 6 #define CONTENT_BROWSER_BROWSER_PLUGIN_BROWSER_PLUGIN_EMBEDDER_HELPER_H_ | 6 #define CONTENT_BROWSER_BROWSER_PLUGIN_BROWSER_PLUGIN_EMBEDDER_HELPER_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
| 11 #include "content/public/browser/render_view_host_observer.h" | 11 #include "content/public/browser/render_view_host_observer.h" |
| 12 #include "third_party/WebKit/Source/WebKit/chromium/public/WebDragStatus.h" | 12 #include "third_party/WebKit/Source/WebKit/chromium/public/WebDragStatus.h" |
| 13 #include "third_party/WebKit/Source/WebKit/chromium/public/WebDragOperation.h" | 13 #include "third_party/WebKit/Source/WebKit/chromium/public/WebDragOperation.h" |
| 14 | 14 |
| 15 namespace IPC { | 15 namespace IPC { |
| 16 class Message; | 16 class Message; |
| 17 class SyncMessage; | 17 class SyncMessage; |
| 18 } | 18 } |
| 19 | 19 |
| 20 namespace gfx { | 20 namespace gfx { |
| 21 class Point; | 21 class Point; |
| 22 class Size; | 22 class Size; |
| 23 } | 23 } |
| 24 | 24 |
| 25 struct BrowserPluginHostMsg_CreateGuest_Params; |
| 25 struct BrowserPluginHostMsg_ResizeGuest_Params; | 26 struct BrowserPluginHostMsg_ResizeGuest_Params; |
| 26 struct WebDropData; | 27 struct WebDropData; |
| 27 | 28 |
| 28 namespace content { | 29 namespace content { |
| 29 | 30 |
| 30 class BrowserPluginEmbedder; | 31 class BrowserPluginEmbedder; |
| 31 class RenderViewHost; | 32 class RenderViewHost; |
| 32 | 33 |
| 33 // Helper for browser plugin embedder. | 34 // Helper for browser plugin embedder. |
| 34 // | 35 // |
| (...skipping 14 matching lines...) Expand all Loading... |
| 49 // Make it public for sync IPCs. | 50 // Make it public for sync IPCs. |
| 50 virtual bool Send(IPC::Message* message) OVERRIDE; | 51 virtual bool Send(IPC::Message* message) OVERRIDE; |
| 51 | 52 |
| 52 protected: | 53 protected: |
| 53 // RenderViewHostObserver implementation. | 54 // RenderViewHostObserver implementation. |
| 54 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; | 55 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; |
| 55 | 56 |
| 56 private: | 57 private: |
| 57 // Message handlers. | 58 // Message handlers. |
| 58 void OnCreateGuest(int instance_id, | 59 void OnCreateGuest(int instance_id, |
| 59 const std::string& storage_partition_id, | 60 const BrowserPluginHostMsg_CreateGuest_Params& params); |
| 60 bool persist_storage, | |
| 61 bool focused, | |
| 62 bool visible); | |
| 63 void OnNavigateGuest(int instance_id, | 61 void OnNavigateGuest(int instance_id, |
| 64 const std::string& src, | 62 const std::string& src, |
| 65 const BrowserPluginHostMsg_ResizeGuest_Params& params); | 63 const BrowserPluginHostMsg_ResizeGuest_Params& params); |
| 66 void OnResizeGuest(int instance_id, | 64 void OnResizeGuest(int instance_id, |
| 67 const BrowserPluginHostMsg_ResizeGuest_Params& params); | 65 const BrowserPluginHostMsg_ResizeGuest_Params& params); |
| 68 void OnUpdateRectACK(int instance_id, int message_id, const gfx::Size& size); | 66 void OnUpdateRectACK(int instance_id, int message_id, const gfx::Size& size); |
| 69 void OnHandleInputEvent(const IPC::SyncMessage& message, bool* handled); | 67 void OnHandleInputEvent(const IPC::SyncMessage& message, bool* handled); |
| 70 void OnSetFocus(int instance_id, bool focused); | 68 void OnSetFocus(int instance_id, bool focused); |
| 71 void OnPluginDestroyed(int instance_id); | 69 void OnPluginDestroyed(int instance_id); |
| 72 void OnGo(int instance_id, int relative_index); | 70 void OnGo(int instance_id, int relative_index); |
| 73 void OnStop(int instance_id); | 71 void OnStop(int instance_id); |
| 74 void OnReload(int instance_id); | 72 void OnReload(int instance_id); |
| 75 void OnTerminateGuest(int instance_id); | 73 void OnTerminateGuest(int instance_id); |
| 76 void OnSetGuestVisibility(int instance_id, bool visible); | 74 void OnSetGuestVisibility(int instance_id, bool visible); |
| 77 void OnDragStatusUpdate(int instance_id, | 75 void OnDragStatusUpdate(int instance_id, |
| 78 WebKit::WebDragStatus drag_status, | 76 WebKit::WebDragStatus drag_status, |
| 79 const WebDropData& drop_data, | 77 const WebDropData& drop_data, |
| 80 WebKit::WebDragOperationsMask drag_mask, | 78 WebKit::WebDragOperationsMask drag_mask, |
| 81 const gfx::Point& location); | 79 const gfx::Point& location); |
| 82 | 80 |
| 83 BrowserPluginEmbedder* embedder_; | 81 BrowserPluginEmbedder* embedder_; |
| 84 | 82 |
| 85 DISALLOW_COPY_AND_ASSIGN(BrowserPluginEmbedderHelper); | 83 DISALLOW_COPY_AND_ASSIGN(BrowserPluginEmbedderHelper); |
| 86 }; | 84 }; |
| 87 | 85 |
| 88 } // namespace content | 86 } // namespace content |
| 89 | 87 |
| 90 #endif // CONTENT_BROWSER_BROWSER_PLUGIN_BROWSER_PLUGIN_EMBEDDER_HELPER_H_ | 88 #endif // CONTENT_BROWSER_BROWSER_PLUGIN_BROWSER_PLUGIN_EMBEDDER_HELPER_H_ |
| OLD | NEW |