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

Side by Side Diff: ash/common/system/chromeos/bluetooth/tray_bluetooth_helper.cc

Issue 2775973002: Promotes more accessors from WmShell to Shell (Closed)
Patch Set: feedback Created 3 years, 9 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 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 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 "ash/common/system/chromeos/bluetooth/tray_bluetooth_helper.h" 5 #include "ash/common/system/chromeos/bluetooth/tray_bluetooth_helper.h"
6 6
7 #include "ash/common/system/tray/system_tray_controller.h" 7 #include "ash/common/system/tray/system_tray_controller.h"
8 #include "ash/common/system/tray/system_tray_notifier.h" 8 #include "ash/common/system/tray/system_tray_notifier.h"
9 #include "ash/common/wm_shell.h"
10 #include "ash/shell.h" 9 #include "ash/shell.h"
11 #include "base/bind.h" 10 #include "base/bind.h"
12 #include "base/bind_helpers.h" 11 #include "base/bind_helpers.h"
13 #include "base/metrics/user_metrics.h" 12 #include "base/metrics/user_metrics.h"
14 #include "device/bluetooth/bluetooth_adapter.h" 13 #include "device/bluetooth/bluetooth_adapter.h"
15 #include "device/bluetooth/bluetooth_adapter_factory.h" 14 #include "device/bluetooth/bluetooth_adapter_factory.h"
16 #include "device/bluetooth/bluetooth_device.h" 15 #include "device/bluetooth/bluetooth_device.h"
17 #include "device/bluetooth/bluetooth_discovery_session.h" 16 #include "device/bluetooth/bluetooth_discovery_session.h"
18 17
19 namespace ash { 18 namespace ash {
20 namespace { 19 namespace {
21 20
22 void BluetoothSetDiscoveringError() { 21 void BluetoothSetDiscoveringError() {
23 LOG(ERROR) << "BluetoothSetDiscovering failed."; 22 LOG(ERROR) << "BluetoothSetDiscovering failed.";
24 } 23 }
25 24
26 void BluetoothDeviceConnectError( 25 void BluetoothDeviceConnectError(
27 device::BluetoothDevice::ConnectErrorCode error_code) {} 26 device::BluetoothDevice::ConnectErrorCode error_code) {}
28 27
29 ash::SystemTrayNotifier* GetSystemTrayNotifier() { 28 ash::SystemTrayNotifier* GetSystemTrayNotifier() {
30 return WmShell::Get()->system_tray_notifier(); 29 return Shell::Get()->system_tray_notifier();
31 } 30 }
32 31
33 } // namespace 32 } // namespace
34 33
35 BluetoothDeviceInfo::BluetoothDeviceInfo() 34 BluetoothDeviceInfo::BluetoothDeviceInfo()
36 : connected(false), connecting(false), paired(false) {} 35 : connected(false), connecting(false), paired(false) {}
37 36
38 BluetoothDeviceInfo::BluetoothDeviceInfo(const BluetoothDeviceInfo& other) = 37 BluetoothDeviceInfo::BluetoothDeviceInfo(const BluetoothDeviceInfo& other) =
39 default; 38 default;
40 39
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
179 // (e.g. the user dismissed the Bluetooth detailed view before the call 178 // (e.g. the user dismissed the Bluetooth detailed view before the call
180 // returned), don't claim the discovery session and let it clean up. 179 // returned), don't claim the discovery session and let it clean up.
181 if (!should_run_discovery_) 180 if (!should_run_discovery_)
182 return; 181 return;
183 VLOG(1) << "Claiming new Bluetooth device discovery session."; 182 VLOG(1) << "Claiming new Bluetooth device discovery session.";
184 discovery_session_ = std::move(discovery_session); 183 discovery_session_ = std::move(discovery_session);
185 GetSystemTrayNotifier()->NotifyBluetoothDiscoveringChanged(); 184 GetSystemTrayNotifier()->NotifyBluetoothDiscoveringChanged();
186 } 185 }
187 186
188 } // namespace ash 187 } // namespace ash
OLDNEW
« no previous file with comments | « ash/common/system/chromeos/bluetooth/tray_bluetooth.cc ('k') | ash/common/system/chromeos/enterprise/tray_enterprise.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698