Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4)

Side by Side Diff: chrome/browser/chromeos/bluetooth/bluetooth_pairing_dialog.cc

Issue 2017393002: bluetooth: Rename device's GetName to GetNameForDisplay (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698