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

Side by Side Diff: chrome/browser/ui/webui/chromeos/login/hid_detection_screen_handler.h

Issue 448153002: BT adapter is switched to initial state after HID screen if no BT devices connected. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Nit Created 6 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/ui/webui/chromeos/login/hid_detection_screen_handler.cc » ('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 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 #ifndef CHROME_BROWSER_UI_WEBUI_CHROMEOS_LOGIN_HID_DETECTION_SCREEN_HANDLER_H_ 5 #ifndef CHROME_BROWSER_UI_WEBUI_CHROMEOS_LOGIN_HID_DETECTION_SCREEN_HANDLER_H_
6 #define CHROME_BROWSER_UI_WEBUI_CHROMEOS_LOGIN_HID_DETECTION_SCREEN_HANDLER_H_ 6 #define CHROME_BROWSER_UI_WEBUI_CHROMEOS_LOGIN_HID_DETECTION_SCREEN_HANDLER_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
161 scoped_ptr<device::BluetoothDiscoverySession> discovery_session); 161 scoped_ptr<device::BluetoothDiscoverySession> discovery_session);
162 162
163 // Called by device::BluetoothAdapter in response to a failure to 163 // Called by device::BluetoothAdapter in response to a failure to
164 // initiate a discovery session. 164 // initiate a discovery session.
165 void FindDevicesError(); 165 void FindDevicesError();
166 166
167 // Called by device::BluetoothAdapter in response to a failure to 167 // Called by device::BluetoothAdapter in response to a failure to
168 // power BT adapter. 168 // power BT adapter.
169 void SetPoweredError(); 169 void SetPoweredError();
170 170
171 // Called by device::BluetoothAdapter in response to a failure to
172 // power off BT adapter.
173 void SetPoweredOffError();
174
171 // Called for revision of active devices. If current-placement is available 175 // Called for revision of active devices. If current-placement is available
172 // for mouse or keyboard device, sets one of active devices as current or 176 // for mouse or keyboard device, sets one of active devices as current or
173 // tries to connect some BT device if no appropriate devices are connected. 177 // tries to connect some BT device if no appropriate devices are connected.
174 void UpdateDevices(); 178 void UpdateDevices();
175 179
176 // Tries to connect some BT devices if no type-appropriate devices are 180 // Tries to connect some BT devices if no type-appropriate devices are
177 // connected. 181 // connected.
178 void UpdateBTDevices(); 182 void UpdateBTDevices();
179 183
180 // Tries to connect given BT device. 184 // Tries to connect given BT device.
(...skipping 22 matching lines...) Expand all
203 InputDeviceInfo::Type pointing_device_connect_type_; 207 InputDeviceInfo::Type pointing_device_connect_type_;
204 208
205 // Current keyboard device, if any. 209 // Current keyboard device, if any.
206 std::string keyboard_device_name_; 210 std::string keyboard_device_name_;
207 std::string keyboard_device_id_; 211 std::string keyboard_device_id_;
208 bool keyboard_is_pairing_; 212 bool keyboard_is_pairing_;
209 InputDeviceInfo::Type keyboard_device_connect_type_; 213 InputDeviceInfo::Type keyboard_device_connect_type_;
210 214
211 bool switch_on_adapter_when_ready_; 215 bool switch_on_adapter_when_ready_;
212 216
217 // State of BT adapter before screen-initiated changes.
218 scoped_ptr<bool> adapter_initially_powered_;
219
213 base::WeakPtrFactory<HIDDetectionScreenHandler> weak_ptr_factory_; 220 base::WeakPtrFactory<HIDDetectionScreenHandler> weak_ptr_factory_;
214 221
215 DISALLOW_COPY_AND_ASSIGN(HIDDetectionScreenHandler); 222 DISALLOW_COPY_AND_ASSIGN(HIDDetectionScreenHandler);
216 }; 223 };
217 224
218 } // namespace chromeos 225 } // namespace chromeos
219 226
220 #endif // CHROME_BROWSER_UI_WEBUI_CHROMEOS_LOGIN_HID_DETECTION_SCREEN_HANDLER_H _ 227 #endif // CHROME_BROWSER_UI_WEBUI_CHROMEOS_LOGIN_HID_DETECTION_SCREEN_HANDLER_H _
221 228
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/webui/chromeos/login/hid_detection_screen_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698