diff options
author | bauerb@chromium.org <bauerb@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-02-03 10:26:50 +0000 |
---|---|---|
committer | bauerb@chromium.org <bauerb@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-02-03 10:26:50 +0000 |
commit | e242401ae4974a8947677136751a547ec8449adf (patch) | |
tree | c1c97e54f3feea11f266d56a7c1a43df4160af82 /chrome/renderer/plugins/missing_plugin.h | |
parent | acca50df1d355cfc303c906e940d87d75a714d38 (diff) | |
download | chromium_src-e242401ae4974a8947677136751a547ec8449adf.zip chromium_src-e242401ae4974a8947677136751a547ec8449adf.tar.gz chromium_src-e242401ae4974a8947677136751a547ec8449adf.tar.bz2 |
Merge different plug-in placeholders into one class.
This allows us to combine functionality from different plug-in placeholders, i.e. installing *and* loading a plug-in.
Also refactor ChromeContentRendererClient::CreatePlugin to be (hopefully) simpler: It's just a big switch statement now that configures the plug-in placeholder.
BUG=92796
TEST=none
Review URL: http://codereview.chromium.org/9309037
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@120310 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/renderer/plugins/missing_plugin.h')
-rw-r--r-- | chrome/renderer/plugins/missing_plugin.h | 79 |
1 files changed, 0 insertions, 79 deletions
diff --git a/chrome/renderer/plugins/missing_plugin.h b/chrome/renderer/plugins/missing_plugin.h deleted file mode 100644 index 88af7a5..0000000 --- a/chrome/renderer/plugins/missing_plugin.h +++ /dev/null @@ -1,79 +0,0 @@ -// Copyright (c) 2012 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_MISSING_PLUGIN_H_ -#define CHROME_RENDERER_PLUGINS_MISSING_PLUGIN_H_ -#pragma once - -#include "base/string16.h" -#include "chrome/renderer/plugins/plugin_placeholder.h" -#include "content/public/renderer/render_process_observer.h" -#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebString.h" - -namespace content { -class RenderThread; -} - -class MissingPlugin : public PluginPlaceholder, - public content::RenderProcessObserver { - public: - // Creates a new WebViewPlugin with a MissingPlugin as a delegate. - static webkit::WebViewPlugin* Create( - content::RenderView* render_view, - WebKit::WebFrame* frame, - const WebKit::WebPluginParams& params); - - // WebViewPlugin::Delegate methods: - virtual void BindWebFrame(WebKit::WebFrame* frame) OVERRIDE; - virtual void ShowContextMenu(const WebKit::WebMouseEvent&) OVERRIDE; - -#if defined(ENABLE_PLUGIN_INSTALLATION) - // IPC::Channel::Listener methods: - virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; -#endif - - // content::RenderViewObserver methods: - virtual void ContextMenuAction(unsigned id) OVERRIDE; - - // content::RenderProcessObserver methods: - virtual void PluginListChanged() OVERRIDE; - - private: - MissingPlugin(content::RenderView* render_view, - WebKit::WebFrame* frame, - const WebKit::WebPluginParams& params, - const std::string& html_data); - virtual ~MissingPlugin(); - - void HideCallback(const CppArgumentList& args, CppVariant* result); - void DidFinishLoadingCallback(const CppArgumentList& args, - CppVariant* result); - - void OnDidNotFindMissingPlugin(); -#if defined(ENABLE_PLUGIN_INSTALLATION) - void OnFoundMissingPlugin(const string16& plugin_name); - void OnStartedDownloadingPlugin(); - void OnFinishedDownloadingPlugin(); - void OnErrorDownloadingPlugin(const std::string& error); -#endif - - void SetMessage(const string16& message); - void UpdateMessage(); - - void RemoveMissingPluginHost(); - -#if defined(ENABLE_PLUGIN_INSTALLATION) - // |routing_id()| is the routing ID of our associated RenderView, but we have - // a separate routing ID for messages specific to this placeholder. - int32 placeholder_routing_id_; -#endif - - bool finished_loading_; - bool has_host_; - string16 message_; - - DISALLOW_COPY_AND_ASSIGN(MissingPlugin); -}; - -#endif // CHROME_RENDERER_PLUGINS_MISSING_PLUGIN_H_ |