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

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

Issue 10795051: Implement asynchronous interface/plumbing for GetDefaultPrintSettings. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years, 5 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) 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
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 interfaces C++ wrapper?";
dmichael (off chromium) 2012/07/23 18:20:09 nit: interfaces->interface's?
raymes 2012/07/24 00:37:08 Done.
102 return InterfaceList::GetInstance()->GetInterfaceForPPB(interface_name); 104 return InterfaceList::GetInstance()->GetInterfaceForPPB(interface_name);
103 } 105 }
104 106
105 // static 107 // static
106 void PluginDispatcher::LogWithSource(PP_Instance instance, 108 void PluginDispatcher::LogWithSource(PP_Instance instance,
107 PP_LogLevel_Dev level, 109 PP_LogLevel_Dev level,
108 const std::string& source, 110 const std::string& source,
109 const std::string& value) { 111 const std::string& value) {
110 if (!g_live_dispatchers || !g_instance_to_dispatcher) 112 if (!g_live_dispatchers || !g_instance_to_dispatcher)
111 return; 113 return;
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after
311 // once they're set. The user will have to restart to get new font prefs 313 // once they're set. The user will have to restart to get new font prefs
312 // propogated to plugins. 314 // propogated to plugins.
313 if (!received_preferences_) { 315 if (!received_preferences_) {
314 received_preferences_ = true; 316 received_preferences_ = true;
315 preferences_ = prefs; 317 preferences_ = prefs;
316 } 318 }
317 } 319 }
318 320
319 } // namespace proxy 321 } // namespace proxy
320 } // namespace ppapi 322 } // namespace ppapi
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698