| 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_DidReceiveResponseParams; | 22 struct PluginMsg_DidReceiveResponseParams; |
| 24 struct PluginMsg_FetchURL_Params; | 23 struct PluginMsg_FetchURL_Params; |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 68 void OnDidReceiveData(int id, const std::vector<char>& buffer, | 67 void OnDidReceiveData(int id, const std::vector<char>& buffer, |
| 69 int data_offset); | 68 int data_offset); |
| 70 void OnDidFinishLoading(int id); | 69 void OnDidFinishLoading(int id); |
| 71 void OnDidFail(int id); | 70 void OnDidFail(int id); |
| 72 void OnSetFocus(bool focused); | 71 void OnSetFocus(bool focused); |
| 73 void OnHandleInputEvent(const blink::WebInputEvent* event, | 72 void OnHandleInputEvent(const blink::WebInputEvent* event, |
| 74 bool* handled, WebCursor* cursor); | 73 bool* handled, WebCursor* cursor); |
| 75 void OnPaint(const gfx::Rect& damaged_rect); | 74 void OnPaint(const gfx::Rect& damaged_rect); |
| 76 void OnDidPaint(); | 75 void OnDidPaint(); |
| 77 void OnUpdateGeometry(const PluginMsg_UpdateGeometry_Param& param); | 76 void OnUpdateGeometry(const PluginMsg_UpdateGeometry_Param& param); |
| 78 void OnGetPluginScriptableObject(int* route_id); | |
| 79 void OnGetFormValue(base::string16* value, bool* success); | 77 void OnGetFormValue(base::string16* value, bool* success); |
| 80 | 78 |
| 81 void OnSetContentAreaFocus(bool has_focus); | 79 void OnSetContentAreaFocus(bool has_focus); |
| 82 #if defined(OS_WIN) && !defined(USE_AURA) | 80 #if defined(OS_WIN) && !defined(USE_AURA) |
| 83 void OnImeCompositionUpdated(const base::string16& text, | 81 void OnImeCompositionUpdated(const base::string16& text, |
| 84 const std::vector<int>& clauses, | 82 const std::vector<int>& clauses, |
| 85 const std::vector<int>& target, | 83 const std::vector<int>& target, |
| 86 int cursor_position); | 84 int cursor_position); |
| 87 void OnImeCompositionCompleted(const base::string16& text); | 85 void OnImeCompositionCompleted(const base::string16& text); |
| 88 #endif | 86 #endif |
| 89 #if defined(OS_MACOSX) | 87 #if defined(OS_MACOSX) |
| 90 void OnSetWindowFocus(bool has_focus); | 88 void OnSetWindowFocus(bool has_focus); |
| 91 void OnContainerHidden(); | 89 void OnContainerHidden(); |
| 92 void OnContainerShown(gfx::Rect window_frame, gfx::Rect view_frame, | 90 void OnContainerShown(gfx::Rect window_frame, gfx::Rect view_frame, |
| 93 bool has_focus); | 91 bool has_focus); |
| 94 void OnWindowFrameChanged(const gfx::Rect& window_frame, | 92 void OnWindowFrameChanged(const gfx::Rect& window_frame, |
| 95 const gfx::Rect& view_frame); | 93 const gfx::Rect& view_frame); |
| 96 void OnImeCompositionCompleted(const base::string16& text); | 94 void OnImeCompositionCompleted(const base::string16& text); |
| 97 #endif | 95 #endif |
| 98 | 96 |
| 99 std::string mime_type_; | 97 std::string mime_type_; |
| 100 int instance_id_; | 98 int instance_id_; |
| 101 | 99 |
| 102 scoped_refptr<PluginChannel> channel_; | 100 scoped_refptr<PluginChannel> channel_; |
| 103 | 101 |
| 104 base::WeakPtr<NPObjectStub> plugin_scriptable_object_; | |
| 105 WebPluginDelegateImpl* delegate_; | 102 WebPluginDelegateImpl* delegate_; |
| 106 WebPluginProxy* webplugin_; | 103 WebPluginProxy* webplugin_; |
| 107 bool in_destructor_; | 104 bool in_destructor_; |
| 108 | 105 |
| 109 // The url of the main frame hosting the plugin. | 106 // The url of the main frame hosting the plugin. |
| 110 GURL page_url_; | 107 GURL page_url_; |
| 111 | 108 |
| 112 DISALLOW_IMPLICIT_CONSTRUCTORS(WebPluginDelegateStub); | 109 DISALLOW_IMPLICIT_CONSTRUCTORS(WebPluginDelegateStub); |
| 113 }; | 110 }; |
| 114 | 111 |
| 115 } // namespace content | 112 } // namespace content |
| 116 | 113 |
| 117 #endif // CONTENT_PLUGIN_WEBPLUGIN_DELEGATE_STUB_H_ | 114 #endif // CONTENT_PLUGIN_WEBPLUGIN_DELEGATE_STUB_H_ |
| OLD | NEW |