| OLD | NEW |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 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 display.mojom; | 5 module display.mojom; |
| 6 | 6 |
| 7 import "ui/display/mojo/display_constants.mojom"; | 7 import "ui/display/mojo/display_constants.mojom"; |
| 8 import "ui/display/mojo/display_mode.mojom"; | 8 import "ui/display/mojo/display_mode.mojom"; |
| 9 import "ui/display/mojo/display_snapshot_mojo.mojom"; | 9 import "ui/display/mojo/display_snapshot_mojo.mojom"; |
| 10 import "ui/display/mojo/gamma_ramp_rgb_entry.mojom"; | 10 import "ui/display/mojo/gamma_ramp_rgb_entry.mojom"; |
| 11 import "ui/gfx/geometry/mojo/geometry.mojom"; | 11 import "ui/gfx/geometry/mojo/geometry.mojom"; |
| 12 | 12 |
| 13 // Corresponds to display::NativeDisplayObserver. | 13 // Corresponds to display::NativeDisplayObserver. |
| 14 interface NativeDisplayObserver { | 14 interface NativeDisplayObserver { |
| 15 OnConfigurationChanged(); | 15 OnConfigurationChanged(); |
| 16 }; | 16 }; |
| 17 | 17 |
| 18 // Corresponds to display::NativeDisplayDelegate. This only implements | 18 // Corresponds to display::NativeDisplayDelegate. This only implements |
| 19 // functionality that is used by Ozone DRM. | 19 // functionality that is used by Ozone DRM. |
| 20 interface NativeDisplayDelegate { | 20 interface NativeDisplayDelegate { |
| 21 // Initializes and registers the observer. | 21 // Initializes and registers the observer. This is synchronous so that ash |
| 22 Initialize(NativeDisplayObserver observer); | 22 // initialization has an initial set of displays to use. |
| 23 [Sync] |
| 24 Initialize(NativeDisplayObserver observer) => (array<DisplaySnapshotMojo> snap
shots); |
| 23 | 25 |
| 24 // Take control of the displays from any other controlling process. | 26 // Take control of the displays from any other controlling process. |
| 25 TakeDisplayControl() => (bool result); | 27 TakeDisplayControl() => (bool result); |
| 26 | 28 |
| 27 // Let others control the displays. | 29 // Let others control the displays. |
| 28 RelinquishDisplayControl() => (bool result); | 30 RelinquishDisplayControl() => (bool result); |
| 29 | 31 |
| 30 // Queries for a list of fresh displays. | 32 // Queries for a list of fresh displays. |
| 31 GetDisplays() => (array<DisplaySnapshotMojo> snapshots); | 33 GetDisplays() => (array<DisplaySnapshotMojo> snapshots); |
| 32 | 34 |
| 33 // Configures the display represented by |display_id| to use |mode| and | 35 // Configures the display represented by |display_id| to use |mode| and |
| 34 // positions the display to |origin| in the framebuffer. |mode| can be null, | 36 // positions the display to |origin| in the framebuffer. |mode| can be null, |
| 35 // which represents disabling the display. | 37 // which represents disabling the display. |
| 36 Configure(int64 display_id, | 38 Configure(int64 display_id, |
| 37 DisplayMode mode, | 39 DisplayMode mode, |
| 38 gfx.mojom.Point origin) => (bool status); | 40 gfx.mojom.Point origin) => (bool status); |
| 39 | 41 |
| 40 // Gets HDCP state of output. | 42 // Gets HDCP state of output. |
| 41 GetHDCPState(int64 display_id) => (bool status, HDCPState state); | 43 GetHDCPState(int64 display_id) => (bool status, HDCPState state); |
| 42 | 44 |
| 43 // Sets HDCP state of output. | 45 // Sets HDCP state of output. |
| 44 SetHDCPState(int64 display_id, HDCPState state) => (bool status); | 46 SetHDCPState(int64 display_id, HDCPState state) => (bool status); |
| 45 | 47 |
| 46 // Set the gamma tables and correction matrix for |display_id|. | 48 // Set the gamma tables and correction matrix for |display_id|. |
| 47 SetColorCorrection(int64 display_id, | 49 SetColorCorrection(int64 display_id, |
| 48 array<GammaRampRGBEntry> degamma_lut, | 50 array<GammaRampRGBEntry> degamma_lut, |
| 49 array<GammaRampRGBEntry> gamma_lut, | 51 array<GammaRampRGBEntry> gamma_lut, |
| 50 array<float> correction_matrix); | 52 array<float> correction_matrix); |
| 51 }; | 53 }; |
| OLD | NEW |