Chromium Code Reviews| Index: chrome/renderer/plugins/plugin_placeholder.h |
| diff --git a/chrome/renderer/plugins/plugin_placeholder.h b/chrome/renderer/plugins/plugin_placeholder.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..0affa5871870098341c2620d841502dd0ea2efc5 |
| --- /dev/null |
| +++ b/chrome/renderer/plugins/plugin_placeholder.h |
| @@ -0,0 +1,46 @@ |
| +// Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef CHROME_RENDERER_PLUGINS_PLUGIN_PLACEHOLDER_H_ |
| +#define CHROME_RENDERER_PLUGINS_PLUGIN_PLACEHOLDER_H_ |
| +#pragma once |
| + |
| +#include "content/public/renderer/render_view_observer.h" |
| +#include "third_party/WebKit/Source/WebKit/chromium/public/WebPluginParams.h" |
| +#include "webkit/glue/cpp_bound_class.h" |
| +#include "webkit/plugins/npapi/webview_plugin.h" |
| + |
| +namespace webkit { |
| +struct WebPluginInfo; |
| +} |
| + |
| +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.
|
| + public CppBoundClass, |
| + public webkit::npapi::WebViewPlugin::Delegate { |
| + protected: |
| + 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.
|
| + WebKit::WebFrame* frame, |
| + const WebKit::WebPluginParams& params, |
| + const std::string& html_data); |
| + virtual ~PluginPlaceholder(); |
| + |
| + webkit::npapi::WebViewPlugin* plugin() { return plugin_; } |
| + WebKit::WebFrame* frame() { return frame_; } |
| + |
| + 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?
|
| + void HidePlugin(); |
| + |
| + // WebViewPlugin::Delegate methods: |
| + virtual void BindWebFrame(WebKit::WebFrame* frame) OVERRIDE; |
| + virtual void WillDestroyPlugin() OVERRIDE; |
| + |
| + private: |
| + WebKit::WebFrame* frame_; |
| + WebKit::WebPluginParams plugin_params_; |
| + webkit::npapi::WebViewPlugin* plugin_; |
| + |
| + DISALLOW_COPY_AND_ASSIGN(PluginPlaceholder); |
| +}; |
| + |
| +#endif // CHROME_RENDERER_PLUGINS_PLUGIN_PLACEHOLDER_H_ |