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

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

Issue 11416214: PPAPI: Move PPB_Console out of dev. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years 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_globals.h" 5 #include "ppapi/proxy/plugin_globals.h"
6 6
7 #include "ppapi/proxy/plugin_dispatcher.h" 7 #include "ppapi/proxy/plugin_dispatcher.h"
8 #include "ppapi/proxy/plugin_proxy_delegate.h" 8 #include "ppapi/proxy/plugin_proxy_delegate.h"
9 #include "ppapi/proxy/ppb_message_loop_proxy.h" 9 #include "ppapi/proxy/ppb_message_loop_proxy.h"
10 #include "ppapi/thunk/enter.h" 10 #include "ppapi/thunk/enter.h"
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 plugin_proxy_delegate_->PreCacheFont(logfontw); 90 plugin_proxy_delegate_->PreCacheFont(logfontw);
91 } 91 }
92 92
93 base::Lock* PluginGlobals::GetProxyLock() { 93 base::Lock* PluginGlobals::GetProxyLock() {
94 if (enable_threading_) 94 if (enable_threading_)
95 return &proxy_lock_; 95 return &proxy_lock_;
96 return NULL; 96 return NULL;
97 } 97 }
98 98
99 void PluginGlobals::LogWithSource(PP_Instance instance, 99 void PluginGlobals::LogWithSource(PP_Instance instance,
100 PP_LogLevel_Dev level, 100 PP_LogLevel level,
101 const std::string& source, 101 const std::string& source,
102 const std::string& value) { 102 const std::string& value) {
103 const std::string& fixed_up_source = source.empty() ? plugin_name_ : source; 103 const std::string& fixed_up_source = source.empty() ? plugin_name_ : source;
104 PluginDispatcher::LogWithSource(instance, level, fixed_up_source, value); 104 PluginDispatcher::LogWithSource(instance, level, fixed_up_source, value);
105 } 105 }
106 106
107 void PluginGlobals::BroadcastLogWithSource(PP_Module /* module */, 107 void PluginGlobals::BroadcastLogWithSource(PP_Module /* module */,
108 PP_LogLevel_Dev level, 108 PP_LogLevel level,
109 const std::string& source, 109 const std::string& source,
110 const std::string& value) { 110 const std::string& value) {
111 // Since we have only one module in a plugin process, broadcast is always 111 // Since we have only one module in a plugin process, broadcast is always
112 // the same as "send to everybody" which is what the dispatcher implements 112 // the same as "send to everybody" which is what the dispatcher implements
113 // for the "instance = 0" case. 113 // for the "instance = 0" case.
114 LogWithSource(0, level, source, value); 114 LogWithSource(0, level, source, value);
115 } 115 }
116 116
117 MessageLoopShared* PluginGlobals::GetCurrentMessageLoop() { 117 MessageLoopShared* PluginGlobals::GetCurrentMessageLoop() {
118 return MessageLoopResource::GetCurrent(); 118 return MessageLoopResource::GetCurrent();
119 } 119 }
120 120
121 MessageLoopResource* PluginGlobals::loop_for_main_thread() { 121 MessageLoopResource* PluginGlobals::loop_for_main_thread() {
122 return loop_for_main_thread_.get(); 122 return loop_for_main_thread_.get();
123 } 123 }
124 124
125 bool PluginGlobals::IsPluginGlobals() const { 125 bool PluginGlobals::IsPluginGlobals() const {
126 return true; 126 return true;
127 } 127 }
128 128
129 } // namespace proxy 129 } // namespace proxy
130 } // namespace ppapi 130 } // namespace ppapi
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698