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 #include "chrome/browser/ui/webui/options/chromeos/bluetooth_options_handler.h" | 5 #include "chrome/browser/ui/webui/options/chromeos/bluetooth_options_handler.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/utf_string_conversions.h" | 9 #include "base/utf_string_conversions.h" |
10 #include "base/values.h" | 10 #include "base/values.h" |
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
110 l10n_util::GetStringUTF16( | 110 l10n_util::GetStringUTF16( |
111 IDS_OPTIONS_SETTINGS_BLUETOOTH_CONNECTION_FAILED_INCORRECT_PIN)); | 111 IDS_OPTIONS_SETTINGS_BLUETOOTH_CONNECTION_FAILED_INCORRECT_PIN)); |
112 localized_strings->SetString("bluetoothErrorTimeout", | 112 localized_strings->SetString("bluetoothErrorTimeout", |
113 l10n_util::GetStringUTF16( | 113 l10n_util::GetStringUTF16( |
114 IDS_OPTIONS_SETTINGS_BLUETOOTH_CONNECTION_FAILED_TIMEOUT)); | 114 IDS_OPTIONS_SETTINGS_BLUETOOTH_CONNECTION_FAILED_TIMEOUT)); |
115 localized_strings->SetString("bluetoothErrorConnectionFailed", | 115 localized_strings->SetString("bluetoothErrorConnectionFailed", |
116 l10n_util::GetStringUTF16( | 116 l10n_util::GetStringUTF16( |
117 IDS_OPTIONS_SETTINGS_BLUETOOTH_CONNECTION_FAILED)); | 117 IDS_OPTIONS_SETTINGS_BLUETOOTH_CONNECTION_FAILED)); |
118 } | 118 } |
119 | 119 |
120 void BluetoothOptionsHandler::Initialize() { | 120 void BluetoothOptionsHandler::InitializeHandler() { |
121 // Bluetooth support is a work in progress. Supress the feature unless | 121 // Bluetooth support is a work in progress. Supress the feature unless |
122 // explicitly enabled via a command line flag. | 122 // explicitly enabled via a command line flag. |
123 if (!CommandLine::ForCurrentProcess() | 123 if (!CommandLine::ForCurrentProcess() |
124 ->HasSwitch(switches::kEnableBluetooth)) { | 124 ->HasSwitch(switches::kEnableBluetooth)) { |
125 return; | 125 return; |
126 } | 126 } |
127 | 127 |
128 adapter_.reset(BluetoothAdapter::CreateDefaultAdapter()); | 128 adapter_.reset(BluetoothAdapter::CreateDefaultAdapter()); |
129 adapter_->AddObserver(this); | 129 adapter_->AddObserver(this); |
130 | 130 |
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
304 | 304 |
305 void BluetoothOptionsHandler::ErrorCallback() { | 305 void BluetoothOptionsHandler::ErrorCallback() { |
306 // TODO(keybuk): we don't get any form of error response from dbus:: | 306 // TODO(keybuk): we don't get any form of error response from dbus:: |
307 // yet, other than an error occurred. I'm going to fix that, then this | 307 // yet, other than an error occurred. I'm going to fix that, then this |
308 // gets replaced by genuine error information from the method which we | 308 // gets replaced by genuine error information from the method which we |
309 // can act on, rather than a debug log statement. | 309 // can act on, rather than a debug log statement. |
310 DVLOG(1) << "Failed."; | 310 DVLOG(1) << "Failed."; |
311 } | 311 } |
312 | 312 |
313 } // namespace chromeos | 313 } // namespace chromeos |
OLD | NEW |