| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/browser/browser_main.h" | 5 #include "content/browser/browser_main.h" |
| 6 | 6 |
| 7 #include "base/allocator/allocator_shim.h" | 7 #include "base/allocator/allocator_shim.h" |
| 8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
| 9 #include "base/debug/trace_event.h" | 9 #include "base/debug/trace_event.h" |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| (...skipping 322 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 333 void BrowserMainParts::PreMainMessageLoopStart() { | 333 void BrowserMainParts::PreMainMessageLoopStart() { |
| 334 } | 334 } |
| 335 | 335 |
| 336 void BrowserMainParts::PostMainMessageLoopStart() { | 336 void BrowserMainParts::PostMainMessageLoopStart() { |
| 337 } | 337 } |
| 338 | 338 |
| 339 void BrowserMainParts::PreMainMessageLoopRun() { | 339 void BrowserMainParts::PreMainMessageLoopRun() { |
| 340 } | 340 } |
| 341 | 341 |
| 342 void BrowserMainParts::MainMessageLoopRun() { | 342 void BrowserMainParts::MainMessageLoopRun() { |
| 343 if (parameters().ui_task) |
| 344 MessageLoopForUI::current()->PostTask(FROM_HERE, parameters().ui_task); |
| 345 |
| 343 #if defined(OS_MACOSX) | 346 #if defined(OS_MACOSX) |
| 344 MessageLoopForUI::current()->Run(); | 347 MessageLoopForUI::current()->Run(); |
| 345 #else | 348 #else |
| 346 MessageLoopForUI::current()->Run(NULL); | 349 MessageLoopForUI::current()->Run(NULL); |
| 347 #endif | 350 #endif |
| 348 } | 351 } |
| 349 | 352 |
| 350 void BrowserMainParts::PostMainMessageLoopRun() { | 353 void BrowserMainParts::PostMainMessageLoopRun() { |
| 351 } | 354 } |
| 352 | 355 |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 416 base::win::ScopedCOMInitializer com_initializer; | 419 base::win::ScopedCOMInitializer com_initializer; |
| 417 #endif // OS_WIN | 420 #endif // OS_WIN |
| 418 | 421 |
| 419 base::StatisticsRecorder statistics; | 422 base::StatisticsRecorder statistics; |
| 420 | 423 |
| 421 parts->RunMainMessageLoopParts(); | 424 parts->RunMainMessageLoopParts(); |
| 422 | 425 |
| 423 TRACE_EVENT_END_ETW("BrowserMain", 0, 0); | 426 TRACE_EVENT_END_ETW("BrowserMain", 0, 0); |
| 424 return parts->result_code(); | 427 return parts->result_code(); |
| 425 } | 428 } |
| OLD | NEW |