Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(48)

Side by Side Diff: components/plugins/renderer/webview_plugin.h

Issue 116163008: Move the plugin placeholder from CppBoundClass to gin::Wrappable (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 22 matching lines...) Expand all
33 public blink::WebViewClient, 33 public blink::WebViewClient,
34 public blink::WebFrameClient { 34 public blink::WebFrameClient {
35 public: 35 public:
36 class Delegate { 36 class Delegate {
37 public: 37 public:
38 // Bind |frame| to a Javascript object, enabling the delegate to receive 38 // Bind |frame| to a Javascript object, enabling the delegate to receive
39 // callback methods from Javascript inside the WebFrame. 39 // callback methods from Javascript inside the WebFrame.
40 // This method is called from WebFrameClient::didClearWindowObject. 40 // This method is called from WebFrameClient::didClearWindowObject.
41 virtual void BindWebFrame(blink::WebFrame* frame) = 0; 41 virtual void BindWebFrame(blink::WebFrame* frame) = 0;
42 42
43 // Called before the WebViewPlugin is destroyed. The delegate should delete
44 // itself here.
45 virtual void WillDestroyPlugin() = 0;
46
47 // Called upon a context menu event. 43 // Called upon a context menu event.
48 virtual void ShowContextMenu(const blink::WebMouseEvent&) = 0; 44 virtual void ShowContextMenu(const blink::WebMouseEvent&) = 0;
49 }; 45 };
50 46
51 explicit WebViewPlugin(Delegate* delegate); 47 explicit WebViewPlugin(Delegate* delegate);
52 48
53 // Convenience method to set up a new WebViewPlugin using |preferences| 49 // Convenience method to set up a new WebViewPlugin using |preferences|
54 // and displaying |html_data|. |url| should be a (fake) chrome:// URL; it is 50 // and displaying |html_data|. |url| should be a (fake) chrome:// URL; it is
55 // only used for navigation and never actually resolved. 51 // only used for navigation and never actually resolved.
56 static WebViewPlugin* Create(Delegate* delegate, 52 static WebViewPlugin* Create(Delegate* delegate,
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
146 gfx::Rect rect_; 142 gfx::Rect rect_;
147 143
148 blink::WebURLResponse response_; 144 blink::WebURLResponse response_;
149 std::list<std::string> data_; 145 std::list<std::string> data_;
150 bool finished_loading_; 146 bool finished_loading_;
151 scoped_ptr<blink::WebURLError> error_; 147 scoped_ptr<blink::WebURLError> error_;
152 blink::WebString old_title_; 148 blink::WebString old_title_;
153 }; 149 };
154 150
155 #endif // COMPONENTS_PLUGINS_RENDERER_WEBVIEW_PLUGIN_H_ 151 #endif // COMPONENTS_PLUGINS_RENDERER_WEBVIEW_PLUGIN_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698