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

Unified Diff: chrome/browser/ui/ash/tray_bluetooth_helper.cc

Issue 2754143006: cros: Convert SystemTrayDelegate::ManageBluetoothDevices to mojo for mash (Closed)
Patch Set: rebase 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/ash/tray_bluetooth_helper.cc
diff --git a/chrome/browser/ui/ash/tray_bluetooth_helper.cc b/chrome/browser/ui/ash/tray_bluetooth_helper.cc
index f3373e0bbec4b96806ea4044ca19533266624c73..0bd3cda44d465da2e8183090e07f06c9e5945edd 100644
--- a/chrome/browser/ui/ash/tray_bluetooth_helper.cc
+++ b/chrome/browser/ui/ash/tray_bluetooth_helper.cc
@@ -10,15 +10,12 @@
#include "base/bind.h"
#include "base/bind_helpers.h"
#include "base/metrics/user_metrics.h"
-#include "chrome/browser/chromeos/bluetooth/bluetooth_pairing_dialog.h"
#include "chrome/browser/ui/ash/system_tray_client.h"
#include "device/bluetooth/bluetooth_adapter.h"
#include "device/bluetooth/bluetooth_adapter_factory.h"
#include "device/bluetooth/bluetooth_device.h"
#include "device/bluetooth/bluetooth_discovery_session.h"
-using chromeos::BluetoothPairingDialog;
-
namespace {
void BluetoothSetDiscoveringError() {
@@ -109,12 +106,9 @@ void TrayBluetoothHelper::ConnectToDevice(const std::string& address) {
return;
}
// Show pairing dialog for the unpaired device.
- // TODO(jamescook): Move into SystemTrayClient and wire up with mojo.
- base::RecordAction(
- base::UserMetricsAction("StatusArea_Bluetooth_Connect_Unknown"));
- BluetoothPairingDialog* dialog = new BluetoothPairingDialog(device);
- // The dialog deletes itself on close.
- dialog->ShowInContainer(SystemTrayClient::GetDialogParentContainerId());
+ SystemTrayClient::Get()->ShowBluetoothPairingDialog(
+ device->GetAddress(), device->GetNameForDisplay(), device->IsPaired(),
+ device->IsConnected());
}
bool TrayBluetoothHelper::IsDiscovering() const {

Powered by Google App Engine
This is Rietveld 408576698