Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(90)

Side by Side Diff: services/ui/display/screen_manager_ozone_internal.cc

Issue 2675743002: PPAPI: Make output protection API work with mus+ash (Closed)
Patch Set: Addressed review issues Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « services/ui/display/screen_manager_ozone_internal.h ('k') | services/ui/manifest.json » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "services/service_manager/public/cpp/interface_registry.h" 15 #include "services/service_manager/public/cpp/interface_registry.h"
16 #include "services/ui/display/output_protection.h"
15 #include "third_party/skia/include/core/SkColor.h" 17 #include "third_party/skia/include/core/SkColor.h"
16 #include "ui/display/manager/chromeos/display_change_observer.h" 18 #include "ui/display/manager/chromeos/display_change_observer.h"
17 #include "ui/display/manager/chromeos/touch_transform_controller.h" 19 #include "ui/display/manager/chromeos/touch_transform_controller.h"
18 #include "ui/display/manager/display_layout_store.h" 20 #include "ui/display/manager/display_layout_store.h"
19 #include "ui/display/manager/display_manager_utilities.h" 21 #include "ui/display/manager/display_manager_utilities.h"
20 #include "ui/display/screen.h" 22 #include "ui/display/screen.h"
21 #include "ui/display/screen_base.h" 23 #include "ui/display/screen_base.h"
22 #include "ui/display/types/display_snapshot.h" 24 #include "ui/display/types/display_snapshot.h"
23 #include "ui/display/types/fake_display_controller.h" 25 #include "ui/display/types/fake_display_controller.h"
24 #include "ui/display/types/native_display_delegate.h" 26 #include "ui/display/types/native_display_delegate.h"
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 display_manager_->set_force_bounds_changed(false); 130 display_manager_->set_force_bounds_changed(false);
129 131
130 DVLOG(1) << "Primary display changed from " << old_primary_display_id 132 DVLOG(1) << "Primary display changed from " << old_primary_display_id
131 << " to " << primary_display_id_; 133 << " to " << primary_display_id_;
132 delegate_->OnPrimaryDisplayChanged(primary_display_id_); 134 delegate_->OnPrimaryDisplayChanged(primary_display_id_);
133 } 135 }
134 136
135 void ScreenManagerOzoneInternal::AddInterfaces( 137 void ScreenManagerOzoneInternal::AddInterfaces(
136 service_manager::InterfaceRegistry* registry) { 138 service_manager::InterfaceRegistry* registry) {
137 registry->AddInterface<mojom::DisplayController>(this); 139 registry->AddInterface<mojom::DisplayController>(this);
140 registry->AddInterface<mojom::OutputProtection>(this);
138 registry->AddInterface<mojom::TestDisplayController>(this); 141 registry->AddInterface<mojom::TestDisplayController>(this);
139 } 142 }
140 143
141 void ScreenManagerOzoneInternal::Init(ScreenManagerDelegate* delegate) { 144 void ScreenManagerOzoneInternal::Init(ScreenManagerDelegate* delegate) {
142 DCHECK(delegate); 145 DCHECK(delegate);
143 delegate_ = delegate; 146 delegate_ = delegate;
144 147
145 // Tests may inject a NativeDisplayDelegate, otherwise get it from 148 // Tests may inject a NativeDisplayDelegate, otherwise get it from
146 // OzonePlatform. 149 // OzonePlatform.
147 if (!native_display_delegate_) { 150 if (!native_display_delegate_) {
(...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after
384 } 387 }
385 388
386 void ScreenManagerOzoneInternal::Create( 389 void ScreenManagerOzoneInternal::Create(
387 const service_manager::Identity& remote_identity, 390 const service_manager::Identity& remote_identity,
388 mojom::DisplayControllerRequest request) { 391 mojom::DisplayControllerRequest request) {
389 controller_bindings_.AddBinding(this, std::move(request)); 392 controller_bindings_.AddBinding(this, std::move(request));
390 } 393 }
391 394
392 void ScreenManagerOzoneInternal::Create( 395 void ScreenManagerOzoneInternal::Create(
393 const service_manager::Identity& remote_identity, 396 const service_manager::Identity& remote_identity,
397 mojom::OutputProtectionRequest request) {
398 mojo::MakeStrongBinding(
399 base::MakeUnique<OutputProtection>(display_configurator()),
400 std::move(request));
401 }
402
403 void ScreenManagerOzoneInternal::Create(
404 const service_manager::Identity& remote_identity,
394 mojom::TestDisplayControllerRequest request) { 405 mojom::TestDisplayControllerRequest request) {
395 test_bindings_.AddBinding(this, std::move(request)); 406 test_bindings_.AddBinding(this, std::move(request));
396 } 407 }
397 408
398 } // namespace display 409 } // namespace display
OLDNEW
« no previous file with comments | « services/ui/display/screen_manager_ozone_internal.h ('k') | services/ui/manifest.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698