| 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_PLATFORM_WINDOW_PLATFORM_WINDOW_DELEGATE_H_ | 5 #ifndef UI_PLATFORM_WINDOW_PLATFORM_WINDOW_DELEGATE_H_ |
| 6 #define UI_PLATFORM_WINDOW_PLATFORM_WINDOW_DELEGATE_H_ | 6 #define UI_PLATFORM_WINDOW_PLATFORM_WINDOW_DELEGATE_H_ |
| 7 | 7 |
| 8 #include "ui/gfx/native_widget_types.h" | 8 #include "ui/gfx/native_widget_types.h" |
| 9 #include "ui/platform_window/platform_window_export.h" | |
| 10 | 9 |
| 11 namespace gfx { | 10 namespace gfx { |
| 12 class Rect; | 11 class Rect; |
| 13 } | 12 } |
| 14 | 13 |
| 15 namespace ui { | 14 namespace ui { |
| 16 | 15 |
| 17 class Event; | 16 class Event; |
| 18 | 17 |
| 19 enum PlatformWindowState { | 18 enum PlatformWindowState { |
| 20 PLATFORM_WINDOW_STATE_UNKNOWN, | 19 PLATFORM_WINDOW_STATE_UNKNOWN, |
| 21 PLATFORM_WINDOW_STATE_MAXIMIZED, | 20 PLATFORM_WINDOW_STATE_MAXIMIZED, |
| 22 PLATFORM_WINDOW_STATE_MINIMIZED, | 21 PLATFORM_WINDOW_STATE_MINIMIZED, |
| 23 PLATFORM_WINDOW_STATE_NORMAL, | 22 PLATFORM_WINDOW_STATE_NORMAL, |
| 24 PLATFORM_WINDOW_STATE_FULLSCREEN, | 23 PLATFORM_WINDOW_STATE_FULLSCREEN, |
| 25 }; | 24 }; |
| 26 | 25 |
| 27 class PLATFORM_WINDOW_EXPORT PlatformWindowDelegate { | 26 class PlatformWindowDelegate { |
| 28 public: | 27 public: |
| 29 virtual ~PlatformWindowDelegate() {} | 28 virtual ~PlatformWindowDelegate() {} |
| 30 | 29 |
| 31 // Note that |new_bounds| is in physical screen coordinates. | 30 // Note that |new_bounds| is in physical screen coordinates. |
| 32 virtual void OnBoundsChanged(const gfx::Rect& new_bounds) = 0; | 31 virtual void OnBoundsChanged(const gfx::Rect& new_bounds) = 0; |
| 33 | 32 |
| 34 // Note that |damaged_region| is in the platform-window's coordinates, in | 33 // Note that |damaged_region| is in the platform-window's coordinates, in |
| 35 // physical pixels. | 34 // physical pixels. |
| 36 virtual void OnDamageRect(const gfx::Rect& damaged_region) = 0; | 35 virtual void OnDamageRect(const gfx::Rect& damaged_region) = 0; |
| 37 | 36 |
| 38 virtual void DispatchEvent(Event* event) = 0; | 37 virtual void DispatchEvent(Event* event) = 0; |
| 39 | 38 |
| 40 virtual void OnCloseRequest() = 0; | 39 virtual void OnCloseRequest() = 0; |
| 41 virtual void OnClosed() = 0; | 40 virtual void OnClosed() = 0; |
| 42 | 41 |
| 43 virtual void OnWindowStateChanged(PlatformWindowState new_state) = 0; | 42 virtual void OnWindowStateChanged(PlatformWindowState new_state) = 0; |
| 44 | 43 |
| 45 virtual void OnLostCapture() = 0; | 44 virtual void OnLostCapture() = 0; |
| 46 | 45 |
| 47 virtual void OnAcceleratedWidgetAvailable(gfx::AcceleratedWidget widget) = 0; | 46 virtual void OnAcceleratedWidgetAvailable(gfx::AcceleratedWidget widget) = 0; |
| 48 }; | 47 }; |
| 49 | 48 |
| 50 } // namespace ui | 49 } // namespace ui |
| 51 | 50 |
| 52 #endif // UI_PLATFORM_WINDOW_PLATFORM_WINDOW_DELEGATE_H_ | 51 #endif // UI_PLATFORM_WINDOW_PLATFORM_WINDOW_DELEGATE_H_ |
| OLD | NEW |