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

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

Issue 174213003: PPAPI: Use clang-format on ppapi/shared_impl (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: remove DEPS Created 6 years, 10 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
« no previous file with comments | « ppapi/shared_impl/socket_option_data.cc ('k') | ppapi/shared_impl/test_globals.cc » ('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 #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 "base/memory/shared_memory.h" 9 #include "base/memory/shared_memory.h"
10 #include "ppapi/shared_impl/callback_tracker.h" 10 #include "ppapi/shared_impl/callback_tracker.h"
(...skipping 13 matching lines...) Expand all
24 int pending_renderer_id, 24 int pending_renderer_id,
25 int pending_browser_id) OVERRIDE { 25 int pending_browser_id) OVERRIDE {
26 return PP_MakeNull(); 26 return PP_MakeNull();
27 } 27 }
28 virtual ResourceVar* MakeResourceVar(PP_Resource pp_resource) OVERRIDE { 28 virtual ResourceVar* MakeResourceVar(PP_Resource pp_resource) OVERRIDE {
29 return NULL; 29 return NULL;
30 } 30 }
31 virtual ArrayBufferVar* CreateArrayBuffer(uint32 size_in_bytes) OVERRIDE { 31 virtual ArrayBufferVar* CreateArrayBuffer(uint32 size_in_bytes) OVERRIDE {
32 return NULL; 32 return NULL;
33 } 33 }
34 virtual ArrayBufferVar* CreateShmArrayBuffer( 34 virtual ArrayBufferVar* CreateShmArrayBuffer(uint32 size_in_bytes,
35 uint32 size_in_bytes, 35 base::SharedMemoryHandle handle)
36 base::SharedMemoryHandle handle) OVERRIDE { 36 OVERRIDE {
37 return NULL; 37 return NULL;
38 } 38 }
39 virtual void DidDeleteInstance(PP_Instance instance) OVERRIDE { 39 virtual void DidDeleteInstance(PP_Instance instance) OVERRIDE {}
40 }
41 virtual int TrackSharedMemoryHandle(PP_Instance instance, 40 virtual int TrackSharedMemoryHandle(PP_Instance instance,
42 base::SharedMemoryHandle handle, 41 base::SharedMemoryHandle handle,
43 uint32 size_in_bytes) OVERRIDE { 42 uint32 size_in_bytes) OVERRIDE {
44 return -1; 43 return -1;
45 } 44 }
46 virtual bool StopTrackingSharedMemoryHandle(int id, 45 virtual bool StopTrackingSharedMemoryHandle(int id,
47 PP_Instance instance, 46 PP_Instance instance,
48 base::SharedMemoryHandle* handle, 47 base::SharedMemoryHandle* handle,
49 uint32* size_in_bytes) OVERRIDE { 48 uint32* size_in_bytes) OVERRIDE {
50 return false; 49 return false;
51 } 50 }
52 }; 51 };
53 52
54 // Implementation of PpapiGlobals for tests that don't need either the host- or 53 // Implementation of PpapiGlobals for tests that don't need either the host- or
55 // plugin-specific implementations. 54 // plugin-specific implementations.
56 class TestGlobals : public PpapiGlobals { 55 class TestGlobals : public PpapiGlobals {
57 public: 56 public:
58 TestGlobals(); 57 TestGlobals();
59 explicit TestGlobals(PpapiGlobals::PerThreadForTest); 58 explicit TestGlobals(PpapiGlobals::PerThreadForTest);
60 virtual ~TestGlobals(); 59 virtual ~TestGlobals();
61 60
62 // PpapiGlobals implementation. 61 // PpapiGlobals implementation.
63 virtual ResourceTracker* GetResourceTracker() OVERRIDE; 62 virtual ResourceTracker* GetResourceTracker() OVERRIDE;
64 virtual VarTracker* GetVarTracker() OVERRIDE; 63 virtual VarTracker* GetVarTracker() OVERRIDE;
65 virtual CallbackTracker* GetCallbackTrackerForInstance( 64 virtual CallbackTracker* GetCallbackTrackerForInstance(PP_Instance instance)
66 PP_Instance instance) OVERRIDE; 65 OVERRIDE;
67 virtual thunk::PPB_Instance_API* GetInstanceAPI( 66 virtual thunk::PPB_Instance_API* GetInstanceAPI(PP_Instance instance)
68 PP_Instance instance) OVERRIDE; 67 OVERRIDE;
69 virtual thunk::ResourceCreationAPI* GetResourceCreationAPI( 68 virtual thunk::ResourceCreationAPI* GetResourceCreationAPI(
70 PP_Instance instance) OVERRIDE; 69 PP_Instance instance) OVERRIDE;
71 virtual PP_Module GetModuleForInstance(PP_Instance instance) OVERRIDE; 70 virtual PP_Module GetModuleForInstance(PP_Instance instance) OVERRIDE;
72 virtual std::string GetCmdLine() OVERRIDE; 71 virtual std::string GetCmdLine() OVERRIDE;
73 virtual void PreCacheFontForFlash(const void* logfontw) OVERRIDE; 72 virtual void PreCacheFontForFlash(const void* logfontw) OVERRIDE;
74 virtual void LogWithSource(PP_Instance instance, 73 virtual void LogWithSource(PP_Instance instance,
75 PP_LogLevel level, 74 PP_LogLevel level,
76 const std::string& source, 75 const std::string& source,
77 const std::string& value) OVERRIDE; 76 const std::string& value) OVERRIDE;
78 virtual void BroadcastLogWithSource(PP_Module module, 77 virtual void BroadcastLogWithSource(PP_Module module,
79 PP_LogLevel level, 78 PP_LogLevel level,
80 const std::string& source, 79 const std::string& source,
81 const std::string& value) OVERRIDE; 80 const std::string& value) OVERRIDE;
82 virtual MessageLoopShared* GetCurrentMessageLoop() OVERRIDE; 81 virtual MessageLoopShared* GetCurrentMessageLoop() OVERRIDE;
83 virtual base::TaskRunner* GetFileTaskRunner() OVERRIDE; 82 virtual base::TaskRunner* GetFileTaskRunner() OVERRIDE;
84 83
85 // PpapiGlobals overrides: 84 // PpapiGlobals overrides:
86 virtual bool IsHostGlobals() const OVERRIDE; 85 virtual bool IsHostGlobals() const OVERRIDE;
87 86
88 private: 87 private:
89 ResourceTracker resource_tracker_; 88 ResourceTracker resource_tracker_;
90 TestVarTracker var_tracker_; 89 TestVarTracker var_tracker_;
91 scoped_refptr<CallbackTracker> callback_tracker_; 90 scoped_refptr<CallbackTracker> callback_tracker_;
92 91
93 DISALLOW_COPY_AND_ASSIGN(TestGlobals); 92 DISALLOW_COPY_AND_ASSIGN(TestGlobals);
94 }; 93 };
95 94
96 } // namespace ppapi 95 } // namespace ppapi
97 96
98 #endif // PPAPI_SHARED_IMPL_TEST_GLOBALS_H_ 97 #endif // PPAPI_SHARED_IMPL_TEST_GLOBALS_H_
OLDNEW
« no previous file with comments | « ppapi/shared_impl/socket_option_data.cc ('k') | ppapi/shared_impl/test_globals.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698