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 3 // found in the LICENSE file. 4 5 #ifndef GPU_COMMAND_BUFFER_SERVICE_ASYNC_PIXEL_TRANSFER_DELEGATE_MOCK 6 #define GPU_COMMAND_BUFFER_SERVICE_ASYNC_PIXEL_TRANSFER_DELEGATE_MOCK 7 8 #include "base/basictypes.h" 9 #include "gpu/command_buffer/service/async_pixel_transfer_delegate.h" 10 #include "testing/gmock/include/gmock/gmock.h" 11 12 namespace gpu { 13 14 class MockAsyncPixelTransferDelegate : public AsyncPixelTransferDelegate { 15 public: 16 MockAsyncPixelTransferDelegate(); 17 virtual ~MockAsyncPixelTransferDelegate(); 18 19 // Called in ~MockAsyncPixelTransferDelegate. 20 MOCK_METHOD0(Destroy, void()); 21 22 // Implement AsyncPixelTransferDelegate. 23 MOCK_METHOD3(AsyncTexImage2D, 24 void(const AsyncTexImage2DParams& tex_params, 25 const AsyncMemoryParams& mem_params, 26 const base::Closure& bind_callback)); 27 MOCK_METHOD2(AsyncTexSubImage2D, 28 void(const AsyncTexSubImage2DParams& tex_params, 29 const AsyncMemoryParams& mem_params)); 30 MOCK_METHOD0(TransferIsInProgress, bool()); 31 MOCK_METHOD0(WaitForTransferCompletion, void()); 32 33 private: 34 DISALLOW_COPY_AND_ASSIGN(MockAsyncPixelTransferDelegate); 35 }; 36 37 } // namespace gpu 38 39 #endif // GPU_COMMAND_BUFFER_SERVICE_ASYNC_PIXEL_TRANSFER_DELEGATE_MOCK 40