| 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 15 matching lines...) Expand all Loading... |
| 26 | 26 |
| 27 } // namespace | 27 } // namespace |
| 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 device_data_.SetString("address", device->address()); | 36 device_data_.SetString("address", device->GetAddress()); |
| 37 device_data_.SetString("name", device->GetName()); | 37 device_data_.SetString("name", device->GetName()); |
| 38 device_data_.SetBoolean("paired", device->IsPaired()); | 38 device_data_.SetBoolean("paired", device->IsPaired()); |
| 39 device_data_.SetBoolean("bonded", device->IsBonded()); | |
| 40 device_data_.SetBoolean("connected", device->IsConnected()); | 39 device_data_.SetBoolean("connected", device->IsConnected()); |
| 41 } | 40 } |
| 42 | 41 |
| 43 BluetoothPairingDialog::~BluetoothPairingDialog() { | 42 BluetoothPairingDialog::~BluetoothPairingDialog() { |
| 44 } | 43 } |
| 45 | 44 |
| 46 void BluetoothPairingDialog::Show() { | 45 void BluetoothPairingDialog::Show() { |
| 47 chrome::ShowWebDialog(parent_window_, | 46 chrome::ShowWebDialog(parent_window_, |
| 48 ProfileManager::GetDefaultProfile(), | 47 ProfileManager::GetDefaultProfile(), |
| 49 this); | 48 this); |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 93 return true; | 92 return true; |
| 94 } | 93 } |
| 95 | 94 |
| 96 bool BluetoothPairingDialog::HandleContextMenu( | 95 bool BluetoothPairingDialog::HandleContextMenu( |
| 97 const content::ContextMenuParams& params) { | 96 const content::ContextMenuParams& params) { |
| 98 // Disable context menu. | 97 // Disable context menu. |
| 99 return true; | 98 return true; |
| 100 } | 99 } |
| 101 | 100 |
| 102 } // namespace chromeos | 101 } // namespace chromeos |
| OLD | NEW |