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_PLUGIN_WEBPLUGIN_DELEGATE_STUB_H_ | 5 #ifndef CONTENT_PLUGIN_WEBPLUGIN_DELEGATE_STUB_H_ |
6 #define CONTENT_PLUGIN_WEBPLUGIN_DELEGATE_STUB_H_ | 6 #define CONTENT_PLUGIN_WEBPLUGIN_DELEGATE_STUB_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
11 #include "base/macros.h" | 11 #include "base/macros.h" |
12 #include "base/memory/ref_counted.h" | 12 #include "base/memory/ref_counted.h" |
13 #include "build/build_config.h" | 13 #include "build/build_config.h" |
14 #include "content/child/npapi/npobject_stub.h" | |
15 #include "ipc/ipc_listener.h" | 14 #include "ipc/ipc_listener.h" |
16 #include "ipc/ipc_sender.h" | 15 #include "ipc/ipc_sender.h" |
17 #include "third_party/npapi/bindings/npapi.h" | 16 #include "third_party/npapi/bindings/npapi.h" |
18 #include "ui/gfx/geometry/rect.h" | 17 #include "ui/gfx/geometry/rect.h" |
19 #include "ui/gfx/native_widget_types.h" | 18 #include "ui/gfx/native_widget_types.h" |
20 #include "url/gurl.h" | 19 #include "url/gurl.h" |
21 | 20 |
22 struct PluginMsg_Init_Params; | 21 struct PluginMsg_Init_Params; |
23 struct PluginMsg_UpdateGeometry_Param; | 22 struct PluginMsg_UpdateGeometry_Param; |
24 | 23 |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
60 // renderer over the IPC channel. | 59 // renderer over the IPC channel. |
61 void OnInit(const PluginMsg_Init_Params& params, | 60 void OnInit(const PluginMsg_Init_Params& params, |
62 bool* transparent, | 61 bool* transparent, |
63 bool* result); | 62 bool* result); |
64 void OnSetFocus(bool focused); | 63 void OnSetFocus(bool focused); |
65 void OnHandleInputEvent(const blink::WebInputEvent* event, | 64 void OnHandleInputEvent(const blink::WebInputEvent* event, |
66 bool* handled, WebCursor* cursor); | 65 bool* handled, WebCursor* cursor); |
67 void OnPaint(const gfx::Rect& damaged_rect); | 66 void OnPaint(const gfx::Rect& damaged_rect); |
68 void OnDidPaint(); | 67 void OnDidPaint(); |
69 void OnUpdateGeometry(const PluginMsg_UpdateGeometry_Param& param); | 68 void OnUpdateGeometry(const PluginMsg_UpdateGeometry_Param& param); |
70 void OnGetPluginScriptableObject(int* route_id); | |
71 void OnGetFormValue(base::string16* value, bool* success); | 69 void OnGetFormValue(base::string16* value, bool* success); |
72 | 70 |
73 void OnSetContentAreaFocus(bool has_focus); | 71 void OnSetContentAreaFocus(bool has_focus); |
74 #if defined(OS_MACOSX) | 72 #if defined(OS_MACOSX) |
75 void OnSetWindowFocus(bool has_focus); | 73 void OnSetWindowFocus(bool has_focus); |
76 void OnContainerHidden(); | 74 void OnContainerHidden(); |
77 void OnContainerShown(gfx::Rect window_frame, gfx::Rect view_frame, | 75 void OnContainerShown(gfx::Rect window_frame, gfx::Rect view_frame, |
78 bool has_focus); | 76 bool has_focus); |
79 void OnWindowFrameChanged(const gfx::Rect& window_frame, | 77 void OnWindowFrameChanged(const gfx::Rect& window_frame, |
80 const gfx::Rect& view_frame); | 78 const gfx::Rect& view_frame); |
81 void OnImeCompositionCompleted(const base::string16& text); | 79 void OnImeCompositionCompleted(const base::string16& text); |
82 #endif | 80 #endif |
83 | 81 |
84 std::string mime_type_; | 82 std::string mime_type_; |
85 int instance_id_; | 83 int instance_id_; |
86 | 84 |
87 scoped_refptr<PluginChannel> channel_; | 85 scoped_refptr<PluginChannel> channel_; |
88 | 86 |
89 base::WeakPtr<NPObjectStub> plugin_scriptable_object_; | |
90 WebPluginDelegateImpl* delegate_; | 87 WebPluginDelegateImpl* delegate_; |
91 WebPluginProxy* webplugin_; | 88 WebPluginProxy* webplugin_; |
92 bool in_destructor_; | 89 bool in_destructor_; |
93 | 90 |
94 // The url of the main frame hosting the plugin. | 91 // The url of the main frame hosting the plugin. |
95 GURL page_url_; | 92 GURL page_url_; |
96 | 93 |
97 DISALLOW_IMPLICIT_CONSTRUCTORS(WebPluginDelegateStub); | 94 DISALLOW_IMPLICIT_CONSTRUCTORS(WebPluginDelegateStub); |
98 }; | 95 }; |
99 | 96 |
100 } // namespace content | 97 } // namespace content |
101 | 98 |
102 #endif // CONTENT_PLUGIN_WEBPLUGIN_DELEGATE_STUB_H_ | 99 #endif // CONTENT_PLUGIN_WEBPLUGIN_DELEGATE_STUB_H_ |
OLD | NEW |