Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef CHROME_RENDERER_PLUGINS_PLUGIN_PLACEHOLDER_H_ | |
| 6 #define CHROME_RENDERER_PLUGINS_PLUGIN_PLACEHOLDER_H_ | |
| 7 #pragma once | |
| 8 | |
| 9 #include "content/public/renderer/render_view_observer.h" | |
| 10 #include "third_party/WebKit/Source/WebKit/chromium/public/WebPluginParams.h" | |
| 11 #include "webkit/glue/cpp_bound_class.h" | |
| 12 #include "webkit/plugins/npapi/webview_plugin.h" | |
| 13 | |
| 14 namespace webkit { | |
| 15 struct WebPluginInfo; | |
| 16 } | |
| 17 | |
| 18 class PluginPlaceholder : public content::RenderViewObserver, | |
|
battre
2011/11/22 09:57:15
Add a short description of this class? Why would y
Bernhard Bauer
2011/11/22 17:04:49
Done.
| |
| 19 public CppBoundClass, | |
| 20 public webkit::npapi::WebViewPlugin::Delegate { | |
| 21 protected: | |
| 22 PluginPlaceholder(content::RenderView* render_view, | |
|
battre
2011/11/22 09:57:15
Document owernship of passed pointers?
Bernhard Bauer
2011/11/22 17:04:49
Done.
| |
| 23 WebKit::WebFrame* frame, | |
| 24 const WebKit::WebPluginParams& params, | |
| 25 const std::string& html_data); | |
| 26 virtual ~PluginPlaceholder(); | |
| 27 | |
| 28 webkit::npapi::WebViewPlugin* plugin() { return plugin_; } | |
| 29 WebKit::WebFrame* frame() { return frame_; } | |
| 30 | |
| 31 void LoadPlugin(const webkit::WebPluginInfo& plugin_info); | |
|
battre
2011/11/22 09:57:15
Please rename these functions if they occur with t
Bernhard Bauer
2011/11/22 17:04:49
...Internal?
| |
| 32 void HidePlugin(); | |
| 33 | |
| 34 // WebViewPlugin::Delegate methods: | |
| 35 virtual void BindWebFrame(WebKit::WebFrame* frame) OVERRIDE; | |
| 36 virtual void WillDestroyPlugin() OVERRIDE; | |
| 37 | |
| 38 private: | |
| 39 WebKit::WebFrame* frame_; | |
| 40 WebKit::WebPluginParams plugin_params_; | |
| 41 webkit::npapi::WebViewPlugin* plugin_; | |
| 42 | |
| 43 DISALLOW_COPY_AND_ASSIGN(PluginPlaceholder); | |
| 44 }; | |
| 45 | |
| 46 #endif // CHROME_RENDERER_PLUGINS_PLUGIN_PLACEHOLDER_H_ | |
| OLD | NEW |