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_COMMON_WINDOW_PLATFORM_WINDOW_COMPAT_H_ | 5 #ifndef UI_OZONE_PLATFORM_TEST_TEST_WINDOW_H_ |
6 #define UI_OZONE_COMMON_WINDOW_PLATFORM_WINDOW_COMPAT_H_ | 6 #define UI_OZONE_PLATFORM_TEST_TEST_WINDOW_H_ |
7 | 7 |
8 #include "ui/base/cursor/cursor.h" | 8 #include "base/files/file_path.h" |
9 #include "ui/events/platform/platform_event_dispatcher.h" | 9 #include "ui/events/platform/platform_event_dispatcher.h" |
10 #include "ui/gfx/geometry/rect.h" | 10 #include "ui/gfx/geometry/rect.h" |
11 #include "ui/gfx/native_widget_types.h" | 11 #include "ui/gfx/native_widget_types.h" |
12 #include "ui/ozone/ozone_export.h" | |
13 #include "ui/platform_window/platform_window.h" | 12 #include "ui/platform_window/platform_window.h" |
14 | 13 |
15 namespace gfx { | |
16 class Point; | |
17 class Rect; | |
18 } | |
19 | |
20 namespace ui { | 14 namespace ui { |
21 | 15 |
22 class PlatformWindowDelegate; | 16 class PlatformWindowDelegate; |
| 17 class TestWindowManager; |
23 | 18 |
24 // This is just transitional code. Will be removed shortly. | 19 class TestWindow : public PlatformWindow, public PlatformEventDispatcher { |
25 class OZONE_EXPORT PlatformWindowCompat : public PlatformWindow, | |
26 public ui::PlatformEventDispatcher { | |
27 public: | 20 public: |
28 PlatformWindowCompat(PlatformWindowDelegate* delegate, | 21 TestWindow(PlatformWindowDelegate* delegate, |
29 const gfx::Rect& bounds); | 22 TestWindowManager* manager, |
30 virtual ~PlatformWindowCompat(); | 23 const gfx::Rect& bounds); |
| 24 virtual ~TestWindow(); |
31 | 25 |
32 // ui::PlatformEventDispatcher: | 26 // Path for image file for this window. |
33 virtual bool CanDispatchEvent(const ui::PlatformEvent& event) OVERRIDE; | 27 base::FilePath path(); |
34 virtual uint32_t DispatchEvent(const ui::PlatformEvent& event) OVERRIDE; | |
35 | 28 |
36 // PlatformWindow: | 29 // PlatformWindow: |
37 virtual gfx::Rect GetBounds() OVERRIDE; | 30 virtual gfx::Rect GetBounds() OVERRIDE; |
38 virtual void SetBounds(const gfx::Rect& bounds) OVERRIDE; | 31 virtual void SetBounds(const gfx::Rect& bounds) OVERRIDE; |
39 virtual void Show() OVERRIDE; | 32 virtual void Show() OVERRIDE; |
40 virtual void Hide() OVERRIDE; | 33 virtual void Hide() OVERRIDE; |
41 virtual void Close() OVERRIDE; | 34 virtual void Close() OVERRIDE; |
42 virtual void SetCapture() OVERRIDE; | 35 virtual void SetCapture() OVERRIDE; |
43 virtual void ReleaseCapture() OVERRIDE; | 36 virtual void ReleaseCapture() OVERRIDE; |
44 virtual void ToggleFullscreen() OVERRIDE; | 37 virtual void ToggleFullscreen() OVERRIDE; |
45 virtual void Maximize() OVERRIDE; | 38 virtual void Maximize() OVERRIDE; |
46 virtual void Minimize() OVERRIDE; | 39 virtual void Minimize() OVERRIDE; |
47 virtual void Restore() OVERRIDE; | 40 virtual void Restore() OVERRIDE; |
48 | 41 |
| 42 // PlatformEventDispatcher: |
| 43 virtual bool CanDispatchEvent(const PlatformEvent& event) OVERRIDE; |
| 44 virtual uint32_t DispatchEvent(const PlatformEvent& event) OVERRIDE; |
| 45 |
49 private: | 46 private: |
50 PlatformWindowDelegate* delegate_; | 47 PlatformWindowDelegate* delegate_; |
| 48 TestWindowManager* manager_; |
| 49 gfx::Rect bounds_; |
51 gfx::AcceleratedWidget widget_; | 50 gfx::AcceleratedWidget widget_; |
52 gfx::Rect bounds_; | |
53 | 51 |
54 DISALLOW_COPY_AND_ASSIGN(PlatformWindowCompat); | 52 DISALLOW_COPY_AND_ASSIGN(TestWindow); |
55 }; | 53 }; |
56 | 54 |
57 } // namespace ui | 55 } // namespace ui |
58 | 56 |
59 #endif // UI_OZONE_COMMON_WINDOW_PLATFORM_WINDOW_COMPAT_H_ | 57 #endif // UI_OZONE_PLATFORM_TEST_TEST_WINDOW_H_ |
OLD | NEW |