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

Side by Side Diff: chrome/browser/chromeos/login/screens/hid_detection_screen.cc

Issue 2705363002: cros: Move BaseScreenDelegate::ExitCodes into separate file, ScreenExitCode. (Closed)
Patch Set: Rebase Created 3 years, 9 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 "chrome/browser/chromeos/login/screens/hid_detection_screen.h" 5 #include "chrome/browser/chromeos/login/screens/hid_detection_screen.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/metrics/histogram_macros.h" 10 #include "base/metrics/histogram_macros.h"
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 const bool adapter_is_powered = 109 const bool adapter_is_powered =
110 adapter_.get() && adapter_->IsPresent() && adapter_->IsPowered(); 110 adapter_.get() && adapter_->IsPresent() && adapter_->IsPowered();
111 const bool need_switching_off = 111 const bool need_switching_off =
112 adapter_initially_powered_ && !(*adapter_initially_powered_); 112 adapter_initially_powered_ && !(*adapter_initially_powered_);
113 if (adapter_is_powered && need_switching_off) { 113 if (adapter_is_powered && need_switching_off) {
114 input_service_proxy_.GetDevices( 114 input_service_proxy_.GetDevices(
115 base::Bind(&HIDDetectionScreen::OnGetInputDevicesForPowerOff, 115 base::Bind(&HIDDetectionScreen::OnGetInputDevicesForPowerOff,
116 weak_ptr_factory_.GetWeakPtr())); 116 weak_ptr_factory_.GetWeakPtr()));
117 } 117 }
118 118
119 Finish(BaseScreenDelegate::HID_DETECTION_COMPLETED); 119 Finish(ScreenExitCode::HID_DETECTION_COMPLETED);
120 } 120 }
121 121
122 void HIDDetectionScreen::OnViewDestroyed(HIDDetectionView* view) { 122 void HIDDetectionScreen::OnViewDestroyed(HIDDetectionView* view) {
123 if (view_ == view) 123 if (view_ == view)
124 view_ = nullptr; 124 view_ = nullptr;
125 } 125 }
126 126
127 void HIDDetectionScreen::CheckIsScreenRequired( 127 void HIDDetectionScreen::CheckIsScreenRequired(
128 const base::Callback<void(bool)>& on_check_done) { 128 const base::Callback<void(bool)>& on_check_done) {
129 input_service_proxy_.GetDevices( 129 input_service_proxy_.GetDevices(
(...skipping 432 matching lines...) Expand 10 before | Expand all | Expand 10 after
562 scoped_refptr<device::BluetoothAdapter> 562 scoped_refptr<device::BluetoothAdapter>
563 HIDDetectionScreen::GetAdapterForTesting() { 563 HIDDetectionScreen::GetAdapterForTesting() {
564 return adapter_; 564 return adapter_;
565 } 565 }
566 566
567 void HIDDetectionScreen::SetAdapterInitialPoweredForTesting(bool powered) { 567 void HIDDetectionScreen::SetAdapterInitialPoweredForTesting(bool powered) {
568 adapter_initially_powered_.reset(new bool(powered)); 568 adapter_initially_powered_.reset(new bool(powered));
569 } 569 }
570 570
571 } // namespace chromeos 571 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/login/screens/eula_screen.cc ('k') | chrome/browser/chromeos/login/screens/host_pairing_screen.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698