| Index: chrome/browser/ui/ash/system_tray_client.cc
|
| diff --git a/chrome/browser/ui/ash/system_tray_client.cc b/chrome/browser/ui/ash/system_tray_client.cc
|
| index 82d88b1c3db659229cb44a4f9202a8e1242f9e0b..30465c5676f77a4ebac6c89a6f5657a6e70d43c3 100644
|
| --- a/chrome/browser/ui/ash/system_tray_client.cc
|
| +++ b/chrome/browser/ui/ash/system_tray_client.cc
|
| @@ -11,10 +11,12 @@
|
| #include "ash/shell.h"
|
| #include "base/feature_list.h"
|
| #include "base/logging.h"
|
| +#include "base/metrics/user_metrics.h"
|
| #include "chrome/browser/browser_process.h"
|
| #include "chrome/browser/browser_process_platform_part.h"
|
| #include "chrome/browser/chrome_notification_types.h"
|
| #include "chrome/browser/chromeos/accessibility/accessibility_util.h"
|
| +#include "chrome/browser/chromeos/bluetooth/bluetooth_pairing_dialog.h"
|
| #include "chrome/browser/chromeos/login/ui/login_display_host.h"
|
| #include "chrome/browser/chromeos/options/network_config_view.h"
|
| #include "chrome/browser/chromeos/profiles/profile_helper.h"
|
| @@ -39,6 +41,7 @@
|
| #include "content/public/browser/notification_service.h"
|
| #include "content/public/browser/user_metrics.h"
|
| #include "content/public/common/service_manager_connection.h"
|
| +#include "device/bluetooth/bluetooth_device.h"
|
| #include "extensions/browser/api/vpn_provider/vpn_service.h"
|
| #include "extensions/browser/api/vpn_provider/vpn_service_factory.h"
|
| #include "net/base/escape.h"
|
| @@ -49,8 +52,10 @@
|
| #include "ui/views/widget/widget.h"
|
| #include "ui/views/window/dialog_delegate.h"
|
|
|
| +using chromeos::BluetoothPairingDialog;
|
| using chromeos::DBusThreadManager;
|
| using chromeos::LoginState;
|
| +using device::BluetoothDevice;
|
| using views::Widget;
|
|
|
| namespace {
|
| @@ -213,6 +218,28 @@ void SystemTrayClient::ShowSettings() {
|
| ShowSettingsSubPageForActiveUser(std::string());
|
| }
|
|
|
| +void SystemTrayClient::ShowBluetoothSettings() {
|
| + base::RecordAction(base::UserMetricsAction("ShowBluetoothSettingsPage"));
|
| + ShowSettingsSubPageForActiveUser(chrome::kBluetoothSubPage);
|
| +}
|
| +
|
| +void SystemTrayClient::ShowBluetoothPairingDialog(
|
| + const std::string& address,
|
| + const base::string16& name_for_display,
|
| + bool paired,
|
| + bool connected) {
|
| + std::string canonical_address = BluetoothDevice::CanonicalizeAddress(address);
|
| + if (canonical_address.empty()) // Address was invalid.
|
| + return;
|
| +
|
| + base::RecordAction(
|
| + base::UserMetricsAction("StatusArea_Bluetooth_Connect_Unknown"));
|
| + BluetoothPairingDialog* dialog = new BluetoothPairingDialog(
|
| + canonical_address, name_for_display, paired, connected);
|
| + // The dialog deletes itself on close.
|
| + dialog->ShowInContainer(GetDialogParentContainerId());
|
| +}
|
| +
|
| void SystemTrayClient::ShowDateSettings() {
|
| content::RecordAction(base::UserMetricsAction("ShowDateOptions"));
|
| // Everybody can change the time zone (even though it is a device setting).
|
|
|