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

Side by Side Diff: content/renderer/browser_plugin/old/browser_plugin_channel_manager.cc

Issue 10829074: Browser Plugin: Rename BrowserPluginMsg/BrowserPluginHostMsg to OldBrowserPluginMsg/OldBrowserPlugi… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed nits Created 8 years, 4 months 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/renderer/browser_plugin/old/browser_plugin_channel_manager.h" 5 #include "content/renderer/browser_plugin/old/browser_plugin_channel_manager.h"
6 6
7 #include "base/process_util.h" 7 #include "base/process_util.h"
8 #include "content/common/browser_plugin_messages.h" 8 #include "content/common/old_browser_plugin_messages.h"
9 #include "content/common/view_messages.h" 9 #include "content/common/view_messages.h"
10 #include "content/renderer/browser_plugin/old/browser_plugin.h" 10 #include "content/renderer/browser_plugin/old/browser_plugin.h"
11 #include "content/renderer/browser_plugin/old/guest_to_embedder_channel.h" 11 #include "content/renderer/browser_plugin/old/guest_to_embedder_channel.h"
12 #include "content/renderer/render_thread_impl.h" 12 #include "content/renderer/render_thread_impl.h"
13 #include "content/renderer/render_view_impl.h" 13 #include "content/renderer/render_view_impl.h"
14 #include "ppapi/c/pp_instance.h" 14 #include "ppapi/c/pp_instance.h"
15 #include "webkit/glue/webpreferences.h" 15 #include "webkit/glue/webpreferences.h"
16 16
17 using webkit_glue::WebPreferences; 17 using webkit_glue::WebPreferences;
18 18
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 RenderViewImpl* render_view, 83 RenderViewImpl* render_view,
84 const IPC::ChannelHandle& embedder_channel_handle, 84 const IPC::ChannelHandle& embedder_channel_handle,
85 const std::string& embedder_channel_name, 85 const std::string& embedder_channel_name,
86 int embedder_container_id) { 86 int embedder_container_id) {
87 std::pair<std::string, int> pending_guests_key = 87 std::pair<std::string, int> pending_guests_key =
88 std::make_pair(embedder_channel_name, embedder_container_id); 88 std::make_pair(embedder_channel_name, embedder_container_id);
89 DCHECK(pending_guests_.find(pending_guests_key) == 89 DCHECK(pending_guests_.find(pending_guests_key) ==
90 pending_guests_.end()); 90 pending_guests_.end());
91 pending_guests_[pending_guests_key] = render_view->AsWeakPtr(); 91 pending_guests_[pending_guests_key] = render_view->AsWeakPtr();
92 RenderThreadImpl::current()->Send( 92 RenderThreadImpl::current()->Send(
93 new BrowserPluginHostMsg_ConnectToChannel(render_view->GetRoutingID(), 93 new OldBrowserPluginHostMsg_ConnectToChannel(render_view->GetRoutingID(),
94 embedder_channel_handle)); 94 embedder_channel_handle));
95 } 95 }
96 96
97 bool BrowserPluginChannelManager::OnControlMessageReceived( 97 bool BrowserPluginChannelManager::OnControlMessageReceived(
98 const IPC::Message& message) { 98 const IPC::Message& message) {
99 bool handled = true; 99 bool handled = true;
100 IPC_BEGIN_MESSAGE_MAP(BrowserPluginChannelManager, message) 100 IPC_BEGIN_MESSAGE_MAP(BrowserPluginChannelManager, message)
101 IPC_MESSAGE_HANDLER(BrowserPluginMsg_LoadGuest, OnLoadGuest) 101 IPC_MESSAGE_HANDLER(OldBrowserPluginMsg_LoadGuest, OnLoadGuest)
102 IPC_MESSAGE_HANDLER(BrowserPluginMsg_AdvanceFocus, OnAdvanceFocus) 102 IPC_MESSAGE_HANDLER(OldBrowserPluginMsg_AdvanceFocus, OnAdvanceFocus)
103 IPC_MESSAGE_UNHANDLED(handled = false) 103 IPC_MESSAGE_UNHANDLED(handled = false)
104 IPC_END_MESSAGE_MAP() 104 IPC_END_MESSAGE_MAP()
105 105
106 return handled; 106 return handled;
107 } 107 }
108 108
109 GuestToEmbedderChannel* BrowserPluginChannelManager::GetChannelByName( 109 GuestToEmbedderChannel* BrowserPluginChannelManager::GetChannelByName(
110 const std::string& embedder_channel_name) { 110 const std::string& embedder_channel_name) {
111 EmbedderChannelNameToChannelMap::iterator it = 111 EmbedderChannelNameToChannelMap::iterator it =
112 embedder_channels_.find(embedder_channel_name); 112 embedder_channels_.find(embedder_channel_name);
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 browser_plugin->LoadGuest(guest_process_id, channel_handle); 145 browser_plugin->LoadGuest(guest_process_id, channel_handle);
146 } 146 }
147 147
148 void BrowserPluginChannelManager::OnAdvanceFocus(int instance_id, 148 void BrowserPluginChannelManager::OnAdvanceFocus(int instance_id,
149 bool reverse) { 149 bool reverse) {
150 BrowserPlugin* browser_plugin = BrowserPlugin::FromID(instance_id); 150 BrowserPlugin* browser_plugin = BrowserPlugin::FromID(instance_id);
151 browser_plugin->AdvanceFocus(reverse); 151 browser_plugin->AdvanceFocus(reverse);
152 } 152 }
153 153
154 } // namespace content 154 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698