| 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_DRI_DRI_WINDOW_H_ | 5 #ifndef UI_OZONE_PLATFORM_DRI_DRI_WINDOW_H_ |
| 6 #define UI_OZONE_PLATFORM_DRI_DRI_WINDOW_H_ | 6 #define UI_OZONE_PLATFORM_DRI_DRI_WINDOW_H_ |
| 7 | 7 |
| 8 #include "base/memory/scoped_ptr.h" |
| 8 #include "ui/events/platform/platform_event_dispatcher.h" | 9 #include "ui/events/platform/platform_event_dispatcher.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 DriSurfaceFactory; | 16 class DriWindowDelegate; |
| 17 class DriWindowManager; |
| 16 class EventFactoryEvdev; | 18 class EventFactoryEvdev; |
| 17 | 19 |
| 18 class DriWindow : public PlatformWindow, | 20 class DriWindow : public PlatformWindow, |
| 19 public PlatformEventDispatcher { | 21 public PlatformEventDispatcher { |
| 20 public: | 22 public: |
| 21 DriWindow(PlatformWindowDelegate* delegate, | 23 DriWindow(PlatformWindowDelegate* delegate, |
| 22 const gfx::Rect& bounds, | 24 const gfx::Rect& bounds, |
| 23 DriSurfaceFactory* surface_factory, | 25 scoped_ptr<DriWindowDelegate> dri_window_delegate, |
| 24 EventFactoryEvdev* event_factory); | 26 EventFactoryEvdev* event_factory, |
| 27 DriWindowManager* window_manager); |
| 25 virtual ~DriWindow(); | 28 virtual ~DriWindow(); |
| 26 | 29 |
| 30 void Initialize(); |
| 31 |
| 27 // PlatformWindow: | 32 // PlatformWindow: |
| 28 virtual void Show() OVERRIDE; | 33 virtual void Show() OVERRIDE; |
| 29 virtual void Hide() OVERRIDE; | 34 virtual void Hide() OVERRIDE; |
| 30 virtual void Close() OVERRIDE; | 35 virtual void Close() OVERRIDE; |
| 31 virtual void SetBounds(const gfx::Rect& bounds) OVERRIDE; | 36 virtual void SetBounds(const gfx::Rect& bounds) OVERRIDE; |
| 32 virtual gfx::Rect GetBounds() OVERRIDE; | 37 virtual gfx::Rect GetBounds() OVERRIDE; |
| 33 virtual void SetCapture() OVERRIDE; | 38 virtual void SetCapture() OVERRIDE; |
| 34 virtual void ReleaseCapture() OVERRIDE; | 39 virtual void ReleaseCapture() OVERRIDE; |
| 35 virtual void ToggleFullscreen() OVERRIDE; | 40 virtual void ToggleFullscreen() OVERRIDE; |
| 36 virtual void Maximize() OVERRIDE; | 41 virtual void Maximize() OVERRIDE; |
| 37 virtual void Minimize() OVERRIDE; | 42 virtual void Minimize() OVERRIDE; |
| 38 virtual void Restore() OVERRIDE; | 43 virtual void Restore() OVERRIDE; |
| 39 virtual void SetCursor(PlatformCursor cursor) OVERRIDE; | 44 virtual void SetCursor(PlatformCursor cursor) OVERRIDE; |
| 40 virtual void MoveCursorTo(const gfx::Point& location) OVERRIDE; | 45 virtual void MoveCursorTo(const gfx::Point& location) OVERRIDE; |
| 41 | 46 |
| 42 // PlatformEventDispatcher: | 47 // PlatformEventDispatcher: |
| 43 virtual bool CanDispatchEvent(const PlatformEvent& event) OVERRIDE; | 48 virtual bool CanDispatchEvent(const PlatformEvent& event) OVERRIDE; |
| 44 virtual uint32_t DispatchEvent(const PlatformEvent& event) OVERRIDE; | 49 virtual uint32_t DispatchEvent(const PlatformEvent& event) OVERRIDE; |
| 45 | 50 |
| 46 private: | 51 private: |
| 47 PlatformWindowDelegate* delegate_; | 52 PlatformWindowDelegate* delegate_; |
| 48 gfx::Rect bounds_; | 53 gfx::Rect bounds_; |
| 49 gfx::AcceleratedWidget widget_; | 54 gfx::AcceleratedWidget widget_; |
| 55 DriWindowDelegate* dri_window_delegate_; |
| 50 EventFactoryEvdev* event_factory_; | 56 EventFactoryEvdev* event_factory_; |
| 57 DriWindowManager* window_manager_; |
| 51 | 58 |
| 52 DISALLOW_COPY_AND_ASSIGN(DriWindow); | 59 DISALLOW_COPY_AND_ASSIGN(DriWindow); |
| 53 }; | 60 }; |
| 54 | 61 |
| 55 } // namespace ui | 62 } // namespace ui |
| 56 | 63 |
| 57 #endif // UI_OZONE_PLATFORM_DRI_DRI_WINDOW_H_ | 64 #endif // UI_OZONE_PLATFORM_DRI_DRI_WINDOW_H_ |
| OLD | NEW |