summaryrefslogtreecommitdiffstats
path: root/extensions/renderer/guest_view
diff options
context:
space:
mode:
authorfsamuel <fsamuel@chromium.org>2015-04-21 11:41:39 -0700
committerCommit bot <commit-bot@chromium.org>2015-04-21 18:42:05 +0000
commitb0dc17d87cb785557687aea9532f60154acac198 (patch)
treeb3142bf8827b3a4e42819c29dd1d1d7722f72854 /extensions/renderer/guest_view
parent5473f531dbc85dfe719731a14593580a69a61909 (diff)
downloadchromium_src-b0dc17d87cb785557687aea9532f60154acac198.zip
chromium_src-b0dc17d87cb785557687aea9532f60154acac198.tar.gz
chromium_src-b0dc17d87cb785557687aea9532f60154acac198.tar.bz2
GuestView: Decouple extension IPCs from soon-to-be component IPCs
In the feature, GuestViewMessageFilter will move to components and ExtensionsGuestViewMessageFilter will stay in the extensions module. BUG=444869 TBR=rockot@chromium.org for non-guestview extensions, kenrb@chromium.org for _messages.h These are all just mechanical refactors. Review URL: https://codereview.chromium.org/1092853002 Cr-Commit-Position: refs/heads/master@{#326082}
Diffstat (limited to 'extensions/renderer/guest_view')
-rw-r--r--extensions/renderer/guest_view/guest_view_container.cc5
-rw-r--r--extensions/renderer/guest_view/mime_handler_view/mime_handler_view_container.cc17
2 files changed, 13 insertions, 9 deletions
diff --git a/extensions/renderer/guest_view/guest_view_container.cc b/extensions/renderer/guest_view/guest_view_container.cc
index 90e94c8..787e439 100644
--- a/extensions/renderer/guest_view/guest_view_container.cc
+++ b/extensions/renderer/guest_view/guest_view_container.cc
@@ -7,6 +7,7 @@
#include "content/public/renderer/render_frame.h"
#include "content/public/renderer/render_frame_observer.h"
#include "content/public/renderer/render_view.h"
+#include "extensions/common/guest_view/extensions_guest_view_messages.h"
#include "extensions/common/guest_view/guest_view_constants.h"
#include "extensions/common/guest_view/guest_view_messages.h"
@@ -49,10 +50,10 @@ GuestViewContainer::~GuestViewContainer() {}
// static.
bool GuestViewContainer::HandlesMessage(const IPC::Message& msg) {
switch (msg.type()) {
- case GuestViewMsg_CreateMimeHandlerViewGuestACK::ID:
+ case ExtensionsGuestViewMsg_CreateMimeHandlerViewGuestACK::ID:
+ case ExtensionsGuestViewMsg_MimeHandlerViewGuestOnLoadCompleted::ID:
case GuestViewMsg_GuestAttached::ID:
case GuestViewMsg_GuestDetached::ID:
- case GuestViewMsg_MimeHandlerViewGuestOnLoadCompleted::ID:
return true;
default:
return false;
diff --git a/extensions/renderer/guest_view/mime_handler_view/mime_handler_view_container.cc b/extensions/renderer/guest_view/mime_handler_view/mime_handler_view_container.cc
index 7688771..8394c35 100644
--- a/extensions/renderer/guest_view/mime_handler_view/mime_handler_view_container.cc
+++ b/extensions/renderer/guest_view/mime_handler_view/mime_handler_view_container.cc
@@ -12,6 +12,7 @@
#include "content/public/renderer/render_view.h"
#include "extensions/browser/guest_view/mime_handler_view/mime_handler_view_constants.h"
#include "extensions/common/extension_messages.h"
+#include "extensions/common/guest_view/extensions_guest_view_messages.h"
#include "extensions/common/guest_view/guest_view_constants.h"
#include "extensions/common/guest_view/guest_view_messages.h"
#include "gin/arguments.h"
@@ -164,11 +165,12 @@ void MimeHandlerViewContainer::DidReceiveData(const char* data,
bool MimeHandlerViewContainer::OnMessageReceived(const IPC::Message& message) {
bool handled = true;
IPC_BEGIN_MESSAGE_MAP(MimeHandlerViewContainer, message)
- IPC_MESSAGE_HANDLER(GuestViewMsg_CreateMimeHandlerViewGuestACK,
+ IPC_MESSAGE_HANDLER(ExtensionsGuestViewMsg_CreateMimeHandlerViewGuestACK,
OnCreateMimeHandlerViewGuestACK)
+ IPC_MESSAGE_HANDLER(
+ ExtensionsGuestViewMsg_MimeHandlerViewGuestOnLoadCompleted,
+ OnMimeHandlerViewGuestOnLoadCompleted)
IPC_MESSAGE_HANDLER(GuestViewMsg_GuestAttached, OnGuestAttached)
- IPC_MESSAGE_HANDLER(GuestViewMsg_MimeHandlerViewGuestOnLoadCompleted,
- OnMimeHandlerViewGuestOnLoadCompleted)
IPC_MESSAGE_UNHANDLED(handled = false)
IPC_END_MESSAGE_MAP()
return handled;
@@ -177,7 +179,7 @@ bool MimeHandlerViewContainer::OnMessageReceived(const IPC::Message& message) {
void MimeHandlerViewContainer::DidResizeElement(const gfx::Size& old_size,
const gfx::Size& new_size) {
element_size_ = new_size;
- render_frame()->Send(new GuestViewHostMsg_ResizeGuest(
+ render_frame()->Send(new ExtensionsGuestViewHostMsg_ResizeGuest(
render_frame()->GetRoutingID(), element_instance_id(), new_size));
}
@@ -315,9 +317,10 @@ void MimeHandlerViewContainer::CreateMimeHandlerViewGuest() {
if (!render_frame())
return;
- render_frame()->Send(new GuestViewHostMsg_CreateMimeHandlerViewGuest(
- render_frame()->GetRoutingID(), view_id_, element_instance_id(),
- element_size_));
+ render_frame()->Send(
+ new ExtensionsGuestViewHostMsg_CreateMimeHandlerViewGuest(
+ render_frame()->GetRoutingID(), view_id_, element_instance_id(),
+ element_size_));
}
} // namespace extensions