| 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_GLUE_PLUGINS_WEBVIEW_PLUGIN_H_ |
| 6 #define WEBKIT_GLUE_PLUGINS_WEBVIEW_PLUGIN_H_ | 6 #define WEBKIT_GLUE_PLUGINS_WEBVIEW_PLUGIN_H_ |
| 7 | 7 |
| 8 #include <list> |
| 9 |
| 8 #include "base/scoped_ptr.h" | 10 #include "base/scoped_ptr.h" |
| 9 #include "base/task.h" | 11 #include "base/task.h" |
| 10 #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" |
| 11 #include "third_party/WebKit/WebKit/chromium/public/WebPlugin.h" | 14 #include "third_party/WebKit/WebKit/chromium/public/WebPlugin.h" |
| 12 #include "third_party/WebKit/WebKit/chromium/public/WebFrameClient.h" | 15 #include "third_party/WebKit/WebKit/chromium/public/WebURLResponse.h" |
| 13 #include "third_party/WebKit/WebKit/chromium/public/WebViewClient.h" | 16 #include "third_party/WebKit/WebKit/chromium/public/WebViewClient.h" |
| 14 | 17 |
| 15 // This class implements the WebPlugin interface by forwarding drawing and | 18 // This class implements the WebPlugin interface by forwarding drawing and |
| 16 // handling input events to a WebView. | 19 // handling input events to a WebView. |
| 17 // It can be used as a placeholder for an actual plugin, using HTML for the UI. | 20 // It can be used as a placeholder for an actual plugin, using HTML for the UI. |
| 18 // To show HTML data inside the WebViewPlugin, | 21 // To show HTML data inside the WebViewPlugin, |
| 19 // call web_view->mainFrame()->loadHTMLString() with the HTML data and a fake | 22 // call web_view->mainFrame()->loadHTMLString() with the HTML data and a fake |
| 20 // chrome:// URL as origin. | 23 // chrome:// URL as origin. |
| 21 | 24 |
| 22 class WebViewPlugin: public WebKit::WebPlugin, public WebKit::WebViewClient, | 25 class WebViewPlugin: public WebKit::WebPlugin, public WebKit::WebViewClient, |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 101 private: | 104 private: |
| 102 friend class DeleteTask<WebViewPlugin>; | 105 friend class DeleteTask<WebViewPlugin>; |
| 103 virtual ~WebViewPlugin(); | 106 virtual ~WebViewPlugin(); |
| 104 | 107 |
| 105 Delegate* delegate_; | 108 Delegate* delegate_; |
| 106 WebKit::WebCursorInfo current_cursor_; | 109 WebKit::WebCursorInfo current_cursor_; |
| 107 WebKit::WebPluginContainer* container_; | 110 WebKit::WebPluginContainer* container_; |
| 108 WebKit::WebView* web_view_; | 111 WebKit::WebView* web_view_; |
| 109 gfx::Rect rect_; | 112 gfx::Rect rect_; |
| 110 | 113 |
| 111 scoped_ptr<WebKit::WebURLResponse> response_; | 114 WebKit::WebURLResponse response_; |
| 112 std::string data_; | 115 std::list<std::string> data_; |
| 113 bool finished_loading_; | 116 bool finished_loading_; |
| 114 scoped_ptr<WebKit::WebURLError> error_; | 117 scoped_ptr<WebKit::WebURLError> error_; |
| 115 }; | 118 }; |
| 116 | 119 |
| 117 #endif // WEBKIT_GLUE_PLUGINS_WEBVIEW_PLUGIN_H_ | 120 #endif // WEBKIT_GLUE_PLUGINS_WEBVIEW_PLUGIN_H_ |
| OLD | NEW |