OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 GPU_COMMAND_BUFFER_SERVICE_GPU_PROCESSOR_MOCK_H_ | 5 #ifndef GPU_COMMAND_BUFFER_SERVICE_GPU_PROCESSOR_MOCK_H_ |
6 #define GPU_COMMAND_BUFFER_SERVICE_GPU_PROCESSOR_MOCK_H_ | 6 #define GPU_COMMAND_BUFFER_SERVICE_GPU_PROCESSOR_MOCK_H_ |
7 | 7 |
8 #include "gpu/command_buffer/service/gpu_processor.h" | 8 #include "gpu/command_buffer/service/gpu_processor.h" |
9 #include "testing/gmock/include/gmock/gmock.h" | 9 #include "testing/gmock/include/gmock/gmock.h" |
10 | 10 |
11 namespace command_buffer { | 11 namespace command_buffer { |
12 | 12 |
13 class MockGPUProcessor : public GPUProcessor { | 13 class MockGPUProcessor : public GPUProcessor { |
14 public: | 14 public: |
15 explicit MockGPUProcessor(CommandBuffer* command_buffer) | 15 explicit MockGPUProcessor(CommandBuffer* command_buffer) |
16 : GPUProcessor(NULL, command_buffer) { | 16 : GPUProcessor(command_buffer) { |
17 } | 17 } |
18 | 18 |
19 #if defined(OS_WIN) | 19 #if defined(OS_WIN) |
20 MOCK_METHOD1(Initialize, bool(HWND handle)); | 20 MOCK_METHOD1(Initialize, bool(HWND handle)); |
21 #endif | 21 #endif |
22 | 22 |
23 MOCK_METHOD0(Destroy, void()); | 23 MOCK_METHOD0(Destroy, void()); |
24 MOCK_METHOD0(ProcessCommands, void()); | 24 MOCK_METHOD0(ProcessCommands, void()); |
25 | 25 |
26 #if defined(OS_WIN) | 26 #if defined(OS_WIN) |
27 MOCK_METHOD3(SetWindow, bool(HWND handle, int width, int height)); | 27 MOCK_METHOD3(SetWindow, bool(HWND handle, int width, int height)); |
28 #endif | 28 #endif |
29 | 29 |
30 MOCK_METHOD1(GetSharedMemoryAddress, void*(int32 shm_id)); | 30 MOCK_METHOD1(GetSharedMemoryAddress, void*(int32 shm_id)); |
31 MOCK_METHOD1(GetSharedMemorySize, size_t(int32 shm_id)); | 31 MOCK_METHOD1(GetSharedMemorySize, size_t(int32 shm_id)); |
32 MOCK_METHOD1(set_token, void(int32 token)); | 32 MOCK_METHOD1(set_token, void(int32 token)); |
33 | 33 |
34 private: | 34 private: |
35 DISALLOW_COPY_AND_ASSIGN(MockGPUProcessor); | 35 DISALLOW_COPY_AND_ASSIGN(MockGPUProcessor); |
36 }; | 36 }; |
37 | 37 |
38 } // namespace command_buffer | 38 } // namespace command_buffer |
39 | 39 |
40 #endif // GPU_COMMAND_BUFFER_SERVICE_GPU_PROCESSOR_MOCK_H_ | 40 #endif // GPU_COMMAND_BUFFER_SERVICE_GPU_PROCESSOR_MOCK_H_ |
OLD | NEW |