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