| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 WEBKIT_GLUE_PLUGINS_WEBVIEW_PLUGIN_H_ | 5 #ifndef WEBKIT_PLUGINS_NPAPI_WEBVIEW_PLUGIN_H_ |
| 6 #define WEBKIT_GLUE_PLUGINS_WEBVIEW_PLUGIN_H_ | 6 #define WEBKIT_PLUGINS_NPAPI_WEBVIEW_PLUGIN_H_ |
| 7 | 7 |
| 8 #include <list> | 8 #include <list> |
| 9 | 9 |
| 10 #include "base/scoped_ptr.h" | 10 #include "base/scoped_ptr.h" |
| 11 #include "base/task.h" | 11 #include "base/task.h" |
| 12 #include "third_party/WebKit/WebKit/chromium/public/WebCursorInfo.h" | 12 #include "third_party/WebKit/WebKit/chromium/public/WebCursorInfo.h" |
| 13 #include "third_party/WebKit/WebKit/chromium/public/WebFrameClient.h" | 13 #include "third_party/WebKit/WebKit/chromium/public/WebFrameClient.h" |
| 14 #include "third_party/WebKit/WebKit/chromium/public/WebPlugin.h" | 14 #include "third_party/WebKit/WebKit/chromium/public/WebPlugin.h" |
| 15 #include "third_party/WebKit/WebKit/chromium/public/WebString.h" | 15 #include "third_party/WebKit/WebKit/chromium/public/WebString.h" |
| 16 #include "third_party/WebKit/WebKit/chromium/public/WebTextDirection.h" | 16 #include "third_party/WebKit/WebKit/chromium/public/WebTextDirection.h" |
| 17 #include "third_party/WebKit/WebKit/chromium/public/WebURLResponse.h" | 17 #include "third_party/WebKit/WebKit/chromium/public/WebURLResponse.h" |
| 18 #include "third_party/WebKit/WebKit/chromium/public/WebViewClient.h" | 18 #include "third_party/WebKit/WebKit/chromium/public/WebViewClient.h" |
| 19 | 19 |
| 20 namespace WebKit { | 20 namespace WebKit { |
| 21 class WebMouseEvent; | 21 class WebMouseEvent; |
| 22 } | 22 } |
| 23 struct WebPreferences; | 23 struct WebPreferences; |
| 24 | 24 |
| 25 namespace webkit { |
| 26 namespace npapi { |
| 27 |
| 25 // This class implements the WebPlugin interface by forwarding drawing and | 28 // This class implements the WebPlugin interface by forwarding drawing and |
| 26 // handling input events to a WebView. | 29 // handling input events to a WebView. |
| 27 // It can be used as a placeholder for an actual plugin, using HTML for the UI. | 30 // It can be used as a placeholder for an actual plugin, using HTML for the UI. |
| 28 // To show HTML data inside the WebViewPlugin, | 31 // To show HTML data inside the WebViewPlugin, |
| 29 // call web_view->mainFrame()->loadHTMLString() with the HTML data and a fake | 32 // call web_view->mainFrame()->loadHTMLString() with the HTML data and a fake |
| 30 // chrome:// URL as origin. | 33 // chrome:// URL as origin. |
| 31 | 34 |
| 32 class WebViewPlugin: public WebKit::WebPlugin, public WebKit::WebViewClient, | 35 class WebViewPlugin: public WebKit::WebPlugin, public WebKit::WebViewClient, |
| 33 public WebKit::WebFrameClient { | 36 public WebKit::WebFrameClient { |
| 34 public: | 37 public: |
| (...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 132 WebKit::WebView* web_view_; | 135 WebKit::WebView* web_view_; |
| 133 gfx::Rect rect_; | 136 gfx::Rect rect_; |
| 134 | 137 |
| 135 WebKit::WebURLResponse response_; | 138 WebKit::WebURLResponse response_; |
| 136 std::list<std::string> data_; | 139 std::list<std::string> data_; |
| 137 bool finished_loading_; | 140 bool finished_loading_; |
| 138 scoped_ptr<WebKit::WebURLError> error_; | 141 scoped_ptr<WebKit::WebURLError> error_; |
| 139 WebKit::WebString old_title_; | 142 WebKit::WebString old_title_; |
| 140 }; | 143 }; |
| 141 | 144 |
| 142 #endif // WEBKIT_GLUE_PLUGINS_WEBVIEW_PLUGIN_H_ | 145 } // namespace npapi |
| 146 } // namespace webkit |
| 147 |
| 148 #endif // WEBKIT_PLUGINS_NPAPI_WEBVIEW_PLUGIN_H_ |
| OLD | NEW |