| OLD | NEW |
| (Empty) |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef UI_OZONE_PLATFORM_DRI_DRI_WINDOW_H_ | |
| 6 #define UI_OZONE_PLATFORM_DRI_DRI_WINDOW_H_ | |
| 7 | |
| 8 #include "base/memory/scoped_ptr.h" | |
| 9 #include "ui/events/platform/platform_event_dispatcher.h" | |
| 10 #include "ui/gfx/geometry/rect.h" | |
| 11 #include "ui/gfx/native_widget_types.h" | |
| 12 #include "ui/ozone/platform/dri/channel_observer.h" | |
| 13 #include "ui/platform_window/platform_window.h" | |
| 14 | |
| 15 namespace ui { | |
| 16 | |
| 17 class DriWindowDelegate; | |
| 18 class DriWindowManager; | |
| 19 class EventFactoryEvdev; | |
| 20 class DriGpuPlatformSupportHost; | |
| 21 | |
| 22 class DriWindow : public PlatformWindow, | |
| 23 public PlatformEventDispatcher, | |
| 24 public ChannelObserver { | |
| 25 public: | |
| 26 DriWindow(PlatformWindowDelegate* delegate, | |
| 27 const gfx::Rect& bounds, | |
| 28 DriGpuPlatformSupportHost* sender, | |
| 29 EventFactoryEvdev* event_factory, | |
| 30 DriWindowManager* window_manager); | |
| 31 virtual ~DriWindow(); | |
| 32 | |
| 33 void Initialize(); | |
| 34 | |
| 35 // PlatformWindow: | |
| 36 virtual void Show() override; | |
| 37 virtual void Hide() override; | |
| 38 virtual void Close() override; | |
| 39 virtual void SetBounds(const gfx::Rect& bounds) override; | |
| 40 virtual gfx::Rect GetBounds() override; | |
| 41 virtual void SetCapture() override; | |
| 42 virtual void ReleaseCapture() override; | |
| 43 virtual void ToggleFullscreen() override; | |
| 44 virtual void Maximize() override; | |
| 45 virtual void Minimize() override; | |
| 46 virtual void Restore() override; | |
| 47 virtual void SetCursor(PlatformCursor cursor) override; | |
| 48 virtual void MoveCursorTo(const gfx::Point& location) override; | |
| 49 | |
| 50 // PlatformEventDispatcher: | |
| 51 virtual bool CanDispatchEvent(const PlatformEvent& event) override; | |
| 52 virtual uint32_t DispatchEvent(const PlatformEvent& event) override; | |
| 53 | |
| 54 // ChannelObserver: | |
| 55 virtual void OnChannelEstablished() override; | |
| 56 virtual void OnChannelDestroyed() override; | |
| 57 | |
| 58 private: | |
| 59 PlatformWindowDelegate* delegate_; // Not owned. | |
| 60 DriGpuPlatformSupportHost* sender_; // Not owned. | |
| 61 EventFactoryEvdev* event_factory_; // Not owned. | |
| 62 DriWindowManager* window_manager_; // Not owned. | |
| 63 | |
| 64 gfx::Rect bounds_; | |
| 65 gfx::AcceleratedWidget widget_; | |
| 66 | |
| 67 DISALLOW_COPY_AND_ASSIGN(DriWindow); | |
| 68 }; | |
| 69 | |
| 70 } // namespace ui | |
| 71 | |
| 72 #endif // UI_OZONE_PLATFORM_DRI_DRI_WINDOW_H_ | |
| OLD | NEW |