| 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 module ui.mojom; | 5 module ui.mojom; |
| 6 | 6 |
| 7 import "services/ui/public/interfaces/window_manager_constants.mojom"; | 7 import "services/ui/public/interfaces/window_manager_constants.mojom"; |
| 8 | 8 |
| 9 interface DisplayManagerObserver { | 9 interface DisplayManagerObserver { |
| 10 // Sent when the observer is added. |displays| will contain all known | 10 // Sent when the observer is added as well as any time the set of displays |
| 11 // displays. If the system that WS is running on has an integrated display, | 11 // changes in any way. |displays| contains all known displays. If the system |
| 12 // for example a laptop internal display, then |internal_display_id| will | 12 // that WS is running on has an integrated display, for example a laptop |
| 13 // be the corresponding dislay id. If there is no internal display then | 13 // internal display, then |internal_display_id| will be the corresponding |
| 14 // |internal_display_id| will be kInvalidDisplayID. | 14 // dislay id. If there is no internal display then |internal_display_id| will |
| 15 OnDisplays(array<WsDisplay> displays, | 15 // be kInvalidDisplayID. |
| 16 int64 primary_display_id, | 16 OnDisplaysChanged(array<WsDisplay> displays, |
| 17 int64 internal_display_id); | 17 int64 primary_display_id, |
| 18 | 18 int64 internal_display_id); |
| 19 // The specified set of displays has changed in some way. This is used both | |
| 20 // when a new display is added, or when a property of a display changes. | |
| 21 // |displays| does not necessarily contain the complete set of displays, | |
| 22 // only those that changed. | |
| 23 OnDisplaysChanged(array<WsDisplay> displays); | |
| 24 | |
| 25 // An existing display was removed. | |
| 26 OnDisplayRemoved(int64 display_id); | |
| 27 | |
| 28 // The primary display has changed. | |
| 29 OnPrimaryDisplayChanged(int64 primary_display_id); | |
| 30 }; | 19 }; |
| 31 | 20 |
| 32 interface DisplayManager { | 21 interface DisplayManager { |
| 33 AddObserver(DisplayManagerObserver observer); | 22 AddObserver(DisplayManagerObserver observer); |
| 34 }; | 23 }; |
| OLD | NEW |