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

Side by Side Diff: content/renderer/pepper/pepper_in_process_router.cc

Issue 107183002: Move more of the plugin code in the renderer to use RenderFrame instead of RenderView. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: review comments Created 7 years 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
« no previous file with comments | « content/renderer/npapi/webplugin_impl.cc ('k') | content/renderer/pepper/plugin_module.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/pepper/pepper_in_process_router.h" 5 #include "content/renderer/pepper/pepper_in_process_router.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/message_loop/message_loop.h" 8 #include "base/message_loop/message_loop.h"
9 #include "content/public/renderer/render_thread.h" 9 #include "content/public/renderer/render_thread.h"
10 #include "content/renderer/pepper/renderer_ppapi_host_impl.h" 10 #include "content/renderer/pepper/renderer_ppapi_host_impl.h"
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 60
61 IPC::Sender* PepperInProcessRouter::GetRendererToPluginSender() { 61 IPC::Sender* PepperInProcessRouter::GetRendererToPluginSender() {
62 return host_to_plugin_router_.get(); 62 return host_to_plugin_router_.get();
63 } 63 }
64 64
65 ppapi::proxy::Connection PepperInProcessRouter::GetPluginConnection( 65 ppapi::proxy::Connection PepperInProcessRouter::GetPluginConnection(
66 PP_Instance instance) { 66 PP_Instance instance) {
67 int routing_id = 0; 67 int routing_id = 0;
68 RenderFrame* frame = host_impl_->GetRenderFrameForInstance(instance); 68 RenderFrame* frame = host_impl_->GetRenderFrameForInstance(instance);
69 if (frame) 69 if (frame)
70 routing_id = (static_cast<RenderFrameImpl*>(frame))->routing_id(); 70 routing_id = frame->GetRoutingID();
71 return ppapi::proxy::Connection(browser_channel_.get(), 71 return ppapi::proxy::Connection(browser_channel_.get(),
72 plugin_to_host_router_.get(), 72 plugin_to_host_router_.get(),
73 routing_id); 73 routing_id);
74 } 74 }
75 75
76 // static 76 // static
77 bool PepperInProcessRouter::OnPluginMsgReceived(const IPC::Message& msg) { 77 bool PepperInProcessRouter::OnPluginMsgReceived(const IPC::Message& msg) {
78 // Emulate the proxy by dispatching the relevant message here. 78 // Emulate the proxy by dispatching the relevant message here.
79 ppapi::proxy::ResourceMessageReplyParams reply_params; 79 ppapi::proxy::ResourceMessageReplyParams reply_params;
80 IPC::Message nested_msg; 80 IPC::Message nested_msg;
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
169 void PepperInProcessRouter::DispatchPluginMsg(IPC::Message* msg) { 169 void PepperInProcessRouter::DispatchPluginMsg(IPC::Message* msg) {
170 bool handled = OnPluginMsgReceived(*msg); 170 bool handled = OnPluginMsgReceived(*msg);
171 DCHECK(handled); 171 DCHECK(handled);
172 } 172 }
173 173
174 bool PepperInProcessRouter::SendToBrowser(IPC::Message *msg) { 174 bool PepperInProcessRouter::SendToBrowser(IPC::Message *msg) {
175 return RenderThread::Get()->Send(msg); 175 return RenderThread::Get()->Send(msg);
176 } 176 }
177 177
178 } // namespace content 178 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/npapi/webplugin_impl.cc ('k') | content/renderer/pepper/plugin_module.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698