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

Unified Diff: chrome/renderer/plugins/chrome_plugin_placeholder.cc

Issue 104833006: Switch ContentSettingsObserver to be a RenderFrameObserver instead of a RenderViewObserver (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: sync 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 side-by-side diff with in-line comments
Download patch
Index: chrome/renderer/plugins/chrome_plugin_placeholder.cc
===================================================================
--- chrome/renderer/plugins/chrome_plugin_placeholder.cc (revision 241294)
+++ chrome/renderer/plugins/chrome_plugin_placeholder.cc (working copy)
@@ -14,7 +14,6 @@
#include "content/public/common/context_menu_params.h"
#include "content/public/renderer/render_frame.h"
#include "content/public/renderer/render_thread.h"
-#include "content/public/renderer/render_view_observer.h"
#include "grit/generated_resources.h"
#include "grit/renderer_resources.h"
#include "grit/webkit_strings.h"
@@ -47,30 +46,6 @@
const char ChromePluginPlaceholder::kPluginPlaceholderDataURL[] =
"chrome://pluginplaceholderdata/";
-class ChromePluginPlaceholder::RenderViewObserver
- : public content::RenderViewObserver {
- public:
- explicit RenderViewObserver(ChromePluginPlaceholder* placeholder)
- : content::RenderViewObserver(
- placeholder->render_frame()->GetRenderView()),
- placeholder_(placeholder) {}
-
- // content::RenderViewObserver implementation:
- virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE {
- // We don't swallow these messages because multiple blocked plugins and
- // other objects have an interest in them.
- IPC_BEGIN_MESSAGE_MAP(ChromePluginPlaceholder, message)
- IPC_MESSAGE_FORWARD(ChromeViewMsg_LoadBlockedPlugins, placeholder_,
- ChromePluginPlaceholder::OnLoadBlockedPlugins)
- IPC_END_MESSAGE_MAP()
-
- return false;
- }
-
- private:
- ChromePluginPlaceholder* placeholder_;
-};
-
ChromePluginPlaceholder::ChromePluginPlaceholder(
content::RenderFrame* render_frame,
blink::WebFrame* frame,
@@ -90,8 +65,6 @@
has_host_(false),
context_menu_request_id_(0) {
RenderThread::Get()->AddObserver(this);
-
- view_observer_.reset(new RenderViewObserver(this));
}
ChromePluginPlaceholder::~ChromePluginPlaceholder() {
@@ -212,18 +185,19 @@
#if defined(ENABLE_PLUGIN_INSTALLATION)
bool handled = true;
IPC_BEGIN_MESSAGE_MAP(ChromePluginPlaceholder, message)
- IPC_MESSAGE_HANDLER(ChromeViewMsg_FoundMissingPlugin, OnFoundMissingPlugin)
- IPC_MESSAGE_HANDLER(ChromeViewMsg_DidNotFindMissingPlugin,
- OnDidNotFindMissingPlugin)
- IPC_MESSAGE_HANDLER(ChromeViewMsg_StartedDownloadingPlugin,
- OnStartedDownloadingPlugin)
- IPC_MESSAGE_HANDLER(ChromeViewMsg_FinishedDownloadingPlugin,
- OnFinishedDownloadingPlugin)
- IPC_MESSAGE_HANDLER(ChromeViewMsg_ErrorDownloadingPlugin,
- OnErrorDownloadingPlugin)
- IPC_MESSAGE_HANDLER(ChromeViewMsg_CancelledDownloadingPlugin,
- OnCancelledDownloadingPlugin)
- IPC_MESSAGE_UNHANDLED(handled = false)
+ IPC_MESSAGE_HANDLER(ChromeViewMsg_FoundMissingPlugin, OnFoundMissingPlugin)
+ IPC_MESSAGE_HANDLER(ChromeViewMsg_DidNotFindMissingPlugin,
+ OnDidNotFindMissingPlugin)
+ IPC_MESSAGE_HANDLER(ChromeViewMsg_StartedDownloadingPlugin,
+ OnStartedDownloadingPlugin)
+ IPC_MESSAGE_HANDLER(ChromeViewMsg_FinishedDownloadingPlugin,
+ OnFinishedDownloadingPlugin)
+ IPC_MESSAGE_HANDLER(ChromeViewMsg_ErrorDownloadingPlugin,
+ OnErrorDownloadingPlugin)
+ IPC_MESSAGE_HANDLER(ChromeViewMsg_CancelledDownloadingPlugin,
+ OnCancelledDownloadingPlugin)
+ IPC_MESSAGE_HANDLER(ChromeViewMsg_LoadBlockedPlugins, OnLoadBlockedPlugins)
+ IPC_MESSAGE_UNHANDLED(handled = false)
IPC_END_MESSAGE_MAP()
if (handled)
« no previous file with comments | « chrome/renderer/plugins/chrome_plugin_placeholder.h ('k') | chrome/renderer/worker_permission_client_proxy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698