Skip to content

Commit

Permalink
Browser Plugin: Rename BrowserPluginMsg/BrowserPluginHostMsg to OldBr…
Browse files Browse the repository at this point in the history
…owserPluginMsg/OldBrowserPluginHostMsg

The upcoming rewrite of the browser plugin has colliding names for IPC messages.

Rename existing messages to Old in preparation for the new implementation.

BUG=none


Review URL: https://chromiumcodereview.appspot.com/10829074

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@149116 0039d316-1c4b-4281-b951-d872f2087c98
  • Loading branch information
fsamuel@chromium.org committed Jul 31, 2012
1 parent 5156cf2 commit bac466e
Show file tree
Hide file tree
Showing 10 changed files with 32 additions and 32 deletions.
8 changes: 4 additions & 4 deletions content/browser/browser_plugin/old/browser_plugin_host.cc
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#include "content/browser/browser_plugin/old/browser_plugin_host_helper.h"
#include "content/browser/renderer_host/render_view_host_impl.h"
#include "content/browser/web_contents/web_contents_impl.h"
#include "content/common/browser_plugin_messages.h"
#include "content/common/old_browser_plugin_messages.h"
#include "content/public/common/url_constants.h"
#include "content/public/browser/notification_details.h"
#include "content/public/browser/notification_source.h"
Expand Down Expand Up @@ -58,14 +58,14 @@ void BrowserPluginHost::RegisterContainerInstance(

bool BrowserPluginHost::TakeFocus(bool reverse) {
embedder_render_process_host()->Send(
new BrowserPluginMsg_AdvanceFocus(instance_id(), reverse));
new OldBrowserPluginMsg_AdvanceFocus(instance_id(), reverse));
return true;
}

bool BrowserPluginHost::OnMessageReceived(const IPC::Message& message) {
bool handled = true;
IPC_BEGIN_MESSAGE_MAP(BrowserPluginHost, message)
IPC_MESSAGE_HANDLER(BrowserPluginHostMsg_NavigateFromGuest,
IPC_MESSAGE_HANDLER(OldBrowserPluginHostMsg_NavigateFromGuest,
OnNavigateFromGuest)
IPC_MESSAGE_UNHANDLED(handled = false)
IPC_END_MESSAGE_MAP()
Expand Down Expand Up @@ -137,7 +137,7 @@ void BrowserPluginHost::ConnectEmbedderToChannel(
// Tell the BrowserPlugin in the embedder that we're done and that it can
// begin using the guest renderer.
embedder_render_process_host()->Send(
new BrowserPluginMsg_LoadGuest(
new OldBrowserPluginMsg_LoadGuest(
instance_id(),
render_view_host->GetProcess()->
GetID(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#include "content/browser/browser_plugin/old/browser_plugin_host_helper.h"

#include "content/browser/browser_plugin/old/browser_plugin_host.h"
#include "content/common/browser_plugin_messages.h"
#include "content/common/old_browser_plugin_messages.h"
#include "content/public/browser/render_view_host.h"
#include "content/public/browser/render_widget_host_view.h"
#include "ui/gfx/size.h"
Expand All @@ -26,11 +26,11 @@ BrowserPluginHostHelper::~BrowserPluginHostHelper() {
bool BrowserPluginHostHelper::OnMessageReceived(const IPC::Message& message) {
bool handled = true;
IPC_BEGIN_MESSAGE_MAP(BrowserPluginHostHelper, message)
IPC_MESSAGE_HANDLER(BrowserPluginHostMsg_ConnectToChannel,
IPC_MESSAGE_HANDLER(OldBrowserPluginHostMsg_ConnectToChannel,
OnConnectToChannel)
IPC_MESSAGE_HANDLER(BrowserPluginHostMsg_NavigateFromEmbedder,
IPC_MESSAGE_HANDLER(OldBrowserPluginHostMsg_NavigateFromEmbedder,
OnNavigateGuestFromEmbedder)
IPC_MESSAGE_HANDLER(BrowserPluginHostMsg_ResizeGuest, OnResizeGuest)
IPC_MESSAGE_HANDLER(OldBrowserPluginHostMsg_ResizeGuest, OnResizeGuest)
IPC_MESSAGE_UNHANDLED(handled = false)
IPC_END_MESSAGE_MAP()
return handled;
Expand Down
2 changes: 1 addition & 1 deletion content/common/content_message_generator.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@

#include "content/common/accessibility_messages.h"
#include "content/common/appcache_messages.h"
#include "content/common/browser_plugin_messages.h"
#include "content/common/clipboard_messages.h"
#include "content/common/database_messages.h"
#include "content/common/desktop_notification_messages.h"
Expand All @@ -29,6 +28,7 @@
#include "content/common/media/media_stream_messages.h"
#include "content/common/media/video_capture_messages.h"
#include "content/common/mime_registry_messages.h"
#include "content/common/old_browser_plugin_messages.h"
#include "content/common/p2p_messages.h"
#include "content/common/pepper_messages.h"
#include "content/common/plugin_messages.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
#include "ppapi/c/pp_instance.h"
#include "ui/gfx/size.h"

#define IPC_MESSAGE_START BrowserPluginMsgStart
#define IPC_MESSAGE_START OldBrowserPluginMsgStart

// Browser plugin messages

Expand All @@ -26,7 +26,7 @@
// A renderer sends this to the browser process when it wants to
// create a browser plugin. The browser will create a guest renderer process
// if necessary.
IPC_MESSAGE_ROUTED3(BrowserPluginHostMsg_NavigateFromEmbedder,
IPC_MESSAGE_ROUTED3(OldBrowserPluginHostMsg_NavigateFromEmbedder,
int /* plugin instance id*/,
long long /* frame id */,
std::string /* src */)
Expand All @@ -48,45 +48,45 @@ IPC_MESSAGE_ROUTED3(BrowserPluginHostMsg_NavigateFromEmbedder,
// PP_Instance identifier.
// The purpose of this message is to tell the browser to map a PP_Instance
// identifier to BrowserPlugin identifier.
IPC_MESSAGE_ROUTED2(BrowserPluginHostMsg_MapInstance,
IPC_MESSAGE_ROUTED2(OldBrowserPluginHostMsg_MapInstance,
int /* container_id */,
PP_Instance /* instance */)

// -----------------------------------------------------------------------------
// These messages are from the embedder render process to the guest render
// process.

IPC_MESSAGE_CONTROL2(BrowserPluginMsg_GuestReady,
IPC_MESSAGE_CONTROL2(OldBrowserPluginMsg_GuestReady,
PP_Instance /* instance */,
int /* embedder_container_id */)

// -----------------------------------------------------------------------------
// These messages are from the guest renderer to the browser process

IPC_MESSAGE_ROUTED1(BrowserPluginHostMsg_ConnectToChannel,
IPC_MESSAGE_ROUTED1(OldBrowserPluginHostMsg_ConnectToChannel,
IPC::ChannelHandle /* handle */)

// A embedder sends this message to the browser when it wants
// to resize a guest plugin container so that the guest is relaid out
// according to the new size.
IPC_MESSAGE_ROUTED2(BrowserPluginHostMsg_ResizeGuest,
IPC_MESSAGE_ROUTED2(OldBrowserPluginHostMsg_ResizeGuest,
int32, /* width */
int32 /* height */)

IPC_MESSAGE_ROUTED2(BrowserPluginHostMsg_NavigateFromGuest,
IPC_MESSAGE_ROUTED2(OldBrowserPluginHostMsg_NavigateFromGuest,
PP_Instance /* instance */,
std::string /* src */)

// -----------------------------------------------------------------------------
// These messages are from the browser process to the embedder.

// A guest instance is ready to be placed.
IPC_MESSAGE_CONTROL3(BrowserPluginMsg_LoadGuest,
IPC_MESSAGE_CONTROL3(OldBrowserPluginMsg_LoadGuest,
int /* instance_id */,
int /* guest_process_id */,
IPC::ChannelHandle /* channel_handle */)

IPC_MESSAGE_CONTROL2(BrowserPluginMsg_AdvanceFocus,
IPC_MESSAGE_CONTROL2(OldBrowserPluginMsg_AdvanceFocus,
int /* instance_id */,
bool /* reverse */)

2 changes: 1 addition & 1 deletion content/content_common.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,6 @@
'common/appcache/appcache_dispatcher.cc',
'common/appcache/appcache_dispatcher.h',
'common/appcache_messages.h',
'common/browser_plugin_messages.h',
'common/child_histogram_message_filter.cc',
'common/child_histogram_message_filter.h',
'common/child_process.cc',
Expand Down Expand Up @@ -294,6 +293,7 @@
'common/npobject_stub.h',
'common/npobject_util.cc',
'common/npobject_util.h',
'common/old_browser_plugin_messages.h',
'common/p2p_messages.h',
'common/p2p_sockets.h',
'common/page_zoom.cc',
Expand Down
6 changes: 3 additions & 3 deletions content/renderer/browser_plugin/old/browser_plugin.cc
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
#include "base/string_piece.h"
#include "base/string_util.h"
#include "base/values.h"
#include "content/common/browser_plugin_messages.h"
#include "content/common/old_browser_plugin_messages.h"
#include "content/public/common/url_constants.h"
#include "content/renderer/render_view_impl.h"
#include "ipc/ipc_channel_handle.h"
Expand Down Expand Up @@ -83,7 +83,7 @@ BrowserPlugin::BrowserPlugin(
ParseSrcAttribute("", &src);

if (!src.empty()) {
render_view->Send(new BrowserPluginHostMsg_NavigateFromEmbedder(
render_view->Send(new OldBrowserPluginHostMsg_NavigateFromEmbedder(
render_view->GetRoutingID(),
id_,
frame->identifier(),
Expand Down Expand Up @@ -142,7 +142,7 @@ void BrowserPlugin::Replace(
PP_Instance instance = new_plugin->instance()->pp_instance();
ppapi::proxy::HostDispatcher* dispatcher =
ppapi::proxy::HostDispatcher::GetForInstance(instance);
dispatcher->Send(new BrowserPluginMsg_GuestReady(instance, id_));
dispatcher->Send(new OldBrowserPluginMsg_GuestReady(instance, id_));

// TODO(fsamuel): We should delay the swapping out of the current plugin
// until after the guest's WebGraphicsContext3D has been initialized. That
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#include "content/renderer/browser_plugin/old/browser_plugin_channel_manager.h"

#include "base/process_util.h"
#include "content/common/browser_plugin_messages.h"
#include "content/common/old_browser_plugin_messages.h"
#include "content/common/view_messages.h"
#include "content/renderer/browser_plugin/old/browser_plugin.h"
#include "content/renderer/browser_plugin/old/guest_to_embedder_channel.h"
Expand Down Expand Up @@ -90,16 +90,16 @@ void BrowserPluginChannelManager::ReportChannelToEmbedder(
pending_guests_.end());
pending_guests_[pending_guests_key] = render_view->AsWeakPtr();
RenderThreadImpl::current()->Send(
new BrowserPluginHostMsg_ConnectToChannel(render_view->GetRoutingID(),
new OldBrowserPluginHostMsg_ConnectToChannel(render_view->GetRoutingID(),
embedder_channel_handle));
}

bool BrowserPluginChannelManager::OnControlMessageReceived(
const IPC::Message& message) {
bool handled = true;
IPC_BEGIN_MESSAGE_MAP(BrowserPluginChannelManager, message)
IPC_MESSAGE_HANDLER(BrowserPluginMsg_LoadGuest, OnLoadGuest)
IPC_MESSAGE_HANDLER(BrowserPluginMsg_AdvanceFocus, OnAdvanceFocus)
IPC_MESSAGE_HANDLER(OldBrowserPluginMsg_LoadGuest, OnLoadGuest)
IPC_MESSAGE_HANDLER(OldBrowserPluginMsg_AdvanceFocus, OnAdvanceFocus)
IPC_MESSAGE_UNHANDLED(handled = false)
IPC_END_MESSAGE_MAP()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
#include "content/renderer/browser_plugin/old/guest_to_embedder_channel.h"

#include "base/process_util.h"
#include "content/common/browser_plugin_messages.h"
#include "content/common/child_process.h"
#include "content/common/old_browser_plugin_messages.h"
#include "content/renderer/browser_plugin/old/browser_plugin_channel_manager.h"
#include "content/renderer/browser_plugin/old/browser_plugin_var_serialization_rules.h"
#include "content/renderer/render_thread_impl.h"
Expand Down Expand Up @@ -56,7 +56,7 @@ bool GuestToEmbedderChannel::OnMessageReceived(const IPC::Message& message) {
OnHandleFilteredInputEvent)
IPC_MESSAGE_HANDLER(PpapiMsg_PPPGraphics3D_ContextLost,
OnContextLost)
IPC_MESSAGE_HANDLER(BrowserPluginMsg_GuestReady,
IPC_MESSAGE_HANDLER(OldBrowserPluginMsg_GuestReady,
OnGuestReady)
// Have the super handle all other messages.
IPC_MESSAGE_UNHANDLED(handled = false)
Expand Down Expand Up @@ -247,7 +247,7 @@ void GuestToEmbedderChannel::OnDidChangeView(
if (render_view_instances_.find(instance) != render_view_instances_.end()) {
RenderViewImpl* render_view = render_view_instances_[instance];
render_view->Send(
new BrowserPluginHostMsg_ResizeGuest(
new OldBrowserPluginHostMsg_ResizeGuest(
render_view->GetRoutingID(),
new_data.rect.size.width,
new_data.rect.size.height));
Expand Down Expand Up @@ -278,7 +278,7 @@ void GuestToEmbedderChannel::OnHandleMessage(

RenderViewImpl* render_view = it->second;
render_view->Send(
new BrowserPluginHostMsg_NavigateFromGuest(
new OldBrowserPluginHostMsg_NavigateFromGuest(
render_view->GetRoutingID(),
instance,
var->value()));
Expand Down
2 changes: 1 addition & 1 deletion content/renderer/render_view_impl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
#include "base/time.h"
#include "base/utf_string_conversions.h"
#include "content/common/appcache/appcache_dispatcher.h"
#include "content/common/browser_plugin_messages.h"
#include "content/common/child_thread.h"
#include "content/common/clipboard_messages.h"
#include "content/common/database_messages.h"
Expand All @@ -36,6 +35,7 @@
#include "content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.h"
#include "content/common/intents_messages.h"
#include "content/common/java_bridge_messages.h"
#include "content/common/old_browser_plugin_messages.h"
#include "content/common/pepper_messages.h"
#include "content/common/pepper_plugin_registry.h"
#include "content/common/quota_dispatcher.h"
Expand Down
2 changes: 1 addition & 1 deletion ipc/ipc_message_utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ enum IPCMessageStart {
AccessibilityMsgStart,
PrerenderMsgStart,
ChromotingMsgStart,
BrowserPluginMsgStart,
OldBrowserPluginMsgStart,
LastIPCMsgStart // Must come last.
};

Expand Down

0 comments on commit bac466e

Please sign in to comment.