From b306277dc52cb70308325c4e2749787b40575ee6 Mon Sep 17 00:00:00 2001 From: Scott Violet Date: Thu, 23 Aug 2018 19:01:15 +0000 Subject: [PATCH] chromeos: removes more dead mojoms/code The mojoms TouchDeviceServer, NativeDisplayDelegate and AccessibilityManager are all not needed. Additionally TouchTransformSetterMus is not used. BUG=none TEST=none Change-Id: I8d42aac5d548e5a109289133baeb3dd7fa3dd26b Reviewed-on: https://chromium-review.googlesource.com/1185969 Reviewed-by: Tom Sepez Reviewed-by: kylechar Commit-Queue: Scott Violet Cr-Commit-Position: refs/heads/master@{#585567} --- ash/BUILD.gn | 2 - ash/touch/touch_transform_setter_mus.cc | 31 ---- ash/touch/touch_transform_setter_mus.h | 37 ----- .../accessibility_extension_api.cc | 1 - .../cpp/bindings/sync_call_restrictions.h | 11 -- services/ui/input_devices/BUILD.gn | 8 - .../ui/input_devices/touch_device_server.cc | 31 ---- .../ui/input_devices/touch_device_server.h | 41 ----- services/ui/manifest.json | 4 - services/ui/public/interfaces/BUILD.gn | 1 - .../interfaces/accessibility_manager.mojom | 13 -- .../public/interfaces/input_devices/BUILD.gn | 8 +- .../input_devices/touch_device_server.mojom | 12 -- ui/display/manager/BUILD.gn | 2 - .../manager/forwarding_display_delegate.cc | 142 ------------------ .../manager/forwarding_display_delegate.h | 88 ----------- ui/display/mojo/BUILD.gn | 1 - ui/display/mojo/native_display_delegate.mojom | 58 ------- 18 files changed, 2 insertions(+), 489 deletions(-) delete mode 100644 ash/touch/touch_transform_setter_mus.cc delete mode 100644 ash/touch/touch_transform_setter_mus.h delete mode 100644 services/ui/input_devices/touch_device_server.cc delete mode 100644 services/ui/input_devices/touch_device_server.h delete mode 100644 services/ui/public/interfaces/accessibility_manager.mojom delete mode 100644 services/ui/public/interfaces/input_devices/touch_device_server.mojom delete mode 100644 ui/display/manager/forwarding_display_delegate.cc delete mode 100644 ui/display/manager/forwarding_display_delegate.h delete mode 100644 ui/display/mojo/native_display_delegate.mojom diff --git a/ash/BUILD.gn b/ash/BUILD.gn index 7a72e4f6f3b3ae..57cb1c1f592b90 100644 --- a/ash/BUILD.gn +++ b/ash/BUILD.gn @@ -1056,8 +1056,6 @@ component("ash") { "touch/touch_devices_controller.cc", "touch/touch_devices_controller.h", "touch/touch_observer_hud.cc", - "touch/touch_transform_setter_mus.cc", - "touch/touch_transform_setter_mus.h", "touch/touch_uma.cc", "touch/touch_uma.h", "tray_action/tray_action.cc", diff --git a/ash/touch/touch_transform_setter_mus.cc b/ash/touch/touch_transform_setter_mus.cc deleted file mode 100644 index eacb8330a62ab1..00000000000000 --- a/ash/touch/touch_transform_setter_mus.cc +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright 2017 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#include "ash/touch/touch_transform_setter_mus.h" - -#include "services/service_manager/public/cpp/connector.h" -#include "services/ui/public/interfaces/constants.mojom.h" -#include "ui/events/devices/touch_device_transform.h" - -namespace ash { - -TouchTransformSetterMus::TouchTransformSetterMus( - service_manager::Connector* connector) { - if (!connector) - return; - - connector->BindInterface(ui::mojom::kServiceName, &touch_device_server_); -} - -TouchTransformSetterMus::~TouchTransformSetterMus() = default; - -void TouchTransformSetterMus::ConfigureTouchDevices( - const std::vector& transforms) { - if (!touch_device_server_) - return; // May be null in tests. - - touch_device_server_->ConfigureTouchDevices(transforms); -} - -} // namespace ash diff --git a/ash/touch/touch_transform_setter_mus.h b/ash/touch/touch_transform_setter_mus.h deleted file mode 100644 index baa3266e62b269..00000000000000 --- a/ash/touch/touch_transform_setter_mus.h +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright 2017 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#ifndef ASH_TOUCH_TOUCH_TRANSFORM_SETTER_MUS_H_ -#define ASH_TOUCH_TOUCH_TRANSFORM_SETTER_MUS_H_ - -#include "base/macros.h" -#include "services/ui/public/interfaces/input_devices/touch_device_server.mojom.h" -#include "ui/display/manager/touch_transform_setter.h" - -namespace service_manager { -class Connector; -} - -namespace ash { - -// display::TouchTransformSetter implementation for mus. Updates are applied -// by way of ui::mojom::TouchDeviceServer. -class TouchTransformSetterMus : public display::TouchTransformSetter { - public: - explicit TouchTransformSetterMus(service_manager::Connector* connector); - ~TouchTransformSetterMus() override; - - // TouchTransformSetter: - void ConfigureTouchDevices( - const std::vector& transforms) override; - - private: - ui::mojom::TouchDeviceServerPtr touch_device_server_; - - DISALLOW_COPY_AND_ASSIGN(TouchTransformSetterMus); -}; - -} // namespace ash - -#endif // ASH_TOUCH_TOUCH_TRANSFORM_SETTER_MUS_H_ diff --git a/chrome/browser/accessibility/accessibility_extension_api.cc b/chrome/browser/accessibility/accessibility_extension_api.cc index fa43e451c3fed9..2ffd012d95af25 100644 --- a/chrome/browser/accessibility/accessibility_extension_api.cc +++ b/chrome/browser/accessibility/accessibility_extension_api.cc @@ -41,7 +41,6 @@ #include "ash/shell.h" #include "chrome/browser/chromeos/accessibility/accessibility_manager.h" #include "chrome/browser/chromeos/arc/accessibility/arc_accessibility_helper_bridge.h" -#include "services/ui/public/interfaces/accessibility_manager.mojom.h" #include "ui/aura/window_tree_host.h" #include "ui/base/ui_base_features.h" #include "ui/events/event_sink.h" diff --git a/mojo/public/cpp/bindings/sync_call_restrictions.h b/mojo/public/cpp/bindings/sync_call_restrictions.h index e72cb1d3cb162d..0c5972ee7c6106 100644 --- a/mojo/public/cpp/bindings/sync_call_restrictions.h +++ b/mojo/public/cpp/bindings/sync_call_restrictions.h @@ -25,10 +25,6 @@ namespace content { class BlinkTestController; } -namespace display { -class ForwardingDisplayDelegate; -} - namespace leveldb { class LevelDBMojoProxy; } @@ -107,13 +103,6 @@ class MOJO_CPP_BINDINGS_EXPORT SyncCallRestrictions { friend class ui::HostContextFactoryPrivate; // END ALLOWED USAGE. - // BEGIN USAGE THAT NEEDS TO BE FIXED. - // In ash::Shell::Init() it assumes that NativeDisplayDelegate will be - // synchronous at first. In mushrome ForwardingDisplayDelegate uses a - // synchronous call to get the display snapshots as a workaround. - friend class display::ForwardingDisplayDelegate; - // END USAGE THAT NEEDS TO BE FIXED. - #if ENABLE_SYNC_CALL_RESTRICTIONS static void IncreaseScopedAllowCount(); static void DecreaseScopedAllowCount(); diff --git a/services/ui/input_devices/BUILD.gn b/services/ui/input_devices/BUILD.gn index f99b761d0d3a12..687a256fa3b62d 100644 --- a/services/ui/input_devices/BUILD.gn +++ b/services/ui/input_devices/BUILD.gn @@ -19,14 +19,6 @@ source_set("input_devices") { public_deps = [ "//services/ui/public/interfaces/input_devices", ] - - if (is_chromeos) { - sources += [ - "touch_device_server.cc", - "touch_device_server.h", - ] - deps += [ "//ui/display/manager" ] - } } source_set("tests") { diff --git a/services/ui/input_devices/touch_device_server.cc b/services/ui/input_devices/touch_device_server.cc deleted file mode 100644 index 2263282927fcad..00000000000000 --- a/services/ui/input_devices/touch_device_server.cc +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright 2017 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#include "services/ui/input_devices/touch_device_server.h" - -#include -#include - -#include "ui/display/manager/default_touch_transform_setter.h" -#include "ui/events/devices/input_device.h" -#include "ui/events/devices/touchscreen_device.h" - -namespace ui { - -TouchDeviceServer::TouchDeviceServer() - : touch_transform_setter_( - std::make_unique()) {} - -TouchDeviceServer::~TouchDeviceServer() {} - -void TouchDeviceServer::AddBinding(mojom::TouchDeviceServerRequest request) { - bindings_.AddBinding(this, std::move(request)); -} - -void TouchDeviceServer::ConfigureTouchDevices( - const std::vector& transforms) { - touch_transform_setter_->ConfigureTouchDevices(transforms); -} - -} // namespace ui diff --git a/services/ui/input_devices/touch_device_server.h b/services/ui/input_devices/touch_device_server.h deleted file mode 100644 index 84478e956f1fc4..00000000000000 --- a/services/ui/input_devices/touch_device_server.h +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2017 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#ifndef SERVICES_UI_INPUT_DEVICES_TOUCH_DEVICE_SERVER_H_ -#define SERVICES_UI_INPUT_DEVICES_TOUCH_DEVICE_SERVER_H_ - -#include "base/macros.h" -#include "mojo/public/cpp/bindings/binding_set.h" -#include "mojo/public/cpp/bindings/interface_ptr_set.h" -#include "services/ui/public/interfaces/input_devices/touch_device_server.mojom.h" - -namespace display { -class DefaultTouchTransformSetter; -} - -namespace ui { - -// Implementation of mojom::TouchDeviceServer. Uses an instance of -// DefaultTouchTransformSetter to apply the actual updates. -class TouchDeviceServer : public mojom::TouchDeviceServer { - public: - TouchDeviceServer(); - ~TouchDeviceServer() override; - - void AddBinding(mojom::TouchDeviceServerRequest request); - - // mojom::TouchDeviceServer: - void ConfigureTouchDevices( - const std::vector& transforms) override; - - private: - mojo::BindingSet bindings_; - std::unique_ptr touch_transform_setter_; - - DISALLOW_COPY_AND_ASSIGN(TouchDeviceServer); -}; - -} // namespace ui - -#endif // SERVICES_UI_INPUT_DEVICES_TOUCH_DEVICE_SERVER_H_ diff --git a/services/ui/manifest.json b/services/ui/manifest.json index 5db8c2b09c565c..965c2c7029ac98 100644 --- a/services/ui/manifest.json +++ b/services/ui/manifest.json @@ -46,17 +46,13 @@ "ui.mojom.EventInjector", "ui.mojom.RemotingEventInjector" ], - // TODO(sky): update this to reflect what is really possible. "window_manager": [ "discardable_memory.mojom.DiscardableSharedMemoryManager", - "display.mojom.NativeDisplayDelegate", - "ui.mojom.AccessibilityManager", "ui.mojom.EventInjector", "ui.mojom.Gpu", "ui.mojom.IMEDriver", "ui.mojom.InputDeviceController", "ui.mojom.InputDeviceServer", - "ui.mojom.TouchDeviceServer", "ui.mojom.UserActivityMonitor" ] }, diff --git a/services/ui/public/interfaces/BUILD.gn b/services/ui/public/interfaces/BUILD.gn index 127c95d1da820f..168d04d5200017 100644 --- a/services/ui/public/interfaces/BUILD.gn +++ b/services/ui/public/interfaces/BUILD.gn @@ -7,7 +7,6 @@ import("//testing/test.gni") mojom("interfaces") { sources = [ - "accessibility_manager.mojom", "event_injector.mojom", "gpu.mojom", "remoting_event_injector.mojom", diff --git a/services/ui/public/interfaces/accessibility_manager.mojom b/services/ui/public/interfaces/accessibility_manager.mojom deleted file mode 100644 index a63873db09b039..00000000000000 --- a/services/ui/public/interfaces/accessibility_manager.mojom +++ /dev/null @@ -1,13 +0,0 @@ -// Copyright 2016 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -module ui.mojom; - -// Allows controlling accessibility in the UI service. Only one client at a time -// can connect to AccessibilityManager per user. If a new client connects to it, -// then any previously connected client for that user is disconnected. -interface AccessibilityManager { - // Enables (or disables) high contrast mode. - SetHighContrastMode(bool enabled); -}; diff --git a/services/ui/public/interfaces/input_devices/BUILD.gn b/services/ui/public/interfaces/input_devices/BUILD.gn index 5b0180ef58d04c..ba75934be0518e 100644 --- a/services/ui/public/interfaces/input_devices/BUILD.gn +++ b/services/ui/public/interfaces/input_devices/BUILD.gn @@ -15,11 +15,7 @@ mojom("input_devices") { ] if (is_chromeos) { - sources += [ "touch_device_server.mojom" ] - public_deps += [ "//ui/events/devices/mojo" ] - if (use_ozone) { - sources += [ "input_device_controller.mojom" ] - public_deps += [ "//mojo/public/mojom/base" ] - } + sources += [ "input_device_controller.mojom" ] + public_deps += [ "//mojo/public/mojom/base" ] } } diff --git a/services/ui/public/interfaces/input_devices/touch_device_server.mojom b/services/ui/public/interfaces/input_devices/touch_device_server.mojom deleted file mode 100644 index fefcb6f8cb41bd..00000000000000 --- a/services/ui/public/interfaces/input_devices/touch_device_server.mojom +++ /dev/null @@ -1,12 +0,0 @@ -// Copyright 2017 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -module ui.mojom; - -import "ui/events/devices/mojo/touch_device_transform.mojom"; - -interface TouchDeviceServer { - // Reset the touch configuration. - ConfigureTouchDevices(array transforms); -}; diff --git a/ui/display/manager/BUILD.gn b/ui/display/manager/BUILD.gn index 66954c3d2bd65e..f43c0dea56d2e6 100644 --- a/ui/display/manager/BUILD.gn +++ b/ui/display/manager/BUILD.gn @@ -19,8 +19,6 @@ jumbo_component("manager") { "fake_display_delegate.h", "fake_display_snapshot.cc", "fake_display_snapshot.h", - "forwarding_display_delegate.cc", - "forwarding_display_delegate.h", "json_converter.cc", "json_converter.h", "managed_display_info.cc", diff --git a/ui/display/manager/forwarding_display_delegate.cc b/ui/display/manager/forwarding_display_delegate.cc deleted file mode 100644 index 50623ee051f49f..00000000000000 --- a/ui/display/manager/forwarding_display_delegate.cc +++ /dev/null @@ -1,142 +0,0 @@ -// Copyright 2017 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#include "ui/display/manager/forwarding_display_delegate.h" - -#include - -#include "base/bind.h" -#include "mojo/public/cpp/bindings/sync_call_restrictions.h" -#include "ui/display/types/display_snapshot.h" - -namespace display { - -ForwardingDisplayDelegate::ForwardingDisplayDelegate( - mojom::NativeDisplayDelegatePtr delegate) - : delegate_(std::move(delegate)), binding_(this) {} - -ForwardingDisplayDelegate::~ForwardingDisplayDelegate() {} - -void ForwardingDisplayDelegate::Initialize() { - // TODO(kylechar/sky): Figure out how to make this not synchronous. - mojo::SyncCallRestrictions::ScopedAllowSyncCall scoped_sync; - - // This is a synchronous call to Initialize() because ash depends on - // NativeDisplayDelegate being synchronous during it's initialization. Calls - // to GetDisplays() and Configure() will return early starting now using - // whatever is in |snapshots_|. - mojom::NativeDisplayObserverPtr observer; - binding_.Bind(mojo::MakeRequest(&observer)); - delegate_->Initialize(std::move(observer), &snapshots_); -} - -void ForwardingDisplayDelegate::TakeDisplayControl( - DisplayControlCallback callback) { - delegate_->TakeDisplayControl(std::move(callback)); -} - -void ForwardingDisplayDelegate::RelinquishDisplayControl( - DisplayControlCallback callback) { - delegate_->RelinquishDisplayControl(std::move(callback)); -} - -void ForwardingDisplayDelegate::GetDisplays(GetDisplaysCallback callback) { - if (!use_delegate_) { - ForwardDisplays(std::move(callback)); - return; - } - - delegate_->GetDisplays( - base::BindOnce(&ForwardingDisplayDelegate::StoreAndForwardDisplays, - base::Unretained(this), std::move(callback))); -} - -void ForwardingDisplayDelegate::Configure(const DisplaySnapshot& snapshot, - const DisplayMode* mode, - const gfx::Point& origin, - ConfigureCallback callback) { - if (!use_delegate_) { - // Pretend configuration succeeded. When the first OnConfigurationChanged() - // is received this will run again and actually happen. - std::move(callback).Run(true); - return; - } - - base::Optional> transport_mode; - if (mode) - transport_mode = mode->Clone(); - delegate_->Configure(snapshot.display_id(), std::move(transport_mode), origin, - std::move(callback)); -} - -void ForwardingDisplayDelegate::GetHDCPState(const DisplaySnapshot& snapshot, - GetHDCPStateCallback callback) { - delegate_->GetHDCPState(snapshot.display_id(), std::move(callback)); -} - -void ForwardingDisplayDelegate::SetHDCPState(const DisplaySnapshot& snapshot, - HDCPState state, - SetHDCPStateCallback callback) { - delegate_->SetHDCPState(snapshot.display_id(), state, std::move(callback)); -} - -bool ForwardingDisplayDelegate::SetColorMatrix( - int64_t display_id, - const std::vector& color_matrix) { - delegate_->SetColorMatrix(display_id, color_matrix); - // DrmNativeDisplayDelegate always returns true so this will too. - return true; -} - -bool ForwardingDisplayDelegate::SetGammaCorrection( - int64_t display_id, - const std::vector& degamma_lut, - const std::vector& gamma_lut) { - delegate_->SetGammaCorrection(display_id, degamma_lut, gamma_lut); - // DrmNativeDisplayDelegate always returns true so this will too. - return true; -} - -void ForwardingDisplayDelegate::AddObserver( - display::NativeDisplayObserver* observer) { - observers_.AddObserver(observer); -} - -void ForwardingDisplayDelegate::RemoveObserver( - display::NativeDisplayObserver* observer) { - observers_.RemoveObserver(observer); -} - -FakeDisplayController* ForwardingDisplayDelegate::GetFakeDisplayController() { - return nullptr; -} - -void ForwardingDisplayDelegate::OnConfigurationChanged() { - // Start asynchronous operation once the first OnConfigurationChanged() - // arrives. We know |delegate_| is usable at this point. - use_delegate_ = true; - - // Forward OnConfigurationChanged received over Mojo to local observers. - for (auto& observer : observers_) - observer.OnConfigurationChanged(); -} - -void ForwardingDisplayDelegate::StoreAndForwardDisplays( - GetDisplaysCallback callback, - std::vector> snapshots) { - for (auto& observer : observers_) - observer.OnDisplaySnapshotsInvalidated(); - snapshots_ = std::move(snapshots); - - ForwardDisplays(std::move(callback)); -} - -void ForwardingDisplayDelegate::ForwardDisplays(GetDisplaysCallback callback) { - std::vector snapshot_ptrs; - for (auto& snapshot : snapshots_) - snapshot_ptrs.push_back(snapshot.get()); - std::move(callback).Run(snapshot_ptrs); -} - -} // namespace display diff --git a/ui/display/manager/forwarding_display_delegate.h b/ui/display/manager/forwarding_display_delegate.h deleted file mode 100644 index dd524fda683e88..00000000000000 --- a/ui/display/manager/forwarding_display_delegate.h +++ /dev/null @@ -1,88 +0,0 @@ -// Copyright 2017 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#ifndef UI_DISPLAY_MANAGER_FORWARDING_DISPLAY_DELEGATE_H_ -#define UI_DISPLAY_MANAGER_FORWARDING_DISPLAY_DELEGATE_H_ - -#include -#include - -#include "base/compiler_specific.h" -#include "base/macros.h" -#include "base/observer_list.h" -#include "mojo/public/cpp/bindings/binding.h" -#include "ui/display/manager/display_manager_export.h" -#include "ui/display/mojo/native_display_delegate.mojom.h" -#include "ui/display/types/native_display_delegate.h" -#include "ui/display/types/native_display_observer.h" - -namespace display { - -class DisplaySnapshot; - -// NativeDisplayDelegate implementation that forwards calls to a real -// NativeDisplayDelegate in another process. Only forwards the methods -// implemented by Ozone DRM, other method won't do anything. -class DISPLAY_MANAGER_EXPORT ForwardingDisplayDelegate - : public NativeDisplayDelegate, - public mojom::NativeDisplayObserver { - public: - explicit ForwardingDisplayDelegate(mojom::NativeDisplayDelegatePtr delegate); - ~ForwardingDisplayDelegate() override; - - // display::NativeDisplayDelegate: - void Initialize() override; - void TakeDisplayControl(DisplayControlCallback callback) override; - void RelinquishDisplayControl(DisplayControlCallback callback) override; - void GetDisplays(GetDisplaysCallback callback) override; - void Configure(const DisplaySnapshot& output, - const DisplayMode* mode, - const gfx::Point& origin, - ConfigureCallback callback) override; - void GetHDCPState(const DisplaySnapshot& output, - GetHDCPStateCallback callback) override; - void SetHDCPState(const DisplaySnapshot& output, - HDCPState state, - SetHDCPStateCallback callback) override; - bool SetColorMatrix(int64_t display_id, - const std::vector& color_matrix) override; - bool SetGammaCorrection( - int64_t display_id, - const std::vector& degamma_lut, - const std::vector& gamma_lut) override; - void AddObserver(display::NativeDisplayObserver* observer) override; - void RemoveObserver(display::NativeDisplayObserver* observer) override; - FakeDisplayController* GetFakeDisplayController() override; - - // display::mojom::NativeDisplayObserver: - void OnConfigurationChanged() override; - - private: - // Stores display snapshots and forwards pointers to |callback|. - void StoreAndForwardDisplays( - GetDisplaysCallback callback, - std::vector> snapshots); - - // Forwards display snapshot pointers to |callback|. - void ForwardDisplays(GetDisplaysCallback callback); - - // True if we should use |delegate_|. This will be false if synchronous - // GetDisplays() and Configure() are required. - bool use_delegate_ = false; - - mojom::NativeDisplayDelegatePtr delegate_; - mojo::Binding binding_; - - // Display snapshots are owned here but accessed via raw pointers elsewhere. - // Call OnDisplaySnapshotsInvalidated() on observers before invalidating them. - std::vector> snapshots_; - - base::ObserverList::Unchecked observers_; - - DISALLOW_COPY_AND_ASSIGN(ForwardingDisplayDelegate); -}; - -} // namespace display - -#endif // UI_DISPLAY_MANAGER_FORWARDING_DISPLAY_DELEGATE_H_ diff --git a/ui/display/mojo/BUILD.gn b/ui/display/mojo/BUILD.gn index 1b54224310762e..c60046c3aea722 100644 --- a/ui/display/mojo/BUILD.gn +++ b/ui/display/mojo/BUILD.gn @@ -12,7 +12,6 @@ mojom("interfaces") { "display_mode.mojom", "display_snapshot.mojom", "gamma_ramp_rgb_entry.mojom", - "native_display_delegate.mojom", ] public_deps = [ diff --git a/ui/display/mojo/native_display_delegate.mojom b/ui/display/mojo/native_display_delegate.mojom deleted file mode 100644 index 6659ac63496f04..00000000000000 --- a/ui/display/mojo/native_display_delegate.mojom +++ /dev/null @@ -1,58 +0,0 @@ -// Copyright 2017 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -module display.mojom; - -import "ui/display/mojo/display_constants.mojom"; -import "ui/display/mojo/display_mode.mojom"; -import "ui/display/mojo/display_snapshot.mojom"; -import "ui/display/mojo/gamma_ramp_rgb_entry.mojom"; -import "ui/gfx/geometry/mojo/geometry.mojom"; - -// Corresponds to display::NativeDisplayObserver. -interface NativeDisplayObserver { - OnConfigurationChanged(); -}; - -// Corresponds to display::NativeDisplayDelegate. This only implements -// functionality that is used by Ozone DRM. -interface NativeDisplayDelegate { - // Initializes and registers the observer. This is synchronous so that ash - // initialization has an initial set of displays to use. - [Sync] - Initialize(NativeDisplayObserver observer) => - (array snapshots); - - // Take control of the displays from any other controlling process. - TakeDisplayControl() => (bool result); - - // Let others control the displays. - RelinquishDisplayControl() => (bool result); - - // Queries for a list of fresh displays. - GetDisplays() => (array snapshots); - - // Configures the display represented by |display_id| to use |mode| and - // positions the display to |origin| in the framebuffer. |mode| can be null, - // which represents disabling the display. - Configure(int64 display_id, - DisplayMode? mode, - gfx.mojom.Point origin) => (bool status); - - // Gets HDCP state of output. - GetHDCPState(int64 display_id) => (bool status, HDCPState state); - - // Sets HDCP state of output. - SetHDCPState(int64 display_id, HDCPState state) => (bool status); - - // Sets a 3x3 color transform matrix on the display hardware. - // TODO: Consider using a different type for the color matrix. - // https://crbug.com/846975. - SetColorMatrix(int64 display_id, array color_matrix); - - // Set the gamma lookup tables for |display_id|. - SetGammaCorrection(int64 display_id, - array degamma_lut, - array gamma_lut); -};