| OLD | NEW |
| 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 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 73 return found->second; | 73 return found->second; |
| 74 } | 74 } |
| 75 | 75 |
| 76 // static | 76 // static |
| 77 PluginDispatcher* PluginDispatcher::GetForResource(const Resource* resource) { | 77 PluginDispatcher* PluginDispatcher::GetForResource(const Resource* resource) { |
| 78 return GetForInstance(resource->pp_instance()); | 78 return GetForInstance(resource->pp_instance()); |
| 79 } | 79 } |
| 80 | 80 |
| 81 // static | 81 // static |
| 82 const void* PluginDispatcher::GetInterfaceFromDispatcher( | 82 const void* PluginDispatcher::GetInterfaceFromDispatcher( |
| 83 const char* interface) { | 83 const char* dispatcher_interface) { |
| 84 // All interfaces the plugin requests of the browser are "PPB". | 84 // All interfaces the plugin requests of the browser are "PPB". |
| 85 const InterfaceProxy::Info* info = GetPPBInterfaceInfo(interface); | 85 const InterfaceProxy::Info* info = GetPPBInterfaceInfo(dispatcher_interface); |
| 86 if (!info) | 86 if (!info) |
| 87 return NULL; | 87 return NULL; |
| 88 return info->interface_ptr; | 88 return info->interface_ptr; |
| 89 } | 89 } |
| 90 | 90 |
| 91 bool PluginDispatcher::InitPluginWithChannel( | 91 bool PluginDispatcher::InitPluginWithChannel( |
| 92 PluginDelegate* delegate, | 92 PluginDelegate* delegate, |
| 93 const IPC::ChannelHandle& channel_handle, | 93 const IPC::ChannelHandle& channel_handle, |
| 94 bool is_client) { | 94 bool is_client) { |
| 95 if (!Dispatcher::InitWithChannel(delegate, channel_handle, is_client)) | 95 if (!Dispatcher::InitWithChannel(delegate, channel_handle, is_client)) |
| (...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 306 // once they're set. The user will have to restart to get new font prefs | 306 // once they're set. The user will have to restart to get new font prefs |
| 307 // propogated to plugins. | 307 // propogated to plugins. |
| 308 if (!received_preferences_) { | 308 if (!received_preferences_) { |
| 309 received_preferences_ = true; | 309 received_preferences_ = true; |
| 310 preferences_ = prefs; | 310 preferences_ = prefs; |
| 311 } | 311 } |
| 312 } | 312 } |
| 313 | 313 |
| 314 } // namespace proxy | 314 } // namespace proxy |
| 315 } // namespace ppapi | 315 } // namespace ppapi |
| OLD | NEW |