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_GUEST_HELPER_H_ | 5 #ifndef CONTENT_BROWSER_BROWSER_PLUGIN_BROWSER_PLUGIN_GUEST_HELPER_H_ |
6 #define CONTENT_BROWSER_BROWSER_PLUGIN_BROWSER_PLUGIN_GUEST_HELPER_H_ | 6 #define CONTENT_BROWSER_BROWSER_PLUGIN_BROWSER_PLUGIN_GUEST_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/browser/browser_plugin/browser_plugin_guest.h" | 11 #include "content/browser/browser_plugin/browser_plugin_guest.h" |
12 #include "content/public/browser/render_view_host_observer.h" | 12 #include "content/public/browser/render_view_host_observer.h" |
13 #include "content/public/browser/notification_observer.h" | 13 #include "content/public/browser/notification_observer.h" |
14 #include "content/public/browser/web_contents_observer.h" | 14 #include "content/public/browser/web_contents_observer.h" |
15 #include "content/public/browser/notification_registrar.h" | 15 #include "content/public/browser/notification_registrar.h" |
16 #include "ipc/ipc_channel_handle.h" | 16 #include "ipc/ipc_channel_handle.h" |
17 #include "ipc/ipc_sync_message.h" | 17 #include "ipc/ipc_sync_message.h" |
18 #include "third_party/WebKit/Source/WebKit/chromium/public/WebInputEvent.h" | 18 #include "third_party/WebKit/Source/WebKit/chromium/public/WebInputEvent.h" |
19 #include "ui/surface/transport_dib.h" | 19 #include "ui/surface/transport_dib.h" |
20 #include "webkit/glue/webcursor.h" | 20 #include "webkit/glue/webcursor.h" |
21 | 21 |
22 namespace gfx { | 22 namespace gfx { |
23 class Size; | 23 class Size; |
24 } | 24 } |
25 | 25 |
26 struct BrowserPluginHostMsg_ResizeGuest_Params; | 26 struct BrowserPluginHostMsg_ResizeGuest_Params; |
| 27 struct ViewMsg_PostMessage_Params; |
27 struct ViewHostMsg_UpdateRect_Params; | 28 struct ViewHostMsg_UpdateRect_Params; |
28 | 29 |
29 namespace content { | 30 namespace content { |
30 | 31 |
31 class RenderViewHost; | 32 class RenderViewHost; |
32 | 33 |
33 // Helper for browser plugin guest. | 34 // Helper for browser plugin guest. |
34 // | 35 // |
35 // It overrides different WebContents messages that require special treatment | 36 // It overrides different WebContents messages that require special treatment |
36 // for a WebContents to act as a guest. All functionality is handled by its | 37 // for a WebContents to act as a guest. All functionality is handled by its |
(...skipping 14 matching lines...) Expand all Loading... |
51 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; | 52 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; |
52 | 53 |
53 private: | 54 private: |
54 // Message handlers | 55 // Message handlers |
55 void OnUpdateRect(const ViewHostMsg_UpdateRect_Params& params); | 56 void OnUpdateRect(const ViewHostMsg_UpdateRect_Params& params); |
56 void OnHandleInputEventAck(WebKit::WebInputEvent::Type event_type, | 57 void OnHandleInputEventAck(WebKit::WebInputEvent::Type event_type, |
57 bool processed); | 58 bool processed); |
58 void OnTakeFocus(bool reverse); | 59 void OnTakeFocus(bool reverse); |
59 void OnShowWidget(int route_id, const gfx::Rect& initial_pos); | 60 void OnShowWidget(int route_id, const gfx::Rect& initial_pos); |
60 void OnSetCursor(const WebCursor& cursor); | 61 void OnSetCursor(const WebCursor& cursor); |
| 62 void OnRouteMessageEvent(const ViewMsg_PostMessage_Params& params); |
61 | 63 |
62 BrowserPluginGuest* guest_; | 64 BrowserPluginGuest* guest_; |
63 // A scoped container for notification registries. | 65 // A scoped container for notification registries. |
64 NotificationRegistrar registrar_; | 66 NotificationRegistrar registrar_; |
65 | 67 |
66 DISALLOW_COPY_AND_ASSIGN(BrowserPluginGuestHelper); | 68 DISALLOW_COPY_AND_ASSIGN(BrowserPluginGuestHelper); |
67 }; | 69 }; |
68 | 70 |
69 } // namespace content | 71 } // namespace content |
70 | 72 |
71 #endif // CONTENT_BROWSER_BROWSER_PLUGIN_BROWSER_PLUGIN_GUEST_HELPER_H_ | 73 #endif // CONTENT_BROWSER_BROWSER_PLUGIN_BROWSER_PLUGIN_GUEST_HELPER_H_ |
OLD | NEW |