diff options
author | fsamuel <fsamuel@chromium.org> | 2015-04-21 11:41:39 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-04-21 18:42:05 +0000 |
commit | b0dc17d87cb785557687aea9532f60154acac198 (patch) | |
tree | b3142bf8827b3a4e42819c29dd1d1d7722f72854 /extensions/common/guest_view | |
parent | 5473f531dbc85dfe719731a14593580a69a61909 (diff) | |
download | chromium_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/common/guest_view')
-rw-r--r-- | extensions/common/guest_view/extensions_guest_view_messages.h | 47 | ||||
-rw-r--r-- | extensions/common/guest_view/guest_view_messages.h | 31 |
2 files changed, 47 insertions, 31 deletions
diff --git a/extensions/common/guest_view/extensions_guest_view_messages.h b/extensions/common/guest_view/extensions_guest_view_messages.h new file mode 100644 index 0000000..61da7fc --- /dev/null +++ b/extensions/common/guest_view/extensions_guest_view_messages.h @@ -0,0 +1,47 @@ +// Copyright 2015 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. + +// IPC messages for extensions GuestViews. +// Multiply-included message file, hence no include guard. + +#include <string> + +#include "ipc/ipc_message_macros.h" +#include "ui/gfx/geometry/size.h" +#include "ui/gfx/ipc/gfx_param_traits.h" + +#define IPC_MESSAGE_START ExtensionsGuestViewMsgStart +// Messages sent from the browser to the renderer. + +// The ACK for GuestViewHostMsg_CreateMimeHandlerViewGuest. +IPC_MESSAGE_CONTROL1(ExtensionsGuestViewMsg_CreateMimeHandlerViewGuestACK, + int /* element_instance_id */) + +// Once a MimeHandlerView guest's JavaScript onload function has been called, +// this IPC is sent to the container to notify it. +IPC_MESSAGE_CONTROL1(ExtensionsGuestViewMsg_MimeHandlerViewGuestOnLoadCompleted, + int /* element_instance_id */) + +// Messages sent from the renderer to the browser. + +// Queries whether the RenderView of the provided |routing_id| is allowed to +// inject the script with the provided |script_id|. +IPC_SYNC_MESSAGE_CONTROL2_1( + ExtensionsGuestViewHostMsg_CanExecuteContentScriptSync, + int /* routing_id */, + int /* script_id */, + bool /* allowed */) + +// Tells the browser to create a mime handler guest view for a plugin. +IPC_MESSAGE_CONTROL4(ExtensionsGuestViewHostMsg_CreateMimeHandlerViewGuest, + int /* render_frame_id */, + std::string /* view_id */, + int /* element_instance_id */, + gfx::Size /* element_size */) + +// A renderer sends this message when it wants to resize a guest. +IPC_MESSAGE_CONTROL3(ExtensionsGuestViewHostMsg_ResizeGuest, + int /* routing_id */, + int /* element_instance_id*/, + gfx::Size /* new_size */) diff --git a/extensions/common/guest_view/guest_view_messages.h b/extensions/common/guest_view/guest_view_messages.h index b1b18ad..9772b6f 100644 --- a/extensions/common/guest_view/guest_view_messages.h +++ b/extensions/common/guest_view/guest_view_messages.h @@ -5,26 +5,13 @@ // IPC messages for GuestViews. // Multiply-included message file, hence no include guard. -#include <string> - #include "base/values.h" #include "ipc/ipc_message_macros.h" -#include "ui/gfx/geometry/size.h" -#include "ui/gfx/ipc/gfx_param_traits.h" #define IPC_MESSAGE_START GuestViewMsgStart // Messages sent from the browser to the renderer. -// The ACK for GuestViewHostMsg_CreateMimeHandlerViewGuest. -IPC_MESSAGE_CONTROL1(GuestViewMsg_CreateMimeHandlerViewGuestACK, - int /* element_instance_id */) - -// Once a MimeHandlerView guest's JavaScript onload function has been called, -// this IPC is sent to the container to notify it. -IPC_MESSAGE_CONTROL1(GuestViewMsg_MimeHandlerViewGuestOnLoadCompleted, - int /* element_instance_id */) - // Once a RenderView proxy has been created for the guest in the embedder render // process, this IPC informs the embedder of the proxy's routing ID. IPC_MESSAGE_CONTROL2(GuestViewMsg_GuestAttached, @@ -46,21 +33,3 @@ IPC_MESSAGE_CONTROL3(GuestViewHostMsg_AttachGuest, int /* element_instance_id */, int /* guest_instance_id */, base::DictionaryValue /* attach_params */) - -// Tells the browser to create a mime handler guest view for a plugin. -IPC_MESSAGE_CONTROL4(GuestViewHostMsg_CreateMimeHandlerViewGuest, - int /* render_frame_id */, - std::string /* view_id */, - int /* element_instance_id */, - gfx::Size /* element_size */) - -// A renderer sends this message when it wants to resize a guest. -IPC_MESSAGE_CONTROL3(GuestViewHostMsg_ResizeGuest, - int /* routing_id */, - int /* element_instance_id*/, - gfx::Size /* new_size */) - -IPC_SYNC_MESSAGE_CONTROL2_1(GuestViewHostMsg_CanExecuteContentScriptSync, - int /* routing_id */, - int /* script_id */, - bool /* allowed */) |