| 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" |
| 11 #include "base/files/file_util.h" | 11 #include "base/files/file_util.h" |
| 12 #include "base/message_loop/message_loop.h" | 12 #include "base/message_loop/message_loop.h" |
| 13 #include "base/threading/thread.h" | 13 #include "base/threading/thread.h" |
| 14 #include "base/threading/thread_restrictions.h" | 14 #include "base/threading/thread_restrictions.h" |
| 15 #include "build/build_config.h" | 15 #include "build/build_config.h" |
| 16 #include "components/devtools_http_handler/devtools_http_handler.h" | 16 #include "components/devtools_http_handler/devtools_http_handler.h" |
| 17 #include "content/public/browser/browser_thread.h" | 17 #include "content/public/browser/browser_thread.h" |
| 18 #include "content/public/browser/storage_partition.h" | 18 #include "content/public/browser/storage_partition.h" |
| 19 #include "content/public/common/content_switches.h" | 19 #include "content/public/common/content_switches.h" |
| 20 #include "content/public/common/main_function_params.h" | 20 #include "content/public/common/main_function_params.h" |
| 21 #include "content/public/common/url_constants.h" | 21 #include "content/public/common/url_constants.h" |
| 22 #include "content/shell/android/shell_descriptors.h" |
| 22 #include "content/shell/browser/shell.h" | 23 #include "content/shell/browser/shell.h" |
| 23 #include "content/shell/browser/shell_access_token_store.h" | 24 #include "content/shell/browser/shell_access_token_store.h" |
| 24 #include "content/shell/browser/shell_browser_context.h" | 25 #include "content/shell/browser/shell_browser_context.h" |
| 25 #include "content/shell/browser/shell_devtools_manager_delegate.h" | 26 #include "content/shell/browser/shell_devtools_manager_delegate.h" |
| 26 #include "content/shell/browser/shell_net_log.h" | 27 #include "content/shell/browser/shell_net_log.h" |
| 27 #include "content/shell/common/shell_switches.h" | 28 #include "content/shell/common/shell_switches.h" |
| 28 #include "device/bluetooth/bluetooth_adapter_factory.h" | 29 #include "device/bluetooth/bluetooth_adapter_factory.h" |
| 29 #include "device/geolocation/geolocation_delegate.h" | 30 #include "device/geolocation/geolocation_delegate.h" |
| 30 #include "device/geolocation/geolocation_provider.h" | 31 #include "device/geolocation/geolocation_provider.h" |
| 31 #include "net/base/filename_util.h" | 32 #include "net/base/filename_util.h" |
| (...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 166 gfx::Size()); | 167 gfx::Size()); |
| 167 } | 168 } |
| 168 | 169 |
| 169 #if defined(OS_ANDROID) | 170 #if defined(OS_ANDROID) |
| 170 int ShellBrowserMainParts::PreCreateThreads() { | 171 int ShellBrowserMainParts::PreCreateThreads() { |
| 171 if (base::CommandLine::ForCurrentProcess()->HasSwitch( | 172 if (base::CommandLine::ForCurrentProcess()->HasSwitch( |
| 172 switches::kEnableCrashReporter)) { | 173 switches::kEnableCrashReporter)) { |
| 173 base::FilePath crash_dumps_dir = | 174 base::FilePath crash_dumps_dir = |
| 174 base::CommandLine::ForCurrentProcess()->GetSwitchValuePath( | 175 base::CommandLine::ForCurrentProcess()->GetSwitchValuePath( |
| 175 switches::kCrashDumpsDir); | 176 switches::kCrashDumpsDir); |
| 176 crash_dump_manager_.reset(new breakpad::CrashDumpManager(crash_dumps_dir)); | 177 breakpad::CrashDumpObserver::GetInstance()->RegisterClient( |
| 178 base::MakeUnique<breakpad::CrashDumpManager>( |
| 179 crash_dumps_dir, kAndroidMinidumpDescriptor)); |
| 177 } | 180 } |
| 178 | 181 |
| 179 return 0; | 182 return 0; |
| 180 } | 183 } |
| 181 #endif | 184 #endif |
| 182 | 185 |
| 183 void ShellBrowserMainParts::PreMainMessageLoopRun() { | 186 void ShellBrowserMainParts::PreMainMessageLoopRun() { |
| 184 net_log_.reset(new ShellNetLog("content_shell")); | 187 net_log_.reset(new ShellNetLog("content_shell")); |
| 185 InitializeBrowserContexts(); | 188 InitializeBrowserContexts(); |
| 186 device::GeolocationProvider::SetGeolocationDelegate( | 189 device::GeolocationProvider::SetGeolocationDelegate( |
| (...skipping 28 matching lines...) Expand all Loading... |
| 215 device::BluetoothAdapterFactory::Shutdown(); | 218 device::BluetoothAdapterFactory::Shutdown(); |
| 216 bluez::BluezDBusManager::Shutdown(); | 219 bluez::BluezDBusManager::Shutdown(); |
| 217 chromeos::DBusThreadManager::Shutdown(); | 220 chromeos::DBusThreadManager::Shutdown(); |
| 218 #elif defined(OS_LINUX) | 221 #elif defined(OS_LINUX) |
| 219 device::BluetoothAdapterFactory::Shutdown(); | 222 device::BluetoothAdapterFactory::Shutdown(); |
| 220 bluez::DBusBluezManagerWrapperLinux::Shutdown(); | 223 bluez::DBusBluezManagerWrapperLinux::Shutdown(); |
| 221 #endif | 224 #endif |
| 222 } | 225 } |
| 223 | 226 |
| 224 } // namespace | 227 } // namespace |
| OLD | NEW |