| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 COMPONENTS_PLUGINS_RENDERER_WEBVIEW_PLUGIN_H_ | 5 #ifndef COMPONENTS_PLUGINS_RENDERER_WEBVIEW_PLUGIN_H_ |
| 6 #define COMPONENTS_PLUGINS_RENDERER_WEBVIEW_PLUGIN_H_ | 6 #define COMPONENTS_PLUGINS_RENDERER_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 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 49 // Called upon a context menu event. | 49 // Called upon a context menu event. |
| 50 virtual void ShowContextMenu(const blink::WebMouseEvent&) = 0; | 50 virtual void ShowContextMenu(const blink::WebMouseEvent&) = 0; |
| 51 | 51 |
| 52 // Called when the WebViewPlugin is destroyed. | 52 // Called when the WebViewPlugin is destroyed. |
| 53 virtual void PluginDestroyed() = 0; | 53 virtual void PluginDestroyed() = 0; |
| 54 | 54 |
| 55 // Called to enable JavaScript pass-through to a throttled plugin, which is | 55 // Called to enable JavaScript pass-through to a throttled plugin, which is |
| 56 // loaded but idle. Doesn't work for blocked plugins, which is not loaded. | 56 // loaded but idle. Doesn't work for blocked plugins, which is not loaded. |
| 57 virtual v8::Local<v8::Object> GetV8ScriptableObject(v8::Isolate*) const = 0; | 57 virtual v8::Local<v8::Object> GetV8ScriptableObject(v8::Isolate*) const = 0; |
| 58 | 58 |
| 59 // Called when the unobscured size of the plugin is updated. | 59 // Called when the unobscured rect of the plugin is updated. |
| 60 virtual void OnUnobscuredSizeUpdate(const gfx::Size& unobscured_size) {} | 60 virtual void OnUnobscuredRectUpdate(const gfx::Rect& unobscured_rect) {} |
| 61 }; | 61 }; |
| 62 | 62 |
| 63 // Convenience method to set up a new WebViewPlugin using |preferences| | 63 // Convenience method to set up a new WebViewPlugin using |preferences| |
| 64 // and displaying |html_data|. |url| should be a (fake) data:text/html URL; | 64 // and displaying |html_data|. |url| should be a (fake) data:text/html URL; |
| 65 // it is only used for navigation and never actually resolved. | 65 // it is only used for navigation and never actually resolved. |
| 66 static WebViewPlugin* Create(Delegate* delegate, | 66 static WebViewPlugin* Create(Delegate* delegate, |
| 67 const content::WebPreferences& preferences, | 67 const content::WebPreferences& preferences, |
| 68 const std::string& html_data, | 68 const std::string& html_data, |
| 69 const GURL& url); | 69 const GURL& url); |
| 70 | 70 |
| (...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 169 | 169 |
| 170 blink::WebURLResponse response_; | 170 blink::WebURLResponse response_; |
| 171 std::list<std::string> data_; | 171 std::list<std::string> data_; |
| 172 bool finished_loading_; | 172 bool finished_loading_; |
| 173 scoped_ptr<blink::WebURLError> error_; | 173 scoped_ptr<blink::WebURLError> error_; |
| 174 blink::WebString old_title_; | 174 blink::WebString old_title_; |
| 175 bool focused_; | 175 bool focused_; |
| 176 }; | 176 }; |
| 177 | 177 |
| 178 #endif // COMPONENTS_PLUGINS_RENDERER_WEBVIEW_PLUGIN_H_ | 178 #endif // COMPONENTS_PLUGINS_RENDERER_WEBVIEW_PLUGIN_H_ |
| OLD | NEW |