| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_OPTIONS2_CHROMEOS_BLUETOOTH_OPTIONS_HANDLER2_H_ | 5 #ifndef CHROME_BROWSER_UI_WEBUI_OPTIONS2_CHROMEOS_BLUETOOTH_OPTIONS_HANDLER2_H_ |
| 6 #define CHROME_BROWSER_UI_WEBUI_OPTIONS2_CHROMEOS_BLUETOOTH_OPTIONS_HANDLER2_H_ | 6 #define CHROME_BROWSER_UI_WEBUI_OPTIONS2_CHROMEOS_BLUETOOTH_OPTIONS_HANDLER2_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 23 matching lines...) Expand all Loading... |
| 34 enum ConnectionError { | 34 enum ConnectionError { |
| 35 DEVICE_NOT_FOUND, | 35 DEVICE_NOT_FOUND, |
| 36 INCORRECT_PIN, | 36 INCORRECT_PIN, |
| 37 CONNECTION_TIMEOUT, | 37 CONNECTION_TIMEOUT, |
| 38 CONNECTION_REJECTED | 38 CONNECTION_REJECTED |
| 39 }; | 39 }; |
| 40 | 40 |
| 41 // OptionsPageUIHandler implementation. | 41 // OptionsPageUIHandler implementation. |
| 42 virtual void GetLocalizedValues( | 42 virtual void GetLocalizedValues( |
| 43 base::DictionaryValue* localized_strings) OVERRIDE; | 43 base::DictionaryValue* localized_strings) OVERRIDE; |
| 44 virtual void Initialize() OVERRIDE; | 44 virtual void InitializeHandler() OVERRIDE; |
| 45 virtual void InitializePage() OVERRIDE; |
| 45 virtual void RegisterMessages() OVERRIDE; | 46 virtual void RegisterMessages() OVERRIDE; |
| 46 | 47 |
| 47 // Called when the 'Enable bluetooth' checkbox value is changed. | 48 // Called when the 'Enable bluetooth' checkbox value is changed. |
| 48 // |args| will contain the checkbox checked state as a string | 49 // |args| will contain the checkbox checked state as a string |
| 49 // ("true" or "false"). | 50 // ("true" or "false"). |
| 50 void EnableChangeCallback(const base::ListValue* args); | 51 void EnableChangeCallback(const base::ListValue* args); |
| 51 | 52 |
| 52 // Called when the 'Find Devices' button is pressed from the Bluetooth | 53 // Called when the 'Find Devices' button is pressed from the Bluetooth |
| 53 // ssettings. | 54 // ssettings. |
| 54 // |args| will be an empty list. | 55 // |args| will be an empty list. |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 135 BluetoothDevice* device) OVERRIDE; | 136 BluetoothDevice* device) OVERRIDE; |
| 136 | 137 |
| 137 private: | 138 private: |
| 138 // Called by BluetoothAdapter in response to our method calls in case of | 139 // Called by BluetoothAdapter in response to our method calls in case of |
| 139 // error. | 140 // error. |
| 140 void ErrorCallback(); | 141 void ErrorCallback(); |
| 141 | 142 |
| 142 // Default bluetooth adapter, used for all operations. Owned by this object. | 143 // Default bluetooth adapter, used for all operations. Owned by this object. |
| 143 scoped_ptr<BluetoothAdapter> adapter_; | 144 scoped_ptr<BluetoothAdapter> adapter_; |
| 144 | 145 |
| 146 // Whether the bluetooth flag is present or not for the current process' |
| 147 // command line flags. |
| 148 bool bluetooth_enabled_; |
| 149 |
| 145 DISALLOW_COPY_AND_ASSIGN(BluetoothOptionsHandler); | 150 DISALLOW_COPY_AND_ASSIGN(BluetoothOptionsHandler); |
| 146 }; | 151 }; |
| 147 | 152 |
| 148 } // namespace options2 | 153 } // namespace options2 |
| 149 } // namespace chromeos | 154 } // namespace chromeos |
| 150 | 155 |
| 151 #endif // CHROME_BROWSER_UI_WEBUI_OPTIONS2_CHROMEOS_BLUETOOTH_OPTIONS_HANDLER2_
H_ | 156 #endif // CHROME_BROWSER_UI_WEBUI_OPTIONS2_CHROMEOS_BLUETOOTH_OPTIONS_HANDLER2_
H_ |
| OLD | NEW |