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

Unified Diff: chrome/renderer/plugins/plugin_placeholder.h

Issue 8461011: Clean up plug-in placeholders: (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: cleanup Created 9 years, 1 month 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 side-by-side diff with in-line comments
Download patch
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_

Powered by Google App Engine
This is Rietveld 408576698