| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "content/shell/browser/shell_browser_main_parts.h" | 5 #include "content/shell/browser/shell_browser_main_parts.h" |
| 6 | 6 |
| 7 #include "base/base_switches.h" | 7 #include "base/base_switches.h" |
| 8 #include "base/bind.h" | 8 #include "base/bind.h" |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/files/file_path.h" | 10 #include "base/files/file_path.h" |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 #include "content/public/common/url_constants.h" | 21 #include "content/public/common/url_constants.h" |
| 22 #include "content/shell/browser/shell.h" | 22 #include "content/shell/browser/shell.h" |
| 23 #include "content/shell/browser/shell_browser_context.h" | 23 #include "content/shell/browser/shell_browser_context.h" |
| 24 #include "content/shell/browser/shell_devtools_manager_delegate.h" | 24 #include "content/shell/browser/shell_devtools_manager_delegate.h" |
| 25 #include "content/shell/browser/shell_net_log.h" | 25 #include "content/shell/browser/shell_net_log.h" |
| 26 #include "content/shell/common/shell_switches.h" | 26 #include "content/shell/common/shell_switches.h" |
| 27 #include "device/bluetooth/bluetooth_adapter_factory.h" | 27 #include "device/bluetooth/bluetooth_adapter_factory.h" |
| 28 #include "net/base/filename_util.h" | 28 #include "net/base/filename_util.h" |
| 29 #include "net/base/net_module.h" | 29 #include "net/base/net_module.h" |
| 30 #include "net/grit/net_resources.h" | 30 #include "net/grit/net_resources.h" |
| 31 #include "ui/base/material_design/material_design_controller.h" |
| 31 #include "ui/base/resource/resource_bundle.h" | 32 #include "ui/base/resource/resource_bundle.h" |
| 32 #include "url/gurl.h" | 33 #include "url/gurl.h" |
| 33 | 34 |
| 34 #if defined(OS_ANDROID) | 35 #if defined(OS_ANDROID) |
| 35 #include "components/crash/content/browser/crash_dump_manager_android.h" | 36 #include "components/crash/content/browser/crash_dump_manager_android.h" |
| 36 #include "net/android/network_change_notifier_factory_android.h" | 37 #include "net/android/network_change_notifier_factory_android.h" |
| 37 #include "net/base/network_change_notifier.h" | 38 #include "net/base/network_change_notifier.h" |
| 38 #endif | 39 #endif |
| 39 | 40 |
| 40 #if defined(USE_AURA) && defined(USE_X11) | 41 #if defined(USE_AURA) && defined(USE_X11) |
| (...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 133 #endif | 134 #endif |
| 134 } | 135 } |
| 135 | 136 |
| 136 void ShellBrowserMainParts::InitializeBrowserContexts() { | 137 void ShellBrowserMainParts::InitializeBrowserContexts() { |
| 137 set_browser_context(new ShellBrowserContext(false, net_log_.get())); | 138 set_browser_context(new ShellBrowserContext(false, net_log_.get())); |
| 138 set_off_the_record_browser_context( | 139 set_off_the_record_browser_context( |
| 139 new ShellBrowserContext(true, net_log_.get())); | 140 new ShellBrowserContext(true, net_log_.get())); |
| 140 } | 141 } |
| 141 | 142 |
| 142 void ShellBrowserMainParts::InitializeMessageLoopContext() { | 143 void ShellBrowserMainParts::InitializeMessageLoopContext() { |
| 144 ui::MaterialDesignController::Initialize(); |
| 143 Shell::CreateNewWindow(browser_context_.get(), | 145 Shell::CreateNewWindow(browser_context_.get(), |
| 144 GetStartupURL(), | 146 GetStartupURL(), |
| 145 NULL, | 147 NULL, |
| 146 gfx::Size()); | 148 gfx::Size()); |
| 147 } | 149 } |
| 148 | 150 |
| 149 #if defined(OS_ANDROID) | 151 #if defined(OS_ANDROID) |
| 150 int ShellBrowserMainParts::PreCreateThreads() { | 152 int ShellBrowserMainParts::PreCreateThreads() { |
| 151 if (base::CommandLine::ForCurrentProcess()->HasSwitch( | 153 if (base::CommandLine::ForCurrentProcess()->HasSwitch( |
| 152 switches::kEnableCrashReporter)) { | 154 switches::kEnableCrashReporter)) { |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 193 device::BluetoothAdapterFactory::Shutdown(); | 195 device::BluetoothAdapterFactory::Shutdown(); |
| 194 bluez::BluezDBusManager::Shutdown(); | 196 bluez::BluezDBusManager::Shutdown(); |
| 195 chromeos::DBusThreadManager::Shutdown(); | 197 chromeos::DBusThreadManager::Shutdown(); |
| 196 #elif defined(OS_LINUX) | 198 #elif defined(OS_LINUX) |
| 197 device::BluetoothAdapterFactory::Shutdown(); | 199 device::BluetoothAdapterFactory::Shutdown(); |
| 198 bluez::DBusBluezManagerWrapperLinux::Shutdown(); | 200 bluez::DBusBluezManagerWrapperLinux::Shutdown(); |
| 199 #endif | 201 #endif |
| 200 } | 202 } |
| 201 | 203 |
| 202 } // namespace | 204 } // namespace |
| OLD | NEW |