OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_TEST_TEST_WINDOW_H_ | 5 #ifndef UI_OZONE_PLATFORM_HEADLESS_HEADLESS_WINDOW_H_ |
6 #define UI_OZONE_PLATFORM_TEST_TEST_WINDOW_H_ | 6 #define UI_OZONE_PLATFORM_HEADLESS_HEADLESS_WINDOW_H_ |
7 | 7 |
8 #include "base/files/file_path.h" | 8 #include "base/files/file_path.h" |
| 9 #include "base/macros.h" |
9 #include "ui/gfx/geometry/rect.h" | 10 #include "ui/gfx/geometry/rect.h" |
10 #include "ui/gfx/native_widget_types.h" | 11 #include "ui/gfx/native_widget_types.h" |
11 #include "ui/platform_window/platform_window.h" | 12 #include "ui/platform_window/platform_window.h" |
12 | 13 |
13 namespace ui { | 14 namespace ui { |
14 | 15 |
15 class PlatformWindowDelegate; | 16 class PlatformWindowDelegate; |
16 class TestWindowManager; | 17 class HeadlessWindowManager; |
17 | 18 |
18 class TestWindow : public PlatformWindow { | 19 class HeadlessWindow : public PlatformWindow { |
19 public: | 20 public: |
20 TestWindow(PlatformWindowDelegate* delegate, | 21 HeadlessWindow(PlatformWindowDelegate* delegate, |
21 TestWindowManager* manager, | 22 HeadlessWindowManager* manager, |
22 const gfx::Rect& bounds); | 23 const gfx::Rect& bounds); |
23 ~TestWindow() override; | 24 ~HeadlessWindow() override; |
24 | 25 |
25 // Path for image file for this window. | 26 // Path for image file for this window. |
26 base::FilePath path(); | 27 base::FilePath path(); |
27 | 28 |
28 // PlatformWindow: | 29 // PlatformWindow: |
29 gfx::Rect GetBounds() override; | 30 gfx::Rect GetBounds() override; |
30 void SetBounds(const gfx::Rect& bounds) override; | 31 void SetBounds(const gfx::Rect& bounds) override; |
31 void SetTitle(const base::string16& title) override; | 32 void SetTitle(const base::string16& title) override; |
32 void Show() override; | 33 void Show() override; |
33 void Hide() override; | 34 void Hide() override; |
34 void Close() override; | 35 void Close() override; |
35 void SetCapture() override; | 36 void SetCapture() override; |
36 void ReleaseCapture() override; | 37 void ReleaseCapture() override; |
37 void ToggleFullscreen() override; | 38 void ToggleFullscreen() override; |
38 void Maximize() override; | 39 void Maximize() override; |
39 void Minimize() override; | 40 void Minimize() override; |
40 void Restore() override; | 41 void Restore() override; |
41 void SetCursor(PlatformCursor cursor) override; | 42 void SetCursor(PlatformCursor cursor) override; |
42 void MoveCursorTo(const gfx::Point& location) override; | 43 void MoveCursorTo(const gfx::Point& location) override; |
43 void ConfineCursorToBounds(const gfx::Rect& bounds) override; | 44 void ConfineCursorToBounds(const gfx::Rect& bounds) override; |
44 PlatformImeController* GetPlatformImeController() override; | 45 PlatformImeController* GetPlatformImeController() override; |
45 | 46 |
46 private: | 47 private: |
47 PlatformWindowDelegate* delegate_; | 48 PlatformWindowDelegate* delegate_; |
48 TestWindowManager* manager_; | 49 HeadlessWindowManager* manager_; |
49 gfx::Rect bounds_; | 50 gfx::Rect bounds_; |
50 gfx::AcceleratedWidget widget_; | 51 gfx::AcceleratedWidget widget_; |
51 | 52 |
52 DISALLOW_COPY_AND_ASSIGN(TestWindow); | 53 DISALLOW_COPY_AND_ASSIGN(HeadlessWindow); |
53 }; | 54 }; |
54 | 55 |
55 } // namespace ui | 56 } // namespace ui |
56 | 57 |
57 #endif // UI_OZONE_PLATFORM_TEST_TEST_WINDOW_H_ | 58 #endif // UI_OZONE_PLATFORM_HEADLESS_HEADLESS_WINDOW_H_ |
OLD | NEW |