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 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
81 extension_system_(nullptr), | 81 extension_system_(nullptr), |
82 parameters_(parameters), | 82 parameters_(parameters), |
83 run_message_loop_(true), | 83 run_message_loop_(true), |
84 browser_main_delegate_(browser_main_delegate) { | 84 browser_main_delegate_(browser_main_delegate) { |
85 } | 85 } |
86 | 86 |
87 ShellBrowserMainParts::~ShellBrowserMainParts() { | 87 ShellBrowserMainParts::~ShellBrowserMainParts() { |
88 DCHECK(!devtools_http_handler_); | 88 DCHECK(!devtools_http_handler_); |
89 } | 89 } |
90 | 90 |
| 91 #if !defined(OS_MACOSX) |
91 void ShellBrowserMainParts::PreMainMessageLoopStart() { | 92 void ShellBrowserMainParts::PreMainMessageLoopStart() { |
92 // TODO(jamescook): Initialize touch here? | 93 // TODO(jamescook): Initialize touch here? |
93 } | 94 } |
| 95 #endif |
94 | 96 |
95 void ShellBrowserMainParts::PostMainMessageLoopStart() { | 97 void ShellBrowserMainParts::PostMainMessageLoopStart() { |
96 #if defined(OS_CHROMEOS) | 98 #if defined(OS_CHROMEOS) |
97 // Perform initialization of D-Bus objects here rather than in the below | 99 // Perform initialization of D-Bus objects here rather than in the below |
98 // helper classes so those classes' tests can initialize stub versions of the | 100 // helper classes so those classes' tests can initialize stub versions of the |
99 // D-Bus objects. | 101 // D-Bus objects. |
100 chromeos::DBusThreadManager::Initialize(); | 102 chromeos::DBusThreadManager::Initialize(); |
101 | 103 |
102 chromeos::NetworkHandler::Initialize(); | 104 chromeos::NetworkHandler::Initialize(); |
103 network_controller_.reset(new ShellNetworkController( | 105 network_controller_.reset(new ShellNetworkController( |
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
269 } | 271 } |
270 | 272 |
271 void ShellBrowserMainParts::CreateExtensionSystem() { | 273 void ShellBrowserMainParts::CreateExtensionSystem() { |
272 DCHECK(browser_context_); | 274 DCHECK(browser_context_); |
273 extension_system_ = static_cast<ShellExtensionSystem*>( | 275 extension_system_ = static_cast<ShellExtensionSystem*>( |
274 ExtensionSystem::Get(browser_context_.get())); | 276 ExtensionSystem::Get(browser_context_.get())); |
275 extension_system_->InitForRegularProfile(true); | 277 extension_system_->InitForRegularProfile(true); |
276 } | 278 } |
277 | 279 |
278 } // namespace extensions | 280 } // namespace extensions |
OLD | NEW |