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

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: Nits 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
« no previous file with comments | « ppapi/proxy/plugin_globals.h ('k') | ppapi/shared_impl/ppapi_globals.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "ipc/ipc_message.h" 7 #include "ipc/ipc_message.h"
8 #include "ipc/ipc_sender.h" 8 #include "ipc/ipc_sender.h"
9 #include "ppapi/proxy/plugin_dispatcher.h" 9 #include "ppapi/proxy/plugin_dispatcher.h"
10 #include "ppapi/proxy/plugin_proxy_delegate.h" 10 #include "ppapi/proxy/plugin_proxy_delegate.h"
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 plugin_proxy_delegate_->PreCacheFont(logfontw); 123 plugin_proxy_delegate_->PreCacheFont(logfontw);
124 } 124 }
125 125
126 base::Lock* PluginGlobals::GetProxyLock() { 126 base::Lock* PluginGlobals::GetProxyLock() {
127 if (enable_threading_) 127 if (enable_threading_)
128 return &proxy_lock_; 128 return &proxy_lock_;
129 return NULL; 129 return NULL;
130 } 130 }
131 131
132 void PluginGlobals::LogWithSource(PP_Instance instance, 132 void PluginGlobals::LogWithSource(PP_Instance instance,
133 PP_LogLevel_Dev level, 133 PP_LogLevel level,
134 const std::string& source, 134 const std::string& source,
135 const std::string& value) { 135 const std::string& value) {
136 const std::string& fixed_up_source = source.empty() ? plugin_name_ : source; 136 const std::string& fixed_up_source = source.empty() ? plugin_name_ : source;
137 PluginDispatcher::LogWithSource(instance, level, fixed_up_source, value); 137 PluginDispatcher::LogWithSource(instance, level, fixed_up_source, value);
138 } 138 }
139 139
140 void PluginGlobals::BroadcastLogWithSource(PP_Module /* module */, 140 void PluginGlobals::BroadcastLogWithSource(PP_Module /* module */,
141 PP_LogLevel_Dev level, 141 PP_LogLevel level,
142 const std::string& source, 142 const std::string& source,
143 const std::string& value) { 143 const std::string& value) {
144 // Since we have only one module in a plugin process, broadcast is always 144 // Since we have only one module in a plugin process, broadcast is always
145 // the same as "send to everybody" which is what the dispatcher implements 145 // the same as "send to everybody" which is what the dispatcher implements
146 // for the "instance = 0" case. 146 // for the "instance = 0" case.
147 LogWithSource(0, level, source, value); 147 LogWithSource(0, level, source, value);
148 } 148 }
149 149
150 MessageLoopShared* PluginGlobals::GetCurrentMessageLoop() { 150 MessageLoopShared* PluginGlobals::GetCurrentMessageLoop() {
151 return MessageLoopResource::GetCurrent(); 151 return MessageLoopResource::GetCurrent();
(...skipping 19 matching lines...) Expand all
171 MessageLoopResource* PluginGlobals::loop_for_main_thread() { 171 MessageLoopResource* PluginGlobals::loop_for_main_thread() {
172 return loop_for_main_thread_.get(); 172 return loop_for_main_thread_.get();
173 } 173 }
174 174
175 bool PluginGlobals::IsPluginGlobals() const { 175 bool PluginGlobals::IsPluginGlobals() const {
176 return true; 176 return true;
177 } 177 }
178 178
179 } // namespace proxy 179 } // namespace proxy
180 } // namespace ppapi 180 } // namespace ppapi
OLDNEW
« no previous file with comments | « ppapi/proxy/plugin_globals.h ('k') | ppapi/shared_impl/ppapi_globals.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698