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

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

Issue 8930010: Implement in-process PPB_VarArrayBuffer_Dev. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Some pre-review cleanup. Created 9 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) 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 #ifndef PPAPI_SHARED_IMPL_TEST_GLOBALS_H_ 5 #ifndef PPAPI_SHARED_IMPL_TEST_GLOBALS_H_
6 #define PPAPI_SHARED_IMPL_TEST_GLOBALS_H_ 6 #define PPAPI_SHARED_IMPL_TEST_GLOBALS_H_
7 7
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "ppapi/shared_impl/ppapi_globals.h" 9 #include "ppapi/shared_impl/ppapi_globals.h"
10 #include "ppapi/shared_impl/resource_tracker.h" 10 #include "ppapi/shared_impl/resource_tracker.h"
11 #include "ppapi/shared_impl/var_tracker.h" 11 #include "ppapi/shared_impl/var_tracker.h"
12 12
13 namespace ppapi { 13 namespace ppapi {
14 14
15 class TestVarTracker : public VarTracker {
16 public:
17 TestVarTracker() {}
brettw 2011/12/15 00:19:51 Need one less space of indent
18 virtual ~TestVarTracker() {}
19 virtual ArrayBufferVar* CreateArrayBuffer(uint32 size_in_bytes) OVERRIDE {
20 return NULL;
21 }
22 };
23
15 // Implementation of PpapiGlobals for tests that don't need either the host- or 24 // Implementation of PpapiGlobals for tests that don't need either the host- or
16 // plugin-specific implementations. 25 // plugin-specific implementations.
17 class TestGlobals : public PpapiGlobals { 26 class TestGlobals : public PpapiGlobals {
18 public: 27 public:
19 TestGlobals(); 28 TestGlobals();
20 virtual ~TestGlobals(); 29 virtual ~TestGlobals();
21 30
22 // PpapiGlobals implementation. 31 // PpapiGlobals implementation.
23 virtual ResourceTracker* GetResourceTracker() OVERRIDE; 32 virtual ResourceTracker* GetResourceTracker() OVERRIDE;
24 virtual VarTracker* GetVarTracker() OVERRIDE; 33 virtual VarTracker* GetVarTracker() OVERRIDE;
25 virtual FunctionGroupBase* GetFunctionAPI(PP_Instance inst, 34 virtual FunctionGroupBase* GetFunctionAPI(PP_Instance inst,
26 ApiID id) OVERRIDE; 35 ApiID id) OVERRIDE;
27 virtual PP_Module GetModuleForInstance(PP_Instance instance) OVERRIDE; 36 virtual PP_Module GetModuleForInstance(PP_Instance instance) OVERRIDE;
28 37
29 private: 38 private:
30 ResourceTracker resource_tracker_; 39 ResourceTracker resource_tracker_;
31 VarTracker var_tracker_; 40 TestVarTracker var_tracker_;
32 41
33 DISALLOW_COPY_AND_ASSIGN(TestGlobals); 42 DISALLOW_COPY_AND_ASSIGN(TestGlobals);
34 }; 43 };
35 44
36 } // namespace ppapi 45 } // namespace ppapi
37 46
38 #endif // PPAPI_SHARED_IMPL_TEST_GLOBALS_H_ 47 #endif // PPAPI_SHARED_IMPL_TEST_GLOBALS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698