| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 UI_OZONE_PLATFORM_WAYLAND_MOCK_PLATFORM_WINDOW_DELEGATE_H_ |
| 6 #define UI_OZONE_PLATFORM_WAYLAND_MOCK_PLATFORM_WINDOW_DELEGATE_H_ |
| 7 |
| 5 #include "ui/platform_window/platform_window_delegate.h" | 8 #include "ui/platform_window/platform_window_delegate.h" |
| 6 #include "testing/gmock/include/gmock/gmock.h" | 9 #include "testing/gmock/include/gmock/gmock.h" |
| 7 #include "ui/gfx/geometry/rect.h" | 10 #include "ui/gfx/geometry/rect.h" |
| 8 | 11 |
| 9 namespace ui { | 12 namespace ui { |
| 10 | 13 |
| 11 class MockPlatformWindowDelegate : public PlatformWindowDelegate { | 14 class MockPlatformWindowDelegate : public PlatformWindowDelegate { |
| 12 public: | 15 public: |
| 13 MockPlatformWindowDelegate(); | 16 MockPlatformWindowDelegate(); |
| 14 ~MockPlatformWindowDelegate(); | 17 ~MockPlatformWindowDelegate(); |
| 15 | 18 |
| 16 MOCK_METHOD1(OnBoundsChanged, void(const gfx::Rect& new_bounds)); | 19 MOCK_METHOD1(OnBoundsChanged, void(const gfx::Rect& new_bounds)); |
| 17 MOCK_METHOD1(OnDamageRect, void(const gfx::Rect& damaged_region)); | 20 MOCK_METHOD1(OnDamageRect, void(const gfx::Rect& damaged_region)); |
| 18 MOCK_METHOD1(DispatchEvent, void(Event* event)); | 21 MOCK_METHOD1(DispatchEvent, void(Event* event)); |
| 19 MOCK_METHOD0(OnCloseRequest, void()); | 22 MOCK_METHOD0(OnCloseRequest, void()); |
| 20 MOCK_METHOD0(OnClosed, void()); | 23 MOCK_METHOD0(OnClosed, void()); |
| 21 MOCK_METHOD1(OnWindowStateChanged, void(PlatformWindowState new_state)); | 24 MOCK_METHOD1(OnWindowStateChanged, void(PlatformWindowState new_state)); |
| 22 MOCK_METHOD0(OnLostCapture, void()); | 25 MOCK_METHOD0(OnLostCapture, void()); |
| 23 MOCK_METHOD2(OnAcceleratedWidgetAvailable, | 26 MOCK_METHOD2(OnAcceleratedWidgetAvailable, |
| 24 void(gfx::AcceleratedWidget widget, float device_pixel_ratio)); | 27 void(gfx::AcceleratedWidget widget, float device_pixel_ratio)); |
| 25 MOCK_METHOD0(OnAcceleratedWidgetDestroyed, void()); | 28 MOCK_METHOD0(OnAcceleratedWidgetDestroyed, void()); |
| 26 MOCK_METHOD1(OnActivationChanged, void(bool active)); | 29 MOCK_METHOD1(OnActivationChanged, void(bool active)); |
| 27 | 30 |
| 28 private: | 31 private: |
| 29 DISALLOW_COPY_AND_ASSIGN(MockPlatformWindowDelegate); | 32 DISALLOW_COPY_AND_ASSIGN(MockPlatformWindowDelegate); |
| 30 }; | 33 }; |
| 31 | 34 |
| 32 } // namespace ui | 35 } // namespace ui |
| 36 |
| 37 #endif // UI_OZONE_PLATFORM_WAYLAND_MOCK_PLATFORM_WINDOW_DELEGATE_H_ |
| OLD | NEW |