| 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/chromeos/bluetooth/bluetooth_pairing_dialog.h" | 5 #include "chrome/browser/chromeos/bluetooth/bluetooth_pairing_dialog.h" |
| 6 | 6 |
| 7 #include "base/json/json_writer.h" | 7 #include "base/json/json_writer.h" |
| 8 #include "chrome/browser/profiles/profile_manager.h" | 8 #include "chrome/browser/profiles/profile_manager.h" |
| 9 #include "chrome/browser/ui/browser_dialogs.h" | 9 #include "chrome/browser/ui/browser_dialogs.h" |
| 10 #include "chrome/common/url_constants.h" | 10 #include "chrome/common/url_constants.h" |
| (...skipping 17 matching lines...) Expand all Loading... |
| 28 | 28 |
| 29 /////////////////////////////////////////////////////////////////////////////// | 29 /////////////////////////////////////////////////////////////////////////////// |
| 30 // BluetoothPairingDialog, public: | 30 // BluetoothPairingDialog, public: |
| 31 | 31 |
| 32 BluetoothPairingDialog::BluetoothPairingDialog( | 32 BluetoothPairingDialog::BluetoothPairingDialog( |
| 33 gfx::NativeWindow parent_window, | 33 gfx::NativeWindow parent_window, |
| 34 const device::BluetoothDevice* device) | 34 const device::BluetoothDevice* device) |
| 35 : parent_window_(parent_window), | 35 : parent_window_(parent_window), |
| 36 webui_(nullptr) { | 36 webui_(nullptr) { |
| 37 device_data_.SetString("address", device->GetAddress()); | 37 device_data_.SetString("address", device->GetAddress()); |
| 38 device_data_.SetString("name", device->GetName()); | 38 device_data_.SetString("name", device->GetNameForDisplay()); |
| 39 device_data_.SetBoolean("paired", device->IsPaired()); | 39 device_data_.SetBoolean("paired", device->IsPaired()); |
| 40 device_data_.SetBoolean("connected", device->IsConnected()); | 40 device_data_.SetBoolean("connected", device->IsConnected()); |
| 41 } | 41 } |
| 42 | 42 |
| 43 BluetoothPairingDialog::~BluetoothPairingDialog() { | 43 BluetoothPairingDialog::~BluetoothPairingDialog() { |
| 44 } | 44 } |
| 45 | 45 |
| 46 void BluetoothPairingDialog::Show() { | 46 void BluetoothPairingDialog::Show() { |
| 47 // Bluetooth settings are currently stored on the device, accessible for | 47 // Bluetooth settings are currently stored on the device, accessible for |
| 48 // everyone who uses the machine. As such we can use the active user profile. | 48 // everyone who uses the machine. As such we can use the active user profile. |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 100 return true; | 100 return true; |
| 101 } | 101 } |
| 102 | 102 |
| 103 bool BluetoothPairingDialog::HandleContextMenu( | 103 bool BluetoothPairingDialog::HandleContextMenu( |
| 104 const content::ContextMenuParams& params) { | 104 const content::ContextMenuParams& params) { |
| 105 // Disable context menu. | 105 // Disable context menu. |
| 106 return true; | 106 return true; |
| 107 } | 107 } |
| 108 | 108 |
| 109 } // namespace chromeos | 109 } // namespace chromeos |
| OLD | NEW |