Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/public/browser/browser_main_runner.h" | 5 #include "content/public/browser/browser_main_runner.h" |
| 6 | 6 |
| 7 #include "base/allocator/allocator_shim.h" | 7 #include "base/allocator/allocator_shim.h" |
| 8 #include "base/base_switches.h" | 8 #include "base/base_switches.h" |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/debug/leak_annotations.h" | 10 #include "base/debug/leak_annotations.h" |
| (...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 142 // The trace event has to stay between profiler creation and destruction. | 142 // The trace event has to stay between profiler creation and destruction. |
| 143 TRACE_EVENT0("shutdown", "BrowserMainRunner"); | 143 TRACE_EVENT0("shutdown", "BrowserMainRunner"); |
| 144 g_exited_main_message_loop = true; | 144 g_exited_main_message_loop = true; |
| 145 | 145 |
| 146 main_loop_->ShutdownThreadsAndCleanUp(); | 146 main_loop_->ShutdownThreadsAndCleanUp(); |
| 147 | 147 |
| 148 ui::ShutdownInputMethod(); | 148 ui::ShutdownInputMethod(); |
| 149 #if defined(OS_WIN) | 149 #if defined(OS_WIN) |
| 150 ole_initializer_.reset(NULL); | 150 ole_initializer_.reset(NULL); |
| 151 #endif | 151 #endif |
| 152 | 152 #if defined(OS_ANDROID) |
| 153 // This is a hack for terminating the RunLoop inside MessagePumpForUI, | |
|
bulach
2014/06/09 09:26:45
nit: perhaps:
// Forcefully terminates the RunLoo
Victor Starodub
2014/06/09 16:13:26
Done.
| |
| 154 // used to ensure proper shutdown in content_browsertests. Shutdown() is | |
| 155 // not used by the actual android browser. | |
| 156 base::MessageLoop::current()->QuitNow(); | |
| 157 #endif | |
| 153 main_loop_.reset(NULL); | 158 main_loop_.reset(NULL); |
| 154 | 159 |
| 155 notification_service_.reset(NULL); | 160 notification_service_.reset(NULL); |
| 156 | 161 |
| 157 is_shutdown_ = true; | 162 is_shutdown_ = true; |
| 158 } | 163 } |
| 159 } | 164 } |
| 160 | 165 |
| 161 protected: | 166 protected: |
| 162 // True if we have started to initialize the runner. | 167 // True if we have started to initialize the runner. |
| (...skipping 10 matching lines...) Expand all Loading... | |
| 173 | 178 |
| 174 DISALLOW_COPY_AND_ASSIGN(BrowserMainRunnerImpl); | 179 DISALLOW_COPY_AND_ASSIGN(BrowserMainRunnerImpl); |
| 175 }; | 180 }; |
| 176 | 181 |
| 177 // static | 182 // static |
| 178 BrowserMainRunner* BrowserMainRunner::Create() { | 183 BrowserMainRunner* BrowserMainRunner::Create() { |
| 179 return new BrowserMainRunnerImpl(); | 184 return new BrowserMainRunnerImpl(); |
| 180 } | 185 } |
| 181 | 186 |
| 182 } // namespace content | 187 } // namespace content |
| OLD | NEW |