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 337 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
348 void BrowserMainParts::PreMainMessageLoopRun() { | 348 void BrowserMainParts::PreMainMessageLoopRun() { |
349 } | 349 } |
350 | 350 |
351 void BrowserMainParts::MainMessageLoopRun() { | 351 void BrowserMainParts::MainMessageLoopRun() { |
352 if (parameters().ui_task) | 352 if (parameters().ui_task) |
353 MessageLoopForUI::current()->PostTask(FROM_HERE, parameters().ui_task); | 353 MessageLoopForUI::current()->PostTask(FROM_HERE, parameters().ui_task); |
354 | 354 |
355 #if defined(OS_MACOSX) | 355 #if defined(OS_MACOSX) |
356 MessageLoopForUI::current()->Run(); | 356 MessageLoopForUI::current()->Run(); |
357 #else | 357 #else |
358 MessageLoopForUI::current()->Run(NULL); | 358 MessageLoopForUI::current()->RunWithDispatcher(NULL); |
359 #endif | 359 #endif |
360 } | 360 } |
361 | 361 |
362 void BrowserMainParts::PostMainMessageLoopRun() { | 362 void BrowserMainParts::PostMainMessageLoopRun() { |
363 } | 363 } |
364 | 364 |
365 void BrowserMainParts::ToolkitInitialized() { | 365 void BrowserMainParts::ToolkitInitialized() { |
366 } | 366 } |
367 | 367 |
368 bool ExitedMainMessageLoop() { | 368 bool ExitedMainMessageLoop() { |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
432 base::win::ScopedCOMInitializer com_initializer; | 432 base::win::ScopedCOMInitializer com_initializer; |
433 #endif // OS_WIN | 433 #endif // OS_WIN |
434 | 434 |
435 base::StatisticsRecorder statistics; | 435 base::StatisticsRecorder statistics; |
436 | 436 |
437 parts->RunMainMessageLoopParts(); | 437 parts->RunMainMessageLoopParts(); |
438 | 438 |
439 TRACE_EVENT_END_ETW("BrowserMain", 0, 0); | 439 TRACE_EVENT_END_ETW("BrowserMain", 0, 0); |
440 return parts->result_code(); | 440 return parts->result_code(); |
441 } | 441 } |
OLD | NEW |