summaryrefslogtreecommitdiffstats
path: root/extensions/shell
diff options
context:
space:
mode:
authordrustsmith <drustsmith@google.com>2016-02-22 16:22:55 -0800
committerCommit bot <commit-bot@chromium.org>2016-02-23 00:23:50 +0000
commit72be257ccfaca7dcd2f48db66b0c2191607b6bfc (patch)
treeeec0482f0bbb47cf4287de843212fd86aaae8e68 /extensions/shell
parent5648c4063272a2bd39089a51b2cd012458d5ca6b (diff)
downloadchromium_src-72be257ccfaca7dcd2f48db66b0c2191607b6bfc.zip
chromium_src-72be257ccfaca7dcd2f48db66b0c2191607b6bfc.tar.gz
chromium_src-72be257ccfaca7dcd2f48db66b0c2191607b6bfc.tar.bz2
Add Bluez initialize call to startup.
Solution copied from similar fix in content shell: https://crrev.com/1487183002 (fix for issue 552488) in file: /content/shell/browser/shell_browser_main_parts.cc BUG=585586 Review URL: https://codereview.chromium.org/1692723002 Cr-Commit-Position: refs/heads/master@{#376863}
Diffstat (limited to 'extensions/shell')
-rw-r--r--extensions/shell/browser/DEPS1
-rw-r--r--extensions/shell/browser/shell_browser_main_parts.cc10
2 files changed, 10 insertions, 1 deletions
diff --git a/extensions/shell/browser/DEPS b/extensions/shell/browser/DEPS
index 03437fd..bdc975f 100644
--- a/extensions/shell/browser/DEPS
+++ b/extensions/shell/browser/DEPS
@@ -19,6 +19,7 @@ include_rules = [
"+content/shell/browser/shell_url_request_context_getter.h",
# For device backend support.
+ "+device/bluetooth",
"+device/core",
"+device/hid",
"+device/usb",
diff --git a/extensions/shell/browser/shell_browser_main_parts.cc b/extensions/shell/browser/shell_browser_main_parts.cc
index df6dc98..6ab35b5 100644
--- a/extensions/shell/browser/shell_browser_main_parts.cc
+++ b/extensions/shell/browser/shell_browser_main_parts.cc
@@ -50,6 +50,8 @@
#include "chromeos/dbus/dbus_thread_manager.h"
#include "chromeos/disks/disk_mount_manager.h"
#include "chromeos/network/network_handler.h"
+#include "device/bluetooth/bluetooth_adapter_factory.h"
+#include "device/bluetooth/dbus/bluez_dbus_manager.h"
#include "extensions/shell/browser/shell_audio_controller_chromeos.h"
#include "extensions/shell/browser/shell_network_controller_chromeos.h"
#endif
@@ -103,6 +105,11 @@ void ShellBrowserMainParts::PostMainMessageLoopStart() {
chromeos::DBusThreadManager::Initialize();
chromeos::disks::DiskMountManager::Initialize();
+ bluez::BluezDBusManager::Initialize(
+ chromeos::DBusThreadManager::Get()->GetSystemBus(),
+ chromeos::DBusThreadManager::Get()->IsUsingStub(
+ chromeos::DBusClientBundle::BLUETOOTH));
+
chromeos::NetworkHandler::Initialize();
network_controller_.reset(new ShellNetworkController(
base::CommandLine::ForCurrentProcess()->GetSwitchValueNative(
@@ -112,7 +119,6 @@ void ShellBrowserMainParts::PostMainMessageLoopStart() {
switches::kAppShellAllowRoaming)) {
network_controller_->SetCellularAllowRoaming(true);
}
-
#else
// Non-Chrome OS platforms are for developer convenience, so use a test IME.
ui::InitializeInputMethodForTesting();
@@ -267,6 +273,8 @@ void ShellBrowserMainParts::PostDestroyThreads() {
network_controller_.reset();
chromeos::NetworkHandler::Shutdown();
chromeos::disks::DiskMountManager::Shutdown();
+ device::BluetoothAdapterFactory::Shutdown();
+ bluez::BluezDBusManager::Shutdown();
chromeos::DBusThreadManager::Shutdown();
#endif
}