| OLD | NEW |
| 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 "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 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 92 return found->second; | 92 return found->second; |
| 93 } | 93 } |
| 94 | 94 |
| 95 // static | 95 // static |
| 96 PluginDispatcher* PluginDispatcher::GetForResource(const Resource* resource) { | 96 PluginDispatcher* PluginDispatcher::GetForResource(const Resource* resource) { |
| 97 return GetForInstance(resource->pp_instance()); | 97 return GetForInstance(resource->pp_instance()); |
| 98 } | 98 } |
| 99 | 99 |
| 100 // static | 100 // static |
| 101 const void* PluginDispatcher::GetBrowserInterface(const char* interface_name) { | 101 const void* PluginDispatcher::GetBrowserInterface(const char* interface_name) { |
| 102 DCHECK(interface_name) << "|interface_name| is null. Did you forget to add " |
| 103 "the |interface_name()| template function to the interface's C++ " |
| 104 "wrapper?"; |
| 102 return InterfaceList::GetInstance()->GetInterfaceForPPB(interface_name); | 105 return InterfaceList::GetInstance()->GetInterfaceForPPB(interface_name); |
| 103 } | 106 } |
| 104 | 107 |
| 105 // static | 108 // static |
| 106 void PluginDispatcher::LogWithSource(PP_Instance instance, | 109 void PluginDispatcher::LogWithSource(PP_Instance instance, |
| 107 PP_LogLevel_Dev level, | 110 PP_LogLevel_Dev level, |
| 108 const std::string& source, | 111 const std::string& source, |
| 109 const std::string& value) { | 112 const std::string& value) { |
| 110 if (!g_live_dispatchers || !g_instance_to_dispatcher) | 113 if (!g_live_dispatchers || !g_instance_to_dispatcher) |
| 111 return; | 114 return; |
| (...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 311 // once they're set. The user will have to restart to get new font prefs | 314 // once they're set. The user will have to restart to get new font prefs |
| 312 // propogated to plugins. | 315 // propogated to plugins. |
| 313 if (!received_preferences_) { | 316 if (!received_preferences_) { |
| 314 received_preferences_ = true; | 317 received_preferences_ = true; |
| 315 preferences_ = prefs; | 318 preferences_ = prefs; |
| 316 } | 319 } |
| 317 } | 320 } |
| 318 | 321 |
| 319 } // namespace proxy | 322 } // namespace proxy |
| 320 } // namespace ppapi | 323 } // namespace ppapi |
| OLD | NEW |