| 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" | 14 #include "content/child/npapi/npobject_stub.h" |
| 15 #include "ipc/ipc_listener.h" | 15 #include "ipc/ipc_listener.h" |
| 16 #include "ipc/ipc_sender.h" | 16 #include "ipc/ipc_sender.h" |
| 17 #include "third_party/npapi/bindings/npapi.h" | 17 #include "third_party/npapi/bindings/npapi.h" |
| 18 #include "ui/gfx/geometry/rect.h" | 18 #include "ui/gfx/geometry/rect.h" |
| 19 #include "ui/gfx/native_widget_types.h" | 19 #include "ui/gfx/native_widget_types.h" |
| 20 #include "url/gurl.h" | 20 #include "url/gurl.h" |
| 21 | 21 |
| 22 struct PluginMsg_Init_Params; | 22 struct PluginMsg_Init_Params; |
| 23 struct PluginMsg_DidReceiveResponseParams; | |
| 24 struct PluginMsg_FetchURL_Params; | |
| 25 struct PluginMsg_UpdateGeometry_Param; | 23 struct PluginMsg_UpdateGeometry_Param; |
| 26 | 24 |
| 27 namespace blink { | 25 namespace blink { |
| 28 class WebInputEvent; | 26 class WebInputEvent; |
| 29 } | 27 } |
| 30 | 28 |
| 31 namespace content { | 29 namespace content { |
| 32 class PluginChannel; | 30 class PluginChannel; |
| 33 class WebCursor; | 31 class WebCursor; |
| 34 class WebPluginDelegateImpl; | 32 class WebPluginDelegateImpl; |
| (...skipping 21 matching lines...) Expand all Loading... |
| 56 private: | 54 private: |
| 57 friend class base::RefCounted<WebPluginDelegateStub>; | 55 friend class base::RefCounted<WebPluginDelegateStub>; |
| 58 | 56 |
| 59 ~WebPluginDelegateStub() override; | 57 ~WebPluginDelegateStub() override; |
| 60 | 58 |
| 61 // Message handlers for the WebPluginDelegate calls that are proxied from the | 59 // Message handlers for the WebPluginDelegate calls that are proxied from the |
| 62 // renderer over the IPC channel. | 60 // renderer over the IPC channel. |
| 63 void OnInit(const PluginMsg_Init_Params& params, | 61 void OnInit(const PluginMsg_Init_Params& params, |
| 64 bool* transparent, | 62 bool* transparent, |
| 65 bool* result); | 63 bool* result); |
| 66 void OnWillSendRequest(int id, const GURL& url, int http_status_code); | |
| 67 void OnDidReceiveResponse(const PluginMsg_DidReceiveResponseParams& params); | |
| 68 void OnDidReceiveData(int id, const std::vector<char>& buffer, | |
| 69 int data_offset); | |
| 70 void OnDidFinishLoading(int id); | |
| 71 void OnDidFail(int id); | |
| 72 void OnSetFocus(bool focused); | 64 void OnSetFocus(bool focused); |
| 73 void OnHandleInputEvent(const blink::WebInputEvent* event, | 65 void OnHandleInputEvent(const blink::WebInputEvent* event, |
| 74 bool* handled, WebCursor* cursor); | 66 bool* handled, WebCursor* cursor); |
| 75 void OnPaint(const gfx::Rect& damaged_rect); | 67 void OnPaint(const gfx::Rect& damaged_rect); |
| 76 void OnDidPaint(); | 68 void OnDidPaint(); |
| 77 void OnUpdateGeometry(const PluginMsg_UpdateGeometry_Param& param); | 69 void OnUpdateGeometry(const PluginMsg_UpdateGeometry_Param& param); |
| 78 void OnGetPluginScriptableObject(int* route_id); | 70 void OnGetPluginScriptableObject(int* route_id); |
| 79 void OnGetFormValue(base::string16* value, bool* success); | 71 void OnGetFormValue(base::string16* value, bool* success); |
| 80 | 72 |
| 81 void OnSetContentAreaFocus(bool has_focus); | 73 void OnSetContentAreaFocus(bool has_focus); |
| (...skipping 26 matching lines...) Expand all Loading... |
| 108 | 100 |
| 109 // The url of the main frame hosting the plugin. | 101 // The url of the main frame hosting the plugin. |
| 110 GURL page_url_; | 102 GURL page_url_; |
| 111 | 103 |
| 112 DISALLOW_IMPLICIT_CONSTRUCTORS(WebPluginDelegateStub); | 104 DISALLOW_IMPLICIT_CONSTRUCTORS(WebPluginDelegateStub); |
| 113 }; | 105 }; |
| 114 | 106 |
| 115 } // namespace content | 107 } // namespace content |
| 116 | 108 |
| 117 #endif // CONTENT_PLUGIN_WEBPLUGIN_DELEGATE_STUB_H_ | 109 #endif // CONTENT_PLUGIN_WEBPLUGIN_DELEGATE_STUB_H_ |
| OLD | NEW |