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

Side by Side Diff: ui/display/chromeos/display_configurator.cc

Issue 1868363002: Replace scoped_ptr with std::unique_ptr in //ui (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@scopedptrcc
Patch Set: scopedptrui: rebase-make_scoped_ptr Created 4 years, 8 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "ui/display/chromeos/display_configurator.h" 5 #include "ui/display/chromeos/display_configurator.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 488 matching lines...) Expand 10 before | Expand all | Expand 10 after
499 query_protection_callbacks_.pop(); 499 query_protection_callbacks_.pop();
500 } 500 }
501 501
502 while (!enable_protection_callbacks_.empty()) { 502 while (!enable_protection_callbacks_.empty()) {
503 enable_protection_callbacks_.front().Run(false); 503 enable_protection_callbacks_.front().Run(false);
504 enable_protection_callbacks_.pop(); 504 enable_protection_callbacks_.pop();
505 } 505 }
506 } 506 }
507 507
508 void DisplayConfigurator::SetDelegateForTesting( 508 void DisplayConfigurator::SetDelegateForTesting(
509 scoped_ptr<NativeDisplayDelegate> display_delegate) { 509 std::unique_ptr<NativeDisplayDelegate> display_delegate) {
510 DCHECK(!native_display_delegate_); 510 DCHECK(!native_display_delegate_);
511 511
512 native_display_delegate_ = std::move(display_delegate); 512 native_display_delegate_ = std::move(display_delegate);
513 configure_display_ = true; 513 configure_display_ = true;
514 } 514 }
515 515
516 void DisplayConfigurator::SetInitialDisplayPower( 516 void DisplayConfigurator::SetInitialDisplayPower(
517 chromeos::DisplayPowerState power_state) { 517 chromeos::DisplayPowerState power_state) {
518 DCHECK_EQ(current_display_state_, MULTIPLE_DISPLAY_STATE_INVALID); 518 DCHECK_EQ(current_display_state_, MULTIPLE_DISPLAY_STATE_INVALID);
519 requested_power_state_ = current_power_state_ = power_state; 519 requested_power_state_ = current_power_state_ = power_state;
(...skipping 631 matching lines...) Expand 10 before | Expand all | Expand 10 after
1151 last_virtual_display_id_ = max_display_id & 0xff; 1151 last_virtual_display_id_ = max_display_id & 0xff;
1152 1152
1153 return true; 1153 return true;
1154 } 1154 }
1155 1155
1156 bool DisplayConfigurator::IsDisplayOn() const { 1156 bool DisplayConfigurator::IsDisplayOn() const {
1157 return current_power_state_ != chromeos::DISPLAY_POWER_ALL_OFF; 1157 return current_power_state_ != chromeos::DISPLAY_POWER_ALL_OFF;
1158 } 1158 }
1159 1159
1160 } // namespace ui 1160 } // namespace ui
OLDNEW
« no previous file with comments | « ui/display/chromeos/display_configurator.h ('k') | ui/display/chromeos/display_configurator_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698