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 CHROME_RENDERER_PLUGINS_WEBVIEW_PLUGIN_H_ | 5 #ifndef CHROME_RENDERER_PLUGINS_WEBVIEW_PLUGIN_H_ |
6 #define CHROME_RENDERER_PLUGINS_WEBVIEW_PLUGIN_H_ | 6 #define CHROME_RENDERER_PLUGINS_WEBVIEW_PLUGIN_H_ |
7 | 7 |
8 #include <list> | 8 #include <list> |
9 | 9 |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
11 #include "base/sequenced_task_runner_helpers.h" | 11 #include "base/sequenced_task_runner_helpers.h" |
12 #include "third_party/WebKit/Source/Platform/chromium/public/WebString.h" | 12 #include "third_party/WebKit/Source/Platform/chromium/public/WebString.h" |
13 #include "third_party/WebKit/Source/Platform/chromium/public/WebURLResponse.h" | 13 #include "third_party/WebKit/Source/Platform/chromium/public/WebURLResponse.h" |
14 #include "third_party/WebKit/Source/WebKit/chromium/public/WebCursorInfo.h" | 14 #include "third_party/WebKit/Source/WebKit/chromium/public/WebCursorInfo.h" |
15 #include "third_party/WebKit/Source/WebKit/chromium/public/WebFrameClient.h" | 15 #include "third_party/WebKit/Source/WebKit/chromium/public/WebFrameClient.h" |
16 #include "third_party/WebKit/Source/WebKit/chromium/public/WebPlugin.h" | 16 #include "third_party/WebKit/Source/WebKit/chromium/public/WebPlugin.h" |
17 #include "third_party/WebKit/Source/WebKit/chromium/public/WebViewClient.h" | 17 #include "third_party/WebKit/Source/WebKit/chromium/public/WebViewClient.h" |
| 18 #include "third_party/npapi/bindings/npruntime.h" |
18 | 19 |
19 struct WebPreferences; | 20 struct WebPreferences; |
20 | 21 |
21 namespace WebKit { | 22 namespace WebKit { |
22 class WebMouseEvent; | 23 class WebMouseEvent; |
23 } | 24 } |
24 | 25 |
25 // This class implements the WebPlugin interface by forwarding drawing and | 26 // This class implements the WebPlugin interface by forwarding drawing and |
26 // handling input events to a WebView. | 27 // handling input events to a WebView. |
27 // It can be used as a placeholder for an actual plugin, using HTML for the UI. | 28 // It can be used as a placeholder for an actual plugin, using HTML for the UI. |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
67 void ReplayReceivedData(WebKit::WebPlugin* plugin); | 68 void ReplayReceivedData(WebKit::WebPlugin* plugin); |
68 | 69 |
69 void RestoreTitleText(); | 70 void RestoreTitleText(); |
70 | 71 |
71 // WebPlugin methods: | 72 // WebPlugin methods: |
72 virtual WebKit::WebPluginContainer* container() const; | 73 virtual WebKit::WebPluginContainer* container() const; |
73 virtual bool initialize(WebKit::WebPluginContainer*); | 74 virtual bool initialize(WebKit::WebPluginContainer*); |
74 virtual void destroy(); | 75 virtual void destroy(); |
75 | 76 |
76 virtual NPObject* scriptableObject(); | 77 virtual NPObject* scriptableObject(); |
| 78 virtual NPP pluginNPP(); |
| 79 |
77 virtual bool getFormValue(WebKit::WebString& value); | 80 virtual bool getFormValue(WebKit::WebString& value); |
78 | 81 |
79 virtual void paint(WebKit::WebCanvas* canvas, const WebKit::WebRect& rect); | 82 virtual void paint(WebKit::WebCanvas* canvas, const WebKit::WebRect& rect); |
80 | 83 |
81 // Coordinates are relative to the containing window. | 84 // Coordinates are relative to the containing window. |
82 virtual void updateGeometry( | 85 virtual void updateGeometry( |
83 const WebKit::WebRect& frame_rect, const WebKit::WebRect& clip_rect, | 86 const WebKit::WebRect& frame_rect, const WebKit::WebRect& clip_rect, |
84 const WebKit::WebVector<WebKit::WebRect>& cut_out_rects, bool is_visible); | 87 const WebKit::WebVector<WebKit::WebRect>& cut_out_rects, bool is_visible); |
85 | 88 |
86 virtual void updateFocus(bool) {} | 89 virtual void updateFocus(bool) {} |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
149 gfx::Rect rect_; | 152 gfx::Rect rect_; |
150 | 153 |
151 WebKit::WebURLResponse response_; | 154 WebKit::WebURLResponse response_; |
152 std::list<std::string> data_; | 155 std::list<std::string> data_; |
153 bool finished_loading_; | 156 bool finished_loading_; |
154 scoped_ptr<WebKit::WebURLError> error_; | 157 scoped_ptr<WebKit::WebURLError> error_; |
155 WebKit::WebString old_title_; | 158 WebKit::WebString old_title_; |
156 }; | 159 }; |
157 | 160 |
158 #endif // CHROME_RENDERER_PLUGINS_WEBVIEW_PLUGIN_H_ | 161 #endif // CHROME_RENDERER_PLUGINS_WEBVIEW_PLUGIN_H_ |
OLD | NEW |