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

Side by Side Diff: ppapi/proxy/plugin_dispatcher.cc

Issue 6981001: Make the Pepper proxy support in-process font rendering. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 7 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "ppapi/proxy/plugin_dispatcher.h" 5 #include "ppapi/proxy/plugin_dispatcher.h"
6 6
7 #include <map> 7 #include <map>
8 8
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 return NULL; 72 return NULL;
73 return info->interface_ptr; 73 return info->interface_ptr;
74 } 74 }
75 75
76 bool PluginDispatcher::InitPluginWithChannel( 76 bool PluginDispatcher::InitPluginWithChannel(
77 PluginDispatcher::Delegate* delegate, 77 PluginDispatcher::Delegate* delegate,
78 const IPC::ChannelHandle& channel_handle, 78 const IPC::ChannelHandle& channel_handle,
79 bool is_client) { 79 bool is_client) {
80 if (!Dispatcher::InitWithChannel(delegate, channel_handle, is_client)) 80 if (!Dispatcher::InitWithChannel(delegate, channel_handle, is_client))
81 return false; 81 return false;
82 SetDelegate(delegate);
82 83
83 // The message filter will intercept and process certain messages directly 84 // The message filter will intercept and process certain messages directly
84 // on the I/O thread. 85 // on the I/O thread.
85 channel()->AddFilter( 86 channel()->AddFilter(
86 new PluginMessageFilter(delegate->GetGloballySeenInstanceIDSet())); 87 new PluginMessageFilter(delegate->GetGloballySeenInstanceIDSet()));
87 return true; 88 return true;
88 } 89 }
89 90
90 bool PluginDispatcher::IsPlugin() const { 91 bool PluginDispatcher::IsPlugin() const {
91 return true; 92 return true;
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
194 NOTREACHED(); 195 NOTREACHED();
195 } 196 }
196 } 197 }
197 } 198 }
198 199
199 InstanceData* PluginDispatcher::GetInstanceData(PP_Instance instance) { 200 InstanceData* PluginDispatcher::GetInstanceData(PP_Instance instance) {
200 InstanceDataMap::iterator it = instance_map_.find(instance); 201 InstanceDataMap::iterator it = instance_map_.find(instance);
201 return (it == instance_map_.end()) ? NULL : &it->second; 202 return (it == instance_map_.end()) ? NULL : &it->second;
202 } 203 }
203 204
205 void PluginDispatcher::PostToWebKitThread(
206 const tracked_objects::Location& from_here,
207 const base::Closure& task) {
208 return dispatcher_delegate_->PostToWebKitThread(from_here, task);
209 }
210
204 ::ppapi::shared_impl::FunctionGroupBase* PluginDispatcher::GetFunctionAPI( 211 ::ppapi::shared_impl::FunctionGroupBase* PluginDispatcher::GetFunctionAPI(
205 pp::proxy::InterfaceID id) { 212 pp::proxy::InterfaceID id) {
206 if (function_proxies_[id].get()) 213 if (function_proxies_[id].get())
207 return function_proxies_[id].get(); 214 return function_proxies_[id].get();
208 215
209 if (id == INTERFACE_ID_RESOURCE_CREATION) 216 if (id == INTERFACE_ID_RESOURCE_CREATION)
210 function_proxies_[id].reset(new ResourceCreationProxy(this)); 217 function_proxies_[id].reset(new ResourceCreationProxy(this));
211 218
212 return function_proxies_[id].get(); 219 return function_proxies_[id].get();
213 } 220 }
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
251 if (!interface_functions) 258 if (!interface_functions)
252 return; 259 return;
253 target_proxies_[info->id].reset( 260 target_proxies_[info->id].reset(
254 info->create_proxy(this, interface_functions)); 261 info->create_proxy(this, interface_functions));
255 *result = true; 262 *result = true;
256 } 263 }
257 264
258 } // namespace proxy 265 } // namespace proxy
259 } // namespace pp 266 } // namespace pp
260 267
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698