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