| 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" | |
| 32 #include "ui/base/resource/resource_bundle.h" | 31 #include "ui/base/resource/resource_bundle.h" |
| 33 #include "url/gurl.h" | 32 #include "url/gurl.h" |
| 34 | 33 |
| 35 #if defined(OS_ANDROID) | 34 #if defined(OS_ANDROID) |
| 36 #include "components/crash/content/browser/crash_dump_manager_android.h" | 35 #include "components/crash/content/browser/crash_dump_manager_android.h" |
| 37 #include "net/android/network_change_notifier_factory_android.h" | 36 #include "net/android/network_change_notifier_factory_android.h" |
| 38 #include "net/base/network_change_notifier.h" | 37 #include "net/base/network_change_notifier.h" |
| 39 #endif | 38 #endif |
| 40 | 39 |
| 41 #if defined(USE_AURA) && defined(USE_X11) | 40 #if defined(USE_AURA) && defined(USE_X11) |
| (...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 134 #endif | 133 #endif |
| 135 } | 134 } |
| 136 | 135 |
| 137 void ShellBrowserMainParts::InitializeBrowserContexts() { | 136 void ShellBrowserMainParts::InitializeBrowserContexts() { |
| 138 set_browser_context(new ShellBrowserContext(false, net_log_.get())); | 137 set_browser_context(new ShellBrowserContext(false, net_log_.get())); |
| 139 set_off_the_record_browser_context( | 138 set_off_the_record_browser_context( |
| 140 new ShellBrowserContext(true, net_log_.get())); | 139 new ShellBrowserContext(true, net_log_.get())); |
| 141 } | 140 } |
| 142 | 141 |
| 143 void ShellBrowserMainParts::InitializeMessageLoopContext() { | 142 void ShellBrowserMainParts::InitializeMessageLoopContext() { |
| 144 ui::MaterialDesignController::Initialize(); | |
| 145 Shell::CreateNewWindow(browser_context_.get(), | 143 Shell::CreateNewWindow(browser_context_.get(), |
| 146 GetStartupURL(), | 144 GetStartupURL(), |
| 147 NULL, | 145 NULL, |
| 148 gfx::Size()); | 146 gfx::Size()); |
| 149 } | 147 } |
| 150 | 148 |
| 151 #if defined(OS_ANDROID) | 149 #if defined(OS_ANDROID) |
| 152 int ShellBrowserMainParts::PreCreateThreads() { | 150 int ShellBrowserMainParts::PreCreateThreads() { |
| 153 if (base::CommandLine::ForCurrentProcess()->HasSwitch( | 151 if (base::CommandLine::ForCurrentProcess()->HasSwitch( |
| 154 switches::kEnableCrashReporter)) { | 152 switches::kEnableCrashReporter)) { |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 195 device::BluetoothAdapterFactory::Shutdown(); | 193 device::BluetoothAdapterFactory::Shutdown(); |
| 196 bluez::BluezDBusManager::Shutdown(); | 194 bluez::BluezDBusManager::Shutdown(); |
| 197 chromeos::DBusThreadManager::Shutdown(); | 195 chromeos::DBusThreadManager::Shutdown(); |
| 198 #elif defined(OS_LINUX) | 196 #elif defined(OS_LINUX) |
| 199 device::BluetoothAdapterFactory::Shutdown(); | 197 device::BluetoothAdapterFactory::Shutdown(); |
| 200 bluez::DBusBluezManagerWrapperLinux::Shutdown(); | 198 bluez::DBusBluezManagerWrapperLinux::Shutdown(); |
| 201 #endif | 199 #endif |
| 202 } | 200 } |
| 203 | 201 |
| 204 } // namespace | 202 } // namespace |
| OLD | NEW |