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/prefs/pref_service.h" | 10 #include "base/prefs/pref_service.h" |
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
137 browser_context_.reset(new ShellBrowserContext); | 137 browser_context_.reset(new ShellBrowserContext); |
138 | 138 |
139 // app_shell only supports a single user, so all preferences live in the user | 139 // app_shell only supports a single user, so all preferences live in the user |
140 // data directory, including the device-wide local state. | 140 // data directory, including the device-wide local state. |
141 local_state_ = shell_prefs::CreateLocalState(browser_context_->GetPath()); | 141 local_state_ = shell_prefs::CreateLocalState(browser_context_->GetPath()); |
142 user_pref_service_ = | 142 user_pref_service_ = |
143 shell_prefs::CreateUserPrefService(browser_context_.get()); | 143 shell_prefs::CreateUserPrefService(browser_context_.get()); |
144 | 144 |
145 #if defined(OS_CHROMEOS) | 145 #if defined(OS_CHROMEOS) |
146 chromeos::CrasAudioHandler::Initialize( | 146 chromeos::CrasAudioHandler::Initialize( |
147 new chromeos::AudioDevicesPrefHandlerImpl(local_state_.get(), "")); | 147 new chromeos::AudioDevicesPrefHandlerImpl(local_state_.get())); |
148 audio_controller_.reset(new ShellAudioController()); | 148 audio_controller_.reset(new ShellAudioController()); |
149 #endif | 149 #endif |
150 | 150 |
151 #if defined(USE_AURA) | 151 #if defined(USE_AURA) |
152 aura::Env::GetInstance()->set_context_factory(content::GetContextFactory()); | 152 aura::Env::GetInstance()->set_context_factory(content::GetContextFactory()); |
153 #endif | 153 #endif |
154 | 154 |
155 storage_monitor::StorageMonitor::Create(); | 155 storage_monitor::StorageMonitor::Create(); |
156 | 156 |
157 desktop_controller_.reset(browser_main_delegate_->CreateDesktopController()); | 157 desktop_controller_.reset(browser_main_delegate_->CreateDesktopController()); |
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
290 } | 290 } |
291 | 291 |
292 void ShellBrowserMainParts::CreateExtensionSystem() { | 292 void ShellBrowserMainParts::CreateExtensionSystem() { |
293 DCHECK(browser_context_); | 293 DCHECK(browser_context_); |
294 extension_system_ = static_cast<ShellExtensionSystem*>( | 294 extension_system_ = static_cast<ShellExtensionSystem*>( |
295 ExtensionSystem::Get(browser_context_.get())); | 295 ExtensionSystem::Get(browser_context_.get())); |
296 extension_system_->InitForRegularProfile(true); | 296 extension_system_->InitForRegularProfile(true); |
297 } | 297 } |
298 | 298 |
299 } // namespace extensions | 299 } // namespace extensions |
OLD | NEW |