| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_PLUGINS_NPAPI_WEBVIEW_PLUGIN_H_ | 5 #ifndef WEBKIT_PLUGINS_NPAPI_WEBVIEW_PLUGIN_H_ |
| 6 #define WEBKIT_PLUGINS_NPAPI_WEBVIEW_PLUGIN_H_ | 6 #define WEBKIT_PLUGINS_NPAPI_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" |
| (...skipping 29 matching lines...) Expand all Loading... |
| 40 // Bind |frame| to a Javascript object, enabling the delegate to receive | 40 // Bind |frame| to a Javascript object, enabling the delegate to receive |
| 41 // callback methods from Javascript inside the WebFrame. | 41 // callback methods from Javascript inside the WebFrame. |
| 42 // This method is called from WebFrameClient::didClearWindowObject. | 42 // This method is called from WebFrameClient::didClearWindowObject. |
| 43 virtual void BindWebFrame(WebKit::WebFrame* frame) = 0; | 43 virtual void BindWebFrame(WebKit::WebFrame* frame) = 0; |
| 44 | 44 |
| 45 // Called before the WebViewPlugin is destroyed. The delegate should delete | 45 // Called before the WebViewPlugin is destroyed. The delegate should delete |
| 46 // itself here. | 46 // itself here. |
| 47 virtual void WillDestroyPlugin() = 0; | 47 virtual void WillDestroyPlugin() = 0; |
| 48 | 48 |
| 49 // Called upon a context menu event. | 49 // Called upon a context menu event. |
| 50 virtual void ShowContextMenu(const WebKit::WebMouseEvent&) = 0; | 50 virtual void ShowContextMenu(const WebKit::WebMouseEvent&) {} |
| 51 }; | 51 }; |
| 52 | 52 |
| 53 explicit WebViewPlugin(Delegate* delegate); | 53 explicit WebViewPlugin(Delegate* delegate); |
| 54 | 54 |
| 55 // Convenience method to set up a new WebViewPlugin using |preferences| | 55 // Convenience method to set up a new WebViewPlugin using |preferences| |
| 56 // and displaying |html_data|. |url| should be a (fake) chrome:// URL; it is | 56 // and displaying |html_data|. |url| should be a (fake) chrome:// URL; it is |
| 57 // only used for navigation and never actually resolved. | 57 // only used for navigation and never actually resolved. |
| 58 static WebViewPlugin* Create(Delegate* delegate, | 58 static WebViewPlugin* Create(Delegate* delegate, |
| 59 const WebPreferences& preferences, | 59 const WebPreferences& preferences, |
| 60 const std::string& html_data, | 60 const std::string& html_data, |
| (...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 150 std::list<std::string> data_; | 150 std::list<std::string> data_; |
| 151 bool finished_loading_; | 151 bool finished_loading_; |
| 152 scoped_ptr<WebKit::WebURLError> error_; | 152 scoped_ptr<WebKit::WebURLError> error_; |
| 153 WebKit::WebString old_title_; | 153 WebKit::WebString old_title_; |
| 154 }; | 154 }; |
| 155 | 155 |
| 156 } // namespace npapi | 156 } // namespace npapi |
| 157 } // namespace webkit | 157 } // namespace webkit |
| 158 | 158 |
| 159 #endif // WEBKIT_PLUGINS_NPAPI_WEBVIEW_PLUGIN_H_ | 159 #endif // WEBKIT_PLUGINS_NPAPI_WEBVIEW_PLUGIN_H_ |
| OLD | NEW |