| 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 ui { | 10 namespace ui { |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 // PlatformDisplayDelegate is implemented by an object that manages the | 21 // PlatformDisplayDelegate is implemented by an object that manages the |
| 22 // lifetime of a PlatformDisplay, forwards events to the appropriate windows, | 22 // lifetime of a PlatformDisplay, forwards events to the appropriate windows, |
| 23 /// and responses to changes in viewport size. | 23 /// and responses to changes in viewport size. |
| 24 class PlatformDisplayDelegate { | 24 class PlatformDisplayDelegate { |
| 25 public: | 25 public: |
| 26 // Returns the root window of this display. | 26 // Returns the root window of this display. |
| 27 virtual ServerWindow* GetRootWindow() = 0; | 27 virtual ServerWindow* GetRootWindow() = 0; |
| 28 | 28 |
| 29 virtual bool IsInHighContrastMode() = 0; | 29 virtual bool IsInHighContrastMode() = 0; |
| 30 | 30 |
| 31 // Called when the window managed by the PlatformDisplay is closed. | |
| 32 virtual void OnDisplayClosed() = 0; | |
| 33 | |
| 34 // Called when an event arrives. | 31 // Called when an event arrives. |
| 35 virtual void OnEvent(const ui::Event& event) = 0; | 32 virtual void OnEvent(const ui::Event& event) = 0; |
| 36 | 33 |
| 37 // Called when the Display loses capture. | 34 // Called when the Display loses capture. |
| 38 virtual void OnNativeCaptureLost() = 0; | 35 virtual void OnNativeCaptureLost() = 0; |
| 39 | 36 |
| 40 // Signals that the metrics of this display's viewport has changed. | 37 // Signals that the metrics of this display's viewport has changed. |
| 41 virtual void OnViewportMetricsChanged(const ViewportMetrics& old_metrics, | 38 virtual void OnViewportMetricsChanged(const ViewportMetrics& old_metrics, |
| 42 const ViewportMetrics& new_metrics) = 0; | 39 const ViewportMetrics& new_metrics) = 0; |
| 43 | 40 |
| 44 // Called when a compositor frame is finished drawing. | 41 // Called when a compositor frame is finished drawing. |
| 45 virtual void OnCompositorFrameDrawn() = 0; | 42 virtual void OnCompositorFrameDrawn() = 0; |
| 46 | 43 |
| 47 protected: | 44 protected: |
| 48 virtual ~PlatformDisplayDelegate() {} | 45 virtual ~PlatformDisplayDelegate() {} |
| 49 }; | 46 }; |
| 50 | 47 |
| 51 } // namespace ws | 48 } // namespace ws |
| 52 | 49 |
| 53 } // namespace ui | 50 } // namespace ui |
| 54 | 51 |
| 55 #endif // SERVICES_UI_WS_PLATFORM_DISPLAY_DELEGATE_H_ | 52 #endif // SERVICES_UI_WS_PLATFORM_DISPLAY_DELEGATE_H_ |
| OLD | NEW |