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 #include "services/ui/display/screen_manager_ozone_internal.h" | 5 #include "services/ui/display/screen_manager_ozone_internal.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 #include <utility> | 8 #include <utility> |
9 | 9 |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
11 #include "base/memory/ptr_util.h" | 11 #include "base/memory/ptr_util.h" |
12 #include "base/threading/thread_task_runner_handle.h" | 12 #include "base/threading/thread_task_runner_handle.h" |
13 #include "chromeos/system/devicemode.h" | 13 #include "chromeos/system/devicemode.h" |
14 #include "mojo/public/cpp/bindings/strong_binding.h" | 14 #include "mojo/public/cpp/bindings/strong_binding.h" |
15 #include "services/service_manager/public/cpp/interface_registry.h" | 15 #include "services/service_manager/public/cpp/binder_registry.h" |
16 #include "services/ui/display/output_protection.h" | 16 #include "services/ui/display/output_protection.h" |
17 #include "third_party/skia/include/core/SkColor.h" | 17 #include "third_party/skia/include/core/SkColor.h" |
18 #include "ui/display/manager/chromeos/display_change_observer.h" | 18 #include "ui/display/manager/chromeos/display_change_observer.h" |
19 #include "ui/display/manager/chromeos/touch_transform_controller.h" | 19 #include "ui/display/manager/chromeos/touch_transform_controller.h" |
20 #include "ui/display/manager/display_layout_store.h" | 20 #include "ui/display/manager/display_layout_store.h" |
21 #include "ui/display/manager/display_manager_utilities.h" | 21 #include "ui/display/manager/display_manager_utilities.h" |
22 #include "ui/display/screen.h" | 22 #include "ui/display/screen.h" |
23 #include "ui/display/screen_base.h" | 23 #include "ui/display/screen_base.h" |
24 #include "ui/display/types/display_snapshot.h" | 24 #include "ui/display/types/display_snapshot.h" |
25 #include "ui/display/types/fake_display_controller.h" | 25 #include "ui/display/types/fake_display_controller.h" |
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
103 display_manager_->set_force_bounds_changed(true); | 103 display_manager_->set_force_bounds_changed(true); |
104 display_manager_->UpdateDisplays(); | 104 display_manager_->UpdateDisplays(); |
105 display_manager_->set_force_bounds_changed(false); | 105 display_manager_->set_force_bounds_changed(false); |
106 | 106 |
107 DVLOG(1) << "Primary display changed from " << old_primary_display_id | 107 DVLOG(1) << "Primary display changed from " << old_primary_display_id |
108 << " to " << primary_display_id_; | 108 << " to " << primary_display_id_; |
109 delegate_->OnPrimaryDisplayChanged(primary_display_id_); | 109 delegate_->OnPrimaryDisplayChanged(primary_display_id_); |
110 } | 110 } |
111 | 111 |
112 void ScreenManagerOzoneInternal::AddInterfaces( | 112 void ScreenManagerOzoneInternal::AddInterfaces( |
113 service_manager::InterfaceRegistry* registry) { | 113 service_manager::BinderRegistry* registry) { |
114 registry->AddInterface<mojom::DisplayController>(this); | 114 registry->AddInterface<mojom::DisplayController>(this); |
115 registry->AddInterface<mojom::OutputProtection>(this); | 115 registry->AddInterface<mojom::OutputProtection>(this); |
116 registry->AddInterface<mojom::TestDisplayController>(this); | 116 registry->AddInterface<mojom::TestDisplayController>(this); |
117 } | 117 } |
118 | 118 |
119 void ScreenManagerOzoneInternal::Init(ScreenManagerDelegate* delegate) { | 119 void ScreenManagerOzoneInternal::Init(ScreenManagerDelegate* delegate) { |
120 DCHECK(delegate); | 120 DCHECK(delegate); |
121 delegate_ = delegate; | 121 delegate_ = delegate; |
122 | 122 |
123 // Tests may inject a NativeDisplayDelegate, otherwise get it from | 123 // Tests may inject a NativeDisplayDelegate, otherwise get it from |
(...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
364 std::move(request)); | 364 std::move(request)); |
365 } | 365 } |
366 | 366 |
367 void ScreenManagerOzoneInternal::Create( | 367 void ScreenManagerOzoneInternal::Create( |
368 const service_manager::Identity& remote_identity, | 368 const service_manager::Identity& remote_identity, |
369 mojom::TestDisplayControllerRequest request) { | 369 mojom::TestDisplayControllerRequest request) { |
370 test_bindings_.AddBinding(this, std::move(request)); | 370 test_bindings_.AddBinding(this, std::move(request)); |
371 } | 371 } |
372 | 372 |
373 } // namespace display | 373 } // namespace display |
OLD | NEW |