| 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 base::MessageLoop::current()->QuitNow(); |
| 154 #endif |
| 153 main_loop_.reset(NULL); | 155 main_loop_.reset(NULL); |
| 154 | 156 |
| 155 notification_service_.reset(NULL); | 157 notification_service_.reset(NULL); |
| 156 | 158 |
| 157 is_shutdown_ = true; | 159 is_shutdown_ = true; |
| 158 } | 160 } |
| 159 } | 161 } |
| 160 | 162 |
| 161 protected: | 163 protected: |
| 162 // True if we have started to initialize the runner. | 164 // True if we have started to initialize the runner. |
| (...skipping 10 matching lines...) Expand all Loading... |
| 173 | 175 |
| 174 DISALLOW_COPY_AND_ASSIGN(BrowserMainRunnerImpl); | 176 DISALLOW_COPY_AND_ASSIGN(BrowserMainRunnerImpl); |
| 175 }; | 177 }; |
| 176 | 178 |
| 177 // static | 179 // static |
| 178 BrowserMainRunner* BrowserMainRunner::Create() { | 180 BrowserMainRunner* BrowserMainRunner::Create() { |
| 179 return new BrowserMainRunnerImpl(); | 181 return new BrowserMainRunnerImpl(); |
| 180 } | 182 } |
| 181 | 183 |
| 182 } // namespace content | 184 } // namespace content |
| OLD | NEW |