OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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" |
11 #include "chrome/browser/chromeos/bluetooth/bluetooth_device.h" | 11 #include "chrome/browser/chromeos/bluetooth/bluetooth_device.h" |
12 #include "chrome/browser/chromeos/system/runtime_environment.h" | 12 #include "chrome/browser/chromeos/system/runtime_environment.h" |
13 #include "chrome/browser/ui/webui/options/chromeos/system_settings_provider.h" | 13 #include "chrome/browser/ui/webui/options/chromeos/system_settings_provider.h" |
14 #include "chrome/common/chrome_switches.h" | 14 #include "chrome/common/chrome_switches.h" |
15 #include "grit/chromium_strings.h" | 15 #include "grit/chromium_strings.h" |
16 #include "grit/generated_resources.h" | 16 #include "grit/generated_resources.h" |
17 #include "third_party/cros_system_api/dbus/service_constants.h" | 17 #include "third_party/cros_system_api/dbus/service_constants.h" |
18 #include "ui/base/l10n/l10n_util.h" | 18 #include "ui/base/l10n/l10n_util.h" |
19 | 19 |
20 namespace chromeos { | 20 namespace chromeos { |
21 | 21 |
22 BluetoothOptionsHandler::BluetoothOptionsHandler() | 22 BluetoothOptionsHandler::BluetoothOptionsHandler() { |
23 : chromeos::CrosOptionsPageUIHandler( | |
24 new chromeos::SystemSettingsProvider()) { | |
25 } | 23 } |
26 | 24 |
27 BluetoothOptionsHandler::~BluetoothOptionsHandler() { | 25 BluetoothOptionsHandler::~BluetoothOptionsHandler() { |
28 if (!CommandLine::ForCurrentProcess() | 26 if (!CommandLine::ForCurrentProcess() |
29 ->HasSwitch(switches::kEnableBluetooth)) { | 27 ->HasSwitch(switches::kEnableBluetooth)) { |
30 return; | 28 return; |
31 } | 29 } |
32 | 30 |
33 chromeos::BluetoothManager* bluetooth_manager = | 31 chromeos::BluetoothManager* bluetooth_manager = |
34 chromeos::BluetoothManager::GetInstance(); | 32 chromeos::BluetoothManager::GetInstance(); |
(...skipping 338 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
373 } else if (pairing.compare("bluetoothConfirmPasskey") == 0) { | 371 } else if (pairing.compare("bluetoothConfirmPasskey") == 0) { |
374 RequestConfirmation(device, 12345); | 372 RequestConfirmation(device, 12345); |
375 } else if (pairing.compare("bluetoothEnterPasskey") == 0) { | 373 } else if (pairing.compare("bluetoothEnterPasskey") == 0) { |
376 RequestPasskey(device); | 374 RequestPasskey(device); |
377 } | 375 } |
378 delete device; | 376 delete device; |
379 } | 377 } |
380 | 378 |
381 } // namespace chromeos | 379 } // namespace chromeos |
382 | 380 |
OLD | NEW |