| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 SERVICES_UI_WS_PLATFORM_DISPLAY_DELEGATE_H_ | 5 #ifndef SERVICES_UI_WS_PLATFORM_DISPLAY_DELEGATE_H_ |
| 6 #define SERVICES_UI_WS_PLATFORM_DISPLAY_DELEGATE_H_ | 6 #define SERVICES_UI_WS_PLATFORM_DISPLAY_DELEGATE_H_ |
| 7 | 7 |
| 8 #include "services/ui/ws/ids.h" | 8 #include "services/ui/ws/ids.h" |
| 9 | 9 |
| 10 namespace display { |
| 11 class Display; |
| 12 } |
| 13 |
| 10 namespace ui { | 14 namespace ui { |
| 11 class Event; | 15 class Event; |
| 12 } | 16 } |
| 13 | 17 |
| 14 namespace ui { | 18 namespace ui { |
| 15 | 19 |
| 16 namespace ws { | 20 namespace ws { |
| 17 | 21 |
| 18 class ServerWindow; | 22 class ServerWindow; |
| 19 struct ViewportMetrics; | 23 struct ViewportMetrics; |
| 20 | 24 |
| 21 // PlatformDisplayDelegate is implemented by an object that manages the | 25 // PlatformDisplayDelegate is implemented by an object that manages the |
| 22 // lifetime of a PlatformDisplay, forwards events to the appropriate windows, | 26 // lifetime of a PlatformDisplay, forwards events to the appropriate windows, |
| 23 /// and responses to changes in viewport size. | 27 /// and responses to changes in viewport size. |
| 24 class PlatformDisplayDelegate { | 28 class PlatformDisplayDelegate { |
| 25 public: | 29 public: |
| 30 // Returns a display::Display for this display |
| 31 virtual display::Display GetDisplay() = 0; |
| 32 |
| 26 // Returns the root window of this display. | 33 // Returns the root window of this display. |
| 27 virtual ServerWindow* GetRootWindow() = 0; | 34 virtual ServerWindow* GetRootWindow() = 0; |
| 28 | 35 |
| 29 virtual bool IsInHighContrastMode() = 0; | 36 virtual bool IsInHighContrastMode() = 0; |
| 30 | 37 |
| 31 // Called when the window managed by the PlatformDisplay is closed. | 38 // Called when the window managed by the PlatformDisplay is closed. |
| 32 virtual void OnDisplayClosed() = 0; | 39 virtual void OnDisplayClosed() = 0; |
| 33 | 40 |
| 34 // Called when an event arrives. | 41 // Called when an event arrives. |
| 35 virtual void OnEvent(const ui::Event& event) = 0; | 42 virtual void OnEvent(const ui::Event& event) = 0; |
| (...skipping 10 matching lines...) Expand all Loading... |
| 46 | 53 |
| 47 protected: | 54 protected: |
| 48 virtual ~PlatformDisplayDelegate() {} | 55 virtual ~PlatformDisplayDelegate() {} |
| 49 }; | 56 }; |
| 50 | 57 |
| 51 } // namespace ws | 58 } // namespace ws |
| 52 | 59 |
| 53 } // namespace ui | 60 } // namespace ui |
| 54 | 61 |
| 55 #endif // SERVICES_UI_WS_PLATFORM_DISPLAY_DELEGATE_H_ | 62 #endif // SERVICES_UI_WS_PLATFORM_DISPLAY_DELEGATE_H_ |
| OLD | NEW |