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

Unified Diff: ash/shell.cc

Issue 2764643003: cros: Move TrayBluetoothHelper out of chrome into ash (Closed)
Patch Set: rebase fix 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
« no previous file with comments | « ash/shell.h ('k') | chrome/browser/ui/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/shell.cc
diff --git a/ash/shell.cc b/ash/shell.cc
index 24e080b9eda818909dce59b4baa968cf59537cae..99410325ab3929f70302f2858245de08ae5f6f80 100644
--- a/ash/shell.cc
+++ b/ash/shell.cc
@@ -33,6 +33,7 @@
#include "ash/common/shell_observer.h"
#include "ash/common/system/brightness_control_delegate.h"
#include "ash/common/system/chromeos/bluetooth/bluetooth_notification_controller.h"
+#include "ash/common/system/chromeos/bluetooth/tray_bluetooth_helper.h"
#include "ash/common/system/chromeos/brightness/brightness_controller_chromeos.h"
#include "ash/common/system/chromeos/keyboard_brightness_controller.h"
#include "ash/common/system/chromeos/network/sms_observer.h"
@@ -527,6 +528,7 @@ Shell::Shell(std::unique_ptr<ShellDelegate> shell_delegate,
system_tray_controller_(base::MakeUnique<SystemTrayController>()),
app_list_(base::MakeUnique<app_list::AppList>()),
link_handler_model_factory_(nullptr),
+ tray_bluetooth_helper_(base::MakeUnique<TrayBluetoothHelper>()),
display_configurator_(new display::DisplayConfigurator()),
native_cursor_manager_(nullptr),
simulate_modal_window_open_for_testing_(false),
@@ -609,6 +611,7 @@ Shell::~Shell() {
// to deinitialize the shelf first, as it is initialized after the delegate.
for (WmWindow* root : wm_shell_->GetAllRootWindows())
root->GetRootWindowController()->GetShelf()->ShutdownShelfWidget();
+ tray_bluetooth_helper_.reset();
DeleteSystemTrayDelegate();
// Drag-and-drop must be canceled prior to close all windows.
@@ -971,6 +974,9 @@ void Shell::Init(const ShellInitParams& init_params) {
SetSystemTrayDelegate(
base::WrapUnique(shell_delegate_->CreateSystemTrayDelegate()));
+ // May trigger initialization of the Bluetooth adapter.
+ tray_bluetooth_helper_->Initialize();
+
// Create AshTouchTransformController before
// WindowTreeHostManager::InitDisplays()
// since AshTouchTransformController listens on
« no previous file with comments | « ash/shell.h ('k') | chrome/browser/ui/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698