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

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

Issue 11859015: Pepper: Introduce ThreadAwareCallback. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 7 years, 11 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
« no previous file with comments | « ppapi/proxy/plugin_globals.h ('k') | ppapi/proxy/ppapi_proxy_test.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 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 #if defined(ENABLE_PEPPER_THREADING) 55 #if defined(ENABLE_PEPPER_THREADING)
56 enable_threading_ = true; 56 enable_threading_ = true;
57 #else 57 #else
58 enable_threading_ = false; 58 enable_threading_ = false;
59 #endif 59 #endif
60 60
61 DCHECK(!plugin_globals_); 61 DCHECK(!plugin_globals_);
62 plugin_globals_ = this; 62 plugin_globals_ = this;
63 } 63 }
64 64
65 PluginGlobals::PluginGlobals(ForTest for_test) 65 PluginGlobals::PluginGlobals(PerThreadForTest per_thread_for_test)
66 : ppapi::PpapiGlobals(for_test), 66 : ppapi::PpapiGlobals(per_thread_for_test),
67 plugin_proxy_delegate_(NULL), 67 plugin_proxy_delegate_(NULL),
68 callback_tracker_(new CallbackTracker) { 68 callback_tracker_(new CallbackTracker) {
69 #if defined(ENABLE_PEPPER_THREADING) 69 #if defined(ENABLE_PEPPER_THREADING)
70 enable_threading_ = true; 70 enable_threading_ = true;
71 #else 71 #else
72 enable_threading_ = false; 72 enable_threading_ = false;
73 #endif 73 #endif
74 DCHECK(!plugin_globals_); 74 DCHECK(!plugin_globals_);
75 } 75 }
76 76
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
178 MessageLoopResource* PluginGlobals::loop_for_main_thread() { 178 MessageLoopResource* PluginGlobals::loop_for_main_thread() {
179 return loop_for_main_thread_.get(); 179 return loop_for_main_thread_.get();
180 } 180 }
181 181
182 bool PluginGlobals::IsPluginGlobals() const { 182 bool PluginGlobals::IsPluginGlobals() const {
183 return true; 183 return true;
184 } 184 }
185 185
186 } // namespace proxy 186 } // namespace proxy
187 } // namespace ppapi 187 } // namespace ppapi
OLDNEW
« no previous file with comments | « ppapi/proxy/plugin_globals.h ('k') | ppapi/proxy/ppapi_proxy_test.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698