| 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/browser/browser_main_loop.h" | 5 #include "content/browser/browser_main_loop.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.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/hi_res_timer_manager.h" | 10 #include "base/hi_res_timer_manager.h" |
| (...skipping 375 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 386 #endif | 386 #endif |
| 387 | 387 |
| 388 #if defined(OS_WIN) | 388 #if defined(OS_WIN) |
| 389 system_message_window_.reset(new SystemMessageWindowWin); | 389 system_message_window_.reset(new SystemMessageWindowWin); |
| 390 #endif | 390 #endif |
| 391 | 391 |
| 392 if (parts_.get()) | 392 if (parts_.get()) |
| 393 parts_->PostMainMessageLoopStart(); | 393 parts_->PostMainMessageLoopStart(); |
| 394 | 394 |
| 395 #if defined(OS_ANDROID) | 395 #if defined(OS_ANDROID) |
| 396 SurfaceTexturePeer::InitInstance(new SurfaceTexturePeerBrowserImpl( | 396 SurfaceTexturePeer::InitInstance(new SurfaceTexturePeerBrowserImpl()); |
| 397 parameters_.command_line.HasSwitch( | |
| 398 switches::kMediaPlayerInRenderProcess))); | |
| 399 DataFetcherImplAndroid::Init(base::android::AttachCurrentThread()); | 397 DataFetcherImplAndroid::Init(base::android::AttachCurrentThread()); |
| 400 #endif | 398 #endif |
| 401 | 399 |
| 402 if (parsed_command_line_.HasSwitch(switches::kMemoryMetrics)) { | 400 if (parsed_command_line_.HasSwitch(switches::kMemoryMetrics)) { |
| 403 memory_observer_.reset(new MemoryObserver()); | 401 memory_observer_.reset(new MemoryObserver()); |
| 404 MessageLoop::current()->AddTaskObserver(memory_observer_.get()); | 402 MessageLoop::current()->AddTaskObserver(memory_observer_.get()); |
| 405 } | 403 } |
| 406 } | 404 } |
| 407 | 405 |
| 408 void BrowserMainLoop::CreateThreads() { | 406 void BrowserMainLoop::CreateThreads() { |
| (...skipping 396 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 805 DCHECK_EQ(MessageLoop::TYPE_UI, MessageLoop::current()->type()); | 803 DCHECK_EQ(MessageLoop::TYPE_UI, MessageLoop::current()->type()); |
| 806 if (parameters_.ui_task) | 804 if (parameters_.ui_task) |
| 807 MessageLoopForUI::current()->PostTask(FROM_HERE, *parameters_.ui_task); | 805 MessageLoopForUI::current()->PostTask(FROM_HERE, *parameters_.ui_task); |
| 808 | 806 |
| 809 base::RunLoop run_loop; | 807 base::RunLoop run_loop; |
| 810 run_loop.Run(); | 808 run_loop.Run(); |
| 811 #endif | 809 #endif |
| 812 } | 810 } |
| 813 | 811 |
| 814 } // namespace content | 812 } // namespace content |
| OLD | NEW |