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

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

Issue 10910099: PPAPI: Make CompletionCallbacks work right on background threads. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: merge Created 8 years, 1 month 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/proxy/ppb_message_loop_proxy.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 "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 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 void PluginGlobals::BroadcastLogWithSource(PP_Module /* module */, 98 void PluginGlobals::BroadcastLogWithSource(PP_Module /* module */,
99 PP_LogLevel_Dev level, 99 PP_LogLevel_Dev level,
100 const std::string& source, 100 const std::string& source,
101 const std::string& value) { 101 const std::string& value) {
102 // Since we have only one module in a plugin process, broadcast is always 102 // Since we have only one module in a plugin process, broadcast is always
103 // the same as "send to everybody" which is what the dispatcher implements 103 // the same as "send to everybody" which is what the dispatcher implements
104 // for the "instance = 0" case. 104 // for the "instance = 0" case.
105 LogWithSource(0, level, source, value); 105 LogWithSource(0, level, source, value);
106 } 106 }
107 107
108 MessageLoopShared* PluginGlobals::GetCurrentMessageLoop() {
109 return MessageLoopResource::GetCurrent();
110 }
111
108 MessageLoopResource* PluginGlobals::loop_for_main_thread() { 112 MessageLoopResource* PluginGlobals::loop_for_main_thread() {
109 return loop_for_main_thread_.get(); 113 return loop_for_main_thread_.get();
110 } 114 }
111 115
112 bool PluginGlobals::IsPluginGlobals() const { 116 bool PluginGlobals::IsPluginGlobals() const {
113 return true; 117 return true;
114 } 118 }
115 119
116 } // namespace proxy 120 } // namespace proxy
117 } // namespace ppapi 121 } // namespace ppapi
OLDNEW
« no previous file with comments | « ppapi/proxy/plugin_globals.h ('k') | ppapi/proxy/ppb_message_loop_proxy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698