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

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

Issue 2675743002: PPAPI: Make output protection API work with mus+ash (Closed)
Patch Set: Fix 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
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.h" 5 #include "services/ui/display/screen_manager_ozone.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"
(...skipping 283 matching lines...) Expand 10 before | Expand all | Expand 10 after
294 void ScreenManagerOzone::TakeDisplayControl( 294 void ScreenManagerOzone::TakeDisplayControl(
295 const TakeDisplayControlCallback& callback) { 295 const TakeDisplayControlCallback& callback) {
296 display_configurator_.TakeControl(callback); 296 display_configurator_.TakeControl(callback);
297 } 297 }
298 298
299 void ScreenManagerOzone::RelinquishDisplayControl( 299 void ScreenManagerOzone::RelinquishDisplayControl(
300 const RelinquishDisplayControlCallback& callback) { 300 const RelinquishDisplayControlCallback& callback) {
301 display_configurator_.RelinquishControl(callback); 301 display_configurator_.RelinquishControl(callback);
302 } 302 }
303 303
304 void ScreenManagerOzone::RegisterContentProtectionClient(
305 const RegisterContentProtectionClientCallback& callback) {
306 uint64_t client_id = display_configurator_.RegisterContentProtectionClient();
307 callback.Run(client_id);
308 }
309
310 void ScreenManagerOzone::UnregisterContentProtectionClient(uint64_t client_id) {
311 display_configurator_.UnregisterContentProtectionClient(client_id);
312 }
313
314 void ScreenManagerOzone::QueryContentProtectionStatus(
315 uint64_t client_id,
316 int64_t display_id,
317 const QueryContentProtectionStatusCallback& callback) {
318 display_configurator_.QueryContentProtectionStatus(client_id, display_id,
319 callback);
320 }
321
322 void ScreenManagerOzone::EnableContentProtection(
323 uint64_t client_id,
324 int64_t display_id,
325 uint32_t desired_method_mask,
326 const EnableContentProtectionCallback& callback) {
327 display_configurator_.EnableContentProtection(client_id, display_id,
328 desired_method_mask, callback);
329 }
330
304 void ScreenManagerOzone::OnDisplayAdded(const Display& display) { 331 void ScreenManagerOzone::OnDisplayAdded(const Display& display) {
305 ViewportMetrics metrics = GetViewportMetricsForDisplay(display); 332 ViewportMetrics metrics = GetViewportMetricsForDisplay(display);
306 DVLOG(1) << "OnDisplayAdded: " << display.ToString() << "\n " 333 DVLOG(1) << "OnDisplayAdded: " << display.ToString() << "\n "
307 << metrics.ToString(); 334 << metrics.ToString();
308 screen_->display_list().AddDisplay(display, DisplayList::Type::NOT_PRIMARY); 335 screen_->display_list().AddDisplay(display, DisplayList::Type::NOT_PRIMARY);
309 delegate_->OnDisplayAdded(display.id(), metrics); 336 delegate_->OnDisplayAdded(display.id(), metrics);
310 } 337 }
311 338
312 void ScreenManagerOzone::OnDisplayRemoved(const Display& display) { 339 void ScreenManagerOzone::OnDisplayRemoved(const Display& display) {
313 // TODO(kylechar): If we're removing the primary display we need to first set 340 // TODO(kylechar): If we're removing the primary display we need to first set
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
387 controller_bindings_.AddBinding(this, std::move(request)); 414 controller_bindings_.AddBinding(this, std::move(request));
388 } 415 }
389 416
390 void ScreenManagerOzone::Create( 417 void ScreenManagerOzone::Create(
391 const service_manager::Identity& remote_identity, 418 const service_manager::Identity& remote_identity,
392 mojom::TestDisplayControllerRequest request) { 419 mojom::TestDisplayControllerRequest request) {
393 test_bindings_.AddBinding(this, std::move(request)); 420 test_bindings_.AddBinding(this, std::move(request));
394 } 421 }
395 422
396 } // namespace display 423 } // namespace display
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698