| 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 23 matching lines...) Expand all Loading... |
| 34 #endif | 34 #endif |
| 35 | 35 |
| 36 #if defined(OS_ANDROID) | 36 #if defined(OS_ANDROID) |
| 37 #include "components/breakpad/browser/crash_dump_manager_android.h" | 37 #include "components/breakpad/browser/crash_dump_manager_android.h" |
| 38 #include "net/android/network_change_notifier_factory_android.h" | 38 #include "net/android/network_change_notifier_factory_android.h" |
| 39 #include "net/base/network_change_notifier.h" | 39 #include "net/base/network_change_notifier.h" |
| 40 #endif | 40 #endif |
| 41 | 41 |
| 42 #if defined(USE_AURA) && defined(USE_X11) | 42 #if defined(USE_AURA) && defined(USE_X11) |
| 43 #include "ui/events/x/touch_factory_x11.h" | 43 #include "ui/events/x/touch_factory_x11.h" |
| 44 #if !defined(OS_CHROMEOS) | 44 #endif |
| 45 #if !defined(OS_CHROMEOS) && defined(USE_AURA) && defined(OS_LINUX) |
| 45 #include "ui/base/ime/input_method_initializer.h" | 46 #include "ui/base/ime/input_method_initializer.h" |
| 46 #endif | 47 #endif |
| 47 #endif | |
| 48 | 48 |
| 49 namespace content { | 49 namespace content { |
| 50 | 50 |
| 51 namespace { | 51 namespace { |
| 52 | 52 |
| 53 // Default quota for each origin is 5MB. | 53 // Default quota for each origin is 5MB. |
| 54 const int kDefaultLayoutTestQuotaBytes = 5 * 1024 * 1024; | 54 const int kDefaultLayoutTestQuotaBytes = 5 * 1024 * 1024; |
| 55 | 55 |
| 56 GURL GetStartupURL() { | 56 GURL GetStartupURL() { |
| 57 CommandLine* command_line = CommandLine::ForCurrentProcess(); | 57 CommandLine* command_line = CommandLine::ForCurrentProcess(); |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 101 } | 101 } |
| 102 #endif | 102 #endif |
| 103 | 103 |
| 104 void ShellBrowserMainParts::PostMainMessageLoopStart() { | 104 void ShellBrowserMainParts::PostMainMessageLoopStart() { |
| 105 #if defined(OS_ANDROID) | 105 #if defined(OS_ANDROID) |
| 106 base::MessageLoopForUI::current()->Start(); | 106 base::MessageLoopForUI::current()->Start(); |
| 107 #endif | 107 #endif |
| 108 } | 108 } |
| 109 | 109 |
| 110 void ShellBrowserMainParts::PreEarlyInitialization() { | 110 void ShellBrowserMainParts::PreEarlyInitialization() { |
| 111 #if !defined(OS_CHROMEOS) && defined(USE_AURA) && defined(USE_X11) | 111 #if !defined(OS_CHROMEOS) && defined(USE_AURA) && defined(OS_LINUX) |
| 112 ui::InitializeInputMethodForTesting(); | 112 ui::InitializeInputMethodForTesting(); |
| 113 #endif | 113 #endif |
| 114 #if defined(OS_ANDROID) | 114 #if defined(OS_ANDROID) |
| 115 net::NetworkChangeNotifier::SetFactory( | 115 net::NetworkChangeNotifier::SetFactory( |
| 116 new net::NetworkChangeNotifierFactoryAndroid()); | 116 new net::NetworkChangeNotifierFactoryAndroid()); |
| 117 #endif | 117 #endif |
| 118 } | 118 } |
| 119 | 119 |
| 120 void ShellBrowserMainParts::PreMainMessageLoopRun() { | 120 void ShellBrowserMainParts::PreMainMessageLoopRun() { |
| 121 #if defined(OS_ANDROID) | 121 #if defined(OS_ANDROID) |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 176 } | 176 } |
| 177 | 177 |
| 178 void ShellBrowserMainParts::PostMainMessageLoopRun() { | 178 void ShellBrowserMainParts::PostMainMessageLoopRun() { |
| 179 if (devtools_delegate_) | 179 if (devtools_delegate_) |
| 180 devtools_delegate_->Stop(); | 180 devtools_delegate_->Stop(); |
| 181 browser_context_.reset(); | 181 browser_context_.reset(); |
| 182 off_the_record_browser_context_.reset(); | 182 off_the_record_browser_context_.reset(); |
| 183 } | 183 } |
| 184 | 184 |
| 185 } // namespace | 185 } // namespace |
| OLD | NEW |