summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-10-24 15:54:35 +0000
committerjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-10-24 15:54:35 +0000
commit243c20a1c855730bc9b4fda56c8d89ec7f00d496 (patch)
treedef0aaaeeb51c67dffc4eaa764323df99cbc1211
parent879f8e1bde7b7a3959421e4782d9908d02f70653 (diff)
downloadchromium_src-243c20a1c855730bc9b4fda56c8d89ec7f00d496.zip
chromium_src-243c20a1c855730bc9b4fda56c8d89ec7f00d496.tar.gz
chromium_src-243c20a1c855730bc9b4fda56c8d89ec7f00d496.tar.bz2
Remove BrowserPluginGuestHelper since it's not needed. BrowserPluginGuest already swallowed the IPCs that it dispatched. For the two that weren't dispatched but were swallowed by BrowserPluginGuestHelper, we can use empty IPC_MESSAGE_HANDLER_GENERIC statements. This also removes duplication of the list of handled IPCs.
This is part of the work in removing RenderViewHostObserver. BUG=306569 R=fsamuel@chromium.org Review URL: https://codereview.chromium.org/35853003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@230729 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--content/browser/browser_plugin/browser_plugin_guest.cc4
-rw-r--r--content/browser/browser_plugin/browser_plugin_guest_helper.cc55
-rw-r--r--content/browser/browser_plugin/browser_plugin_guest_helper.h59
-rw-r--r--content/content_browser.gypi2
4 files changed, 0 insertions, 120 deletions
diff --git a/content/browser/browser_plugin/browser_plugin_guest.cc b/content/browser/browser_plugin/browser_plugin_guest.cc
index 1aab2e0..b8f7e24 100644
--- a/content/browser/browser_plugin/browser_plugin_guest.cc
+++ b/content/browser/browser_plugin/browser_plugin_guest.cc
@@ -10,7 +10,6 @@
#include "base/strings/string_util.h"
#include "base/strings/utf_string_conversions.h"
#include "content/browser/browser_plugin/browser_plugin_embedder.h"
-#include "content/browser/browser_plugin/browser_plugin_guest_helper.h"
#include "content/browser/browser_plugin/browser_plugin_guest_manager.h"
#include "content/browser/browser_plugin/browser_plugin_host_factory.h"
#include "content/browser/browser_thread_impl.h"
@@ -557,9 +556,6 @@ void BrowserPluginGuest::Initialize(
static_cast<WebContentsViewGuest*>(GetWebContents()->GetView());
new_view->OnGuestInitialized(embedder_web_contents->GetView());
- // |render_view_host| manages the ownership of this BrowserPluginGuestHelper.
- new BrowserPluginGuestHelper(this, GetWebContents()->GetRenderViewHost());
-
RendererPreferences* renderer_prefs =
GetWebContents()->GetMutableRendererPrefs();
std::string guest_user_agent_override = renderer_prefs->user_agent_override;
diff --git a/content/browser/browser_plugin/browser_plugin_guest_helper.cc b/content/browser/browser_plugin/browser_plugin_guest_helper.cc
deleted file mode 100644
index ee18b6e..0000000
--- a/content/browser/browser_plugin/browser_plugin_guest_helper.cc
+++ /dev/null
@@ -1,55 +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.
-
-#include "content/browser/browser_plugin/browser_plugin_guest_helper.h"
-
-#include "content/browser/browser_plugin/browser_plugin_guest.h"
-#include "content/common/drag_messages.h"
-#include "content/common/view_messages.h"
-#include "content/public/browser/render_view_host.h"
-
-namespace content {
-
-BrowserPluginGuestHelper::BrowserPluginGuestHelper(
- BrowserPluginGuest* guest,
- RenderViewHost* render_view_host)
- : RenderViewHostObserver(render_view_host),
- guest_(guest) {
-}
-
-BrowserPluginGuestHelper::~BrowserPluginGuestHelper() {
-}
-
-bool BrowserPluginGuestHelper::OnMessageReceived(
- const IPC::Message& message) {
- if (ShouldForwardToBrowserPluginGuest(message))
- return guest_->OnMessageReceived(message);
- return false;
-}
-
-// static
-bool BrowserPluginGuestHelper::ShouldForwardToBrowserPluginGuest(
- const IPC::Message& message) {
- switch (message.type()) {
- case DragHostMsg_StartDragging::ID:
- case DragHostMsg_TargetDrop_ACK::ID:
- case ViewHostMsg_HasTouchEventHandlers::ID:
- case ViewHostMsg_SetCursor::ID:
- #if defined(OS_MACOSX)
- case ViewHostMsg_ShowPopup::ID:
- #endif
- case ViewHostMsg_ShowWidget::ID:
- case ViewHostMsg_TakeFocus::ID:
- case ViewHostMsg_UpdateFrameName::ID:
- case ViewHostMsg_UpdateRect::ID:
- case ViewHostMsg_LockMouse::ID:
- case ViewHostMsg_UnlockMouse::ID:
- return true;
- default:
- break;
- }
- return false;
-}
-
-} // namespace content
diff --git a/content/browser/browser_plugin/browser_plugin_guest_helper.h b/content/browser/browser_plugin/browser_plugin_guest_helper.h
deleted file mode 100644
index dfe2e32..0000000
--- a/content/browser/browser_plugin/browser_plugin_guest_helper.h
+++ /dev/null
@@ -1,59 +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 CONTENT_BROWSER_BROWSER_PLUGIN_BROWSER_PLUGIN_GUEST_HELPER_H_
-#define CONTENT_BROWSER_BROWSER_PLUGIN_BROWSER_PLUGIN_GUEST_HELPER_H_
-
-#include "content/port/common/input_event_ack_state.h"
-#include "content/public/browser/render_view_host_observer.h"
-#include "content/public/browser/notification_registrar.h"
-#include "third_party/WebKit/public/web/WebDragOperation.h"
-#include "third_party/WebKit/public/web/WebInputEvent.h"
-
-class WebCursor;
-#if defined(OS_MACOSX)
-struct ViewHostMsg_ShowPopup_Params;
-#endif
-struct ViewHostMsg_UpdateRect_Params;
-
-namespace gfx {
-class Size;
-}
-
-namespace content {
-class BrowserPluginGuest;
-class RenderViewHost;
-
-// Helper for BrowserPluginGuest.
-//
-// The purpose of this class is to intercept messages from the guest RenderView
-// before they are handled by the standard message handlers in the browser
-// process. This permits overriding standard behavior with BrowserPlugin-
-// specific behavior.
-//
-// The lifetime of this class is managed by the associated RenderViewHost. A
-// BrowserPluginGuestHelper is created whenever a BrowserPluginGuest is created.
-class BrowserPluginGuestHelper : public RenderViewHostObserver {
- public:
- BrowserPluginGuestHelper(BrowserPluginGuest* guest,
- RenderViewHost* render_view_host);
- virtual ~BrowserPluginGuestHelper();
-
- protected:
- // RenderViewHostObserver implementation.
- virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE;
-
- private:
- // Returns whether a message should be forward to the helper's associated
- // BrowserPluginGuest.
- static bool ShouldForwardToBrowserPluginGuest(const IPC::Message& message);
-
- BrowserPluginGuest* guest_;
-
- DISALLOW_COPY_AND_ASSIGN(BrowserPluginGuestHelper);
-};
-
-} // namespace content
-
-#endif // CONTENT_BROWSER_BROWSER_PLUGIN_BROWSER_PLUGIN_GUEST_HELPER_H_
diff --git a/content/content_browser.gypi b/content/content_browser.gypi
index 9318ade..aec6539 100644
--- a/content/content_browser.gypi
+++ b/content/content_browser.gypi
@@ -331,8 +331,6 @@
'browser/browser_plugin/browser_plugin_geolocation_permission_context.h',
'browser/browser_plugin/browser_plugin_guest.cc',
'browser/browser_plugin/browser_plugin_guest.h',
- 'browser/browser_plugin/browser_plugin_guest_helper.cc',
- 'browser/browser_plugin/browser_plugin_guest_helper.h',
'browser/browser_plugin/browser_plugin_guest_manager.cc',
'browser/browser_plugin/browser_plugin_guest_manager.h',
'browser/browser_plugin/browser_plugin_host_factory.h',