| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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_DISPLAY_PLATFORM_SCREEN_DELEGATE_H_ | 5 #ifndef SERVICES_UI_DISPLAY_SCREEN_MANAGER_DELEGATE_H_ |
| 6 #define SERVICES_UI_DISPLAY_PLATFORM_SCREEN_DELEGATE_H_ | 6 #define SERVICES_UI_DISPLAY_SCREEN_MANAGER_DELEGATE_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 namespace gfx { | |
| 11 class Rect; | |
| 12 class Size; | |
| 13 } | |
| 14 | |
| 15 namespace display { | 10 namespace display { |
| 16 | 11 |
| 17 class PlatformScreen; | |
| 18 struct ViewportMetrics; | 12 struct ViewportMetrics; |
| 19 | 13 |
| 20 // The PlatformScreenDelegate will be informed of changes to the physical | 14 // The ScreenManagerDelegate will be informed of changes to the display or |
| 21 // and/or virtual displays by PlatformScreen. | 15 // screen state by ScreenManager. |
| 22 class PlatformScreenDelegate { | 16 class ScreenManagerDelegate { |
| 23 public: | 17 public: |
| 24 // Called when a display is added. |id| is the display id of the new display | 18 // Called when a display is added. |id| is the display id of the new display |
| 25 // and |metrics| contains display viewport information. | 19 // and |metrics| contains display viewport information. |
| 26 virtual void OnDisplayAdded(int64_t id, const ViewportMetrics& metrics) = 0; | 20 virtual void OnDisplayAdded(int64_t id, const ViewportMetrics& metrics) = 0; |
| 27 | 21 |
| 28 // Called when a display is removed. |id| is the display id of the display | 22 // Called when a display is removed. |id| is the display id of the display |
| 29 // that was removed. | 23 // that was removed. |
| 30 virtual void OnDisplayRemoved(int64_t id) = 0; | 24 virtual void OnDisplayRemoved(int64_t id) = 0; |
| 31 | 25 |
| 32 // Called when a display is modified. |id| is the display id of the modified | 26 // Called when a display is modified. |id| is the display id of the modified |
| 33 // display and |metrics| contains updated display viewport information. | 27 // display and |metrics| contains updated display viewport information. |
| 34 virtual void OnDisplayModified(int64_t id, | 28 virtual void OnDisplayModified(int64_t id, |
| 35 const ViewportMetrics& metrics) = 0; | 29 const ViewportMetrics& metrics) = 0; |
| 36 | 30 |
| 37 // Called when the primary display is changed. | 31 // Called when the primary display is changed. |
| 38 virtual void OnPrimaryDisplayChanged(int64_t primary_display_id) = 0; | 32 virtual void OnPrimaryDisplayChanged(int64_t primary_display_id) = 0; |
| 39 | 33 |
| 40 protected: | 34 protected: |
| 41 virtual ~PlatformScreenDelegate() {} | 35 virtual ~ScreenManagerDelegate() {} |
| 42 }; | 36 }; |
| 43 | 37 |
| 44 } // namespace display | 38 } // namespace display |
| 45 | 39 |
| 46 #endif // SERVICES_UI_DISPLAY_PLATFORM_SCREEN_DELEGATE_H_ | 40 #endif // SERVICES_UI_DISPLAY_SCREEN_MANAGER_DELEGATE_H_ |
| OLD | NEW |