OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "extensions/shell/browser/shell_browser_main_parts.h" | 5 #include "extensions/shell/browser/shell_browser_main_parts.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/run_loop.h" | 10 #include "base/run_loop.h" |
(...skipping 29 matching lines...) Expand all Loading... |
40 #include "ui/base/ime/input_method_initializer.h" | 40 #include "ui/base/ime/input_method_initializer.h" |
41 #include "ui/base/resource/resource_bundle.h" | 41 #include "ui/base/resource/resource_bundle.h" |
42 | 42 |
43 #if defined(USE_AURA) | 43 #if defined(USE_AURA) |
44 #include "ui/aura/env.h" | 44 #include "ui/aura/env.h" |
45 #endif | 45 #endif |
46 | 46 |
47 #if defined(OS_CHROMEOS) | 47 #if defined(OS_CHROMEOS) |
48 #include "chromeos/audio/audio_devices_pref_handler_impl.h" | 48 #include "chromeos/audio/audio_devices_pref_handler_impl.h" |
49 #include "chromeos/audio/cras_audio_handler.h" | 49 #include "chromeos/audio/cras_audio_handler.h" |
| 50 #include "chromeos/dbus/dbus_client_types.h" |
50 #include "chromeos/dbus/dbus_thread_manager.h" | 51 #include "chromeos/dbus/dbus_thread_manager.h" |
51 #include "chromeos/disks/disk_mount_manager.h" | 52 #include "chromeos/disks/disk_mount_manager.h" |
52 #include "chromeos/network/network_handler.h" | 53 #include "chromeos/network/network_handler.h" |
53 #include "device/bluetooth/bluetooth_adapter_factory.h" | 54 #include "device/bluetooth/bluetooth_adapter_factory.h" |
54 #include "device/bluetooth/dbus/bluez_dbus_manager.h" | 55 #include "device/bluetooth/dbus/bluez_dbus_manager.h" |
55 #include "extensions/shell/browser/shell_audio_controller_chromeos.h" | 56 #include "extensions/shell/browser/shell_audio_controller_chromeos.h" |
56 #include "extensions/shell/browser/shell_network_controller_chromeos.h" | 57 #include "extensions/shell/browser/shell_network_controller_chromeos.h" |
57 #endif | 58 #endif |
58 | 59 |
59 #if defined(OS_MACOSX) | 60 #if defined(OS_MACOSX) |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
98 void ShellBrowserMainParts::PostMainMessageLoopStart() { | 99 void ShellBrowserMainParts::PostMainMessageLoopStart() { |
99 #if defined(OS_CHROMEOS) | 100 #if defined(OS_CHROMEOS) |
100 // Perform initialization of D-Bus objects here rather than in the below | 101 // Perform initialization of D-Bus objects here rather than in the below |
101 // helper classes so those classes' tests can initialize stub versions of the | 102 // helper classes so those classes' tests can initialize stub versions of the |
102 // D-Bus objects. | 103 // D-Bus objects. |
103 chromeos::DBusThreadManager::Initialize(); | 104 chromeos::DBusThreadManager::Initialize(); |
104 chromeos::disks::DiskMountManager::Initialize(); | 105 chromeos::disks::DiskMountManager::Initialize(); |
105 | 106 |
106 bluez::BluezDBusManager::Initialize( | 107 bluez::BluezDBusManager::Initialize( |
107 chromeos::DBusThreadManager::Get()->GetSystemBus(), | 108 chromeos::DBusThreadManager::Get()->GetSystemBus(), |
108 chromeos::DBusThreadManager::Get()->IsUsingStub( | 109 chromeos::DBusThreadManager::Get()->IsUsingFake( |
109 chromeos::DBusClientBundle::BLUETOOTH)); | 110 chromeos::DBusClientType::BLUETOOTH)); |
110 | 111 |
111 chromeos::NetworkHandler::Initialize(); | 112 chromeos::NetworkHandler::Initialize(); |
112 network_controller_.reset(new ShellNetworkController( | 113 network_controller_.reset(new ShellNetworkController( |
113 base::CommandLine::ForCurrentProcess()->GetSwitchValueNative( | 114 base::CommandLine::ForCurrentProcess()->GetSwitchValueNative( |
114 switches::kAppShellPreferredNetwork))); | 115 switches::kAppShellPreferredNetwork))); |
115 | 116 |
116 if (base::CommandLine::ForCurrentProcess()->HasSwitch( | 117 if (base::CommandLine::ForCurrentProcess()->HasSwitch( |
117 switches::kAppShellAllowRoaming)) { | 118 switches::kAppShellAllowRoaming)) { |
118 network_controller_->SetCellularAllowRoaming(true); | 119 network_controller_->SetCellularAllowRoaming(true); |
119 } | 120 } |
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
286 } | 287 } |
287 | 288 |
288 void ShellBrowserMainParts::CreateExtensionSystem() { | 289 void ShellBrowserMainParts::CreateExtensionSystem() { |
289 DCHECK(browser_context_); | 290 DCHECK(browser_context_); |
290 extension_system_ = static_cast<ShellExtensionSystem*>( | 291 extension_system_ = static_cast<ShellExtensionSystem*>( |
291 ExtensionSystem::Get(browser_context_.get())); | 292 ExtensionSystem::Get(browser_context_.get())); |
292 extension_system_->InitForRegularProfile(true); | 293 extension_system_->InitForRegularProfile(true); |
293 } | 294 } |
294 | 295 |
295 } // namespace extensions | 296 } // namespace extensions |
OLD | NEW |