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