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

Side by Side Diff: ppapi/shared_impl/test_globals.cc

Issue 9034035: Make it possible to have 1 PpapiGlobals per thread. Update unit tests. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Review comments. Created 8 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/shared_impl/test_globals.h ('k') | ppapi/shared_impl/var_tracker.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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/shared_impl/test_globals.h" 5 #include "ppapi/shared_impl/test_globals.h"
6 6
7 namespace ppapi { 7 namespace ppapi {
8 8
9 TestGlobals::TestGlobals() 9 TestGlobals::TestGlobals()
10 : ppapi::PpapiGlobals(), 10 : ppapi::PpapiGlobals(),
11 callback_tracker_(new CallbackTracker) { 11 callback_tracker_(new CallbackTracker) {
12 } 12 }
13 13
14 TestGlobals::TestGlobals(PpapiGlobals::ForTest for_test)
15 : ppapi::PpapiGlobals(for_test),
16 callback_tracker_(new CallbackTracker) {
17 }
18
14 TestGlobals::~TestGlobals() { 19 TestGlobals::~TestGlobals() {
15 } 20 }
16 21
17 ResourceTracker* TestGlobals::GetResourceTracker() { 22 ResourceTracker* TestGlobals::GetResourceTracker() {
18 return &resource_tracker_; 23 return &resource_tracker_;
19 } 24 }
20 25
21 VarTracker* TestGlobals::GetVarTracker() { 26 VarTracker* TestGlobals::GetVarTracker() {
22 return &var_tracker_; 27 return &var_tracker_;
23 } 28 }
24 29
25 CallbackTracker* TestGlobals::GetCallbackTrackerForInstance( 30 CallbackTracker* TestGlobals::GetCallbackTrackerForInstance(
26 PP_Instance instance) { 31 PP_Instance instance) {
27 return callback_tracker_.get(); 32 return callback_tracker_.get();
28 } 33 }
29 34
30 FunctionGroupBase* TestGlobals::GetFunctionAPI(PP_Instance inst, ApiID id) { 35 FunctionGroupBase* TestGlobals::GetFunctionAPI(PP_Instance inst, ApiID id) {
31 return NULL; 36 return NULL;
32 } 37 }
33 38
34 PP_Module TestGlobals::GetModuleForInstance(PP_Instance instance) { 39 PP_Module TestGlobals::GetModuleForInstance(PP_Instance instance) {
35 return 0; 40 return 0;
36 } 41 }
37 42
43 base::Lock* TestGlobals::GetProxyLock() {
44 return NULL;
45 }
46
38 } // namespace ppapi 47 } // namespace ppapi
OLDNEW
« no previous file with comments | « ppapi/shared_impl/test_globals.h ('k') | ppapi/shared_impl/var_tracker.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698