| 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_SCREEN_MANAGER_DELEGATE_H_ | 5 #ifndef SERVICES_UI_DISPLAY_SCREEN_MANAGER_DELEGATE_H_ |
| 6 #define SERVICES_UI_DISPLAY_SCREEN_MANAGER_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 display { | 10 namespace display { |
| 11 | 11 |
| 12 class Display; |
| 12 struct ViewportMetrics; | 13 struct ViewportMetrics; |
| 13 | 14 |
| 14 // The ScreenManagerDelegate will be informed of changes to the display or | 15 // The ScreenManagerDelegate will be informed of changes to the display or |
| 15 // screen state by ScreenManager. | 16 // screen state by ScreenManager. |
| 16 class ScreenManagerDelegate { | 17 class ScreenManagerDelegate { |
| 17 public: | 18 public: |
| 18 // Called when a display is added. |id| is the display id of the new display | 19 // Called when a display is added. |
| 19 // and |metrics| contains display viewport information. | 20 virtual void OnDisplayAdded(const display::Display& display, |
| 20 virtual void OnDisplayAdded(int64_t id, const ViewportMetrics& metrics) = 0; | 21 const ViewportMetrics& metrics) = 0; |
| 21 | 22 |
| 22 // Called when a display is removed. |id| is the display id of the display | 23 // Called when a display is modified. |
| 23 // that was removed. | 24 virtual void OnDisplayModified(const display::Display& display, |
| 24 virtual void OnDisplayRemoved(int64_t id) = 0; | 25 const ViewportMetrics& metrics) = 0; |
| 25 | 26 |
| 26 // Called when a display is modified. |id| is the display id of the modified | 27 // Called when a display is removed. |
| 27 // display and |metrics| contains updated display viewport information. | 28 virtual void OnDisplayRemoved(int64_t display_id) = 0; |
| 28 virtual void OnDisplayModified(int64_t id, | |
| 29 const ViewportMetrics& metrics) = 0; | |
| 30 | 29 |
| 31 // Called when the primary display is changed. | 30 // Called when the primary display is changed. |
| 32 virtual void OnPrimaryDisplayChanged(int64_t primary_display_id) = 0; | 31 virtual void OnPrimaryDisplayChanged(int64_t primary_display_id) = 0; |
| 33 | 32 |
| 34 protected: | 33 protected: |
| 35 virtual ~ScreenManagerDelegate() {} | 34 virtual ~ScreenManagerDelegate() {} |
| 36 }; | 35 }; |
| 37 | 36 |
| 38 } // namespace display | 37 } // namespace display |
| 39 | 38 |
| 40 #endif // SERVICES_UI_DISPLAY_SCREEN_MANAGER_DELEGATE_H_ | 39 #endif // SERVICES_UI_DISPLAY_SCREEN_MANAGER_DELEGATE_H_ |
| OLD | NEW |