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

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

Issue 273533004: Flag covering HID-detection OOBE screen removed. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Proper HID handler used. Created 6 years, 6 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
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
11 #include "base/compiler_specific.h" 11 #include "base/compiler_specific.h"
12 #include "base/memory/scoped_ptr.h" 12 #include "base/memory/scoped_ptr.h"
13 #include "base/memory/weak_ptr.h" 13 #include "base/memory/weak_ptr.h"
14 #include "base/prefs/pref_registry_simple.h" 14 #include "base/prefs/pref_registry_simple.h"
15 #include "base/values.h" 15 #include "base/values.h"
16 #include "chrome/browser/chromeos/device/input_service_proxy.h" 16 #include "chrome/browser/chromeos/device/input_service_proxy.h"
17 #include "chrome/browser/chromeos/login/screens/hid_detection_screen_actor.h" 17 #include "chrome/browser/chromeos/login/screens/hid_detection_screen_actor.h"
18 #include "chrome/browser/ui/webui/chromeos/login/base_screen_handler.h" 18 #include "chrome/browser/ui/webui/chromeos/login/base_screen_handler.h"
19 #include "content/public/browser/web_ui.h" 19 #include "content/public/browser/web_ui.h"
20 #include "device/bluetooth/bluetooth_adapter.h" 20 #include "device/bluetooth/bluetooth_adapter.h"
21 #include "device/bluetooth/bluetooth_device.h" 21 #include "device/bluetooth/bluetooth_device.h"
22 #include "device/bluetooth/bluetooth_discovery_session.h" 22 #include "device/bluetooth/bluetooth_discovery_session.h"
23 23
24 namespace base { 24 namespace base {
25 class DictionaryValue; 25 class DictionaryValue;
26 } 26 }
27 27
28 namespace chromeos { 28 namespace chromeos {
29 29
30 class CoreOobeActor;
31
30 // WebUI implementation of HIDDetectionScreenActor. 32 // WebUI implementation of HIDDetectionScreenActor.
31 class HIDDetectionScreenHandler 33 class HIDDetectionScreenHandler
32 : public HIDDetectionScreenActor, 34 : public HIDDetectionScreenActor,
33 public BaseScreenHandler, 35 public BaseScreenHandler,
34 public device::BluetoothAdapter::Observer, 36 public device::BluetoothAdapter::Observer,
35 public device::BluetoothDevice::PairingDelegate, 37 public device::BluetoothDevice::PairingDelegate,
36 public InputServiceProxy::Observer { 38 public InputServiceProxy::Observer {
37 public: 39 public:
38 typedef device::InputServiceLinux::InputDeviceInfo InputDeviceInfo; 40 typedef device::InputServiceLinux::InputDeviceInfo InputDeviceInfo;
39 41
40 HIDDetectionScreenHandler(); 42 explicit HIDDetectionScreenHandler(CoreOobeActor* core_oobe_actor);
41 virtual ~HIDDetectionScreenHandler(); 43 virtual ~HIDDetectionScreenHandler();
42 44
43 // HIDDetectionScreenActor implementation: 45 // HIDDetectionScreenActor implementation:
44 virtual void Show() OVERRIDE; 46 virtual void Show() OVERRIDE;
45 virtual void Hide() OVERRIDE; 47 virtual void Hide() OVERRIDE;
46 virtual void SetDelegate(Delegate* delegate) OVERRIDE; 48 virtual void SetDelegate(Delegate* delegate) OVERRIDE;
47 49
48 // BaseScreenHandler implementation: 50 // BaseScreenHandler implementation:
49 virtual void DeclareLocalizedValues(LocalizedValuesBuilder* builder) OVERRIDE; 51 virtual void DeclareLocalizedValues(LocalizedValuesBuilder* builder) OVERRIDE;
50 virtual void Initialize() OVERRIDE; 52 virtual void Initialize() OVERRIDE;
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 // encoded in |error_code|. 138 // encoded in |error_code|.
137 void BTConnectError(const std::string& address, 139 void BTConnectError(const std::string& address,
138 device::BluetoothDevice::DeviceType device_type, 140 device::BluetoothDevice::DeviceType device_type,
139 device::BluetoothDevice::ConnectErrorCode error_code); 141 device::BluetoothDevice::ConnectErrorCode error_code);
140 142
141 // JS messages handlers. 143 // JS messages handlers.
142 void HandleOnContinue(); 144 void HandleOnContinue();
143 145
144 Delegate* delegate_; 146 Delegate* delegate_;
145 147
148 CoreOobeActor* core_oobe_actor_;
149
146 // Keeps whether screen should be shown right after initialization. 150 // Keeps whether screen should be shown right after initialization.
147 bool show_on_init_; 151 bool show_on_init_;
148 152
149 // Displays in the UI a connecting to the device |device| message. 153 // Displays in the UI a connecting to the device |device| message.
150 void DeviceConnecting(device::BluetoothDevice* device); 154 void DeviceConnecting(device::BluetoothDevice* device);
151 155
152 // Called by device::BluetoothAdapter in response to a successful request 156 // Called by device::BluetoothAdapter in response to a successful request
153 // to initiate a discovery session. 157 // to initiate a discovery session.
154 void OnStartDiscoverySession( 158 void OnStartDiscoverySession(
155 scoped_ptr<device::BluetoothDiscoverySession> discovery_session); 159 scoped_ptr<device::BluetoothDiscoverySession> discovery_session);
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
212 216
213 base::WeakPtrFactory<HIDDetectionScreenHandler> weak_ptr_factory_; 217 base::WeakPtrFactory<HIDDetectionScreenHandler> weak_ptr_factory_;
214 218
215 DISALLOW_COPY_AND_ASSIGN(HIDDetectionScreenHandler); 219 DISALLOW_COPY_AND_ASSIGN(HIDDetectionScreenHandler);
216 }; 220 };
217 221
218 } // namespace chromeos 222 } // namespace chromeos
219 223
220 #endif // CHROME_BROWSER_UI_WEBUI_CHROMEOS_LOGIN_HID_DETECTION_SCREEN_HANDLER_H _ 224 #endif // CHROME_BROWSER_UI_WEBUI_CHROMEOS_LOGIN_HID_DETECTION_SCREEN_HANDLER_H _
221 225
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698