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/logging.h" | 10 #include "base/logging.h" |
(...skipping 448 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
459 if (parts_) | 459 if (parts_) |
460 parts_->PostMainMessageLoopStart(); | 460 parts_->PostMainMessageLoopStart(); |
461 | 461 |
462 #if defined(OS_ANDROID) | 462 #if defined(OS_ANDROID) |
463 { | 463 { |
464 TRACE_EVENT0("startup", "BrowserMainLoop::Subsystem:SurfaceTexturePeer") | 464 TRACE_EVENT0("startup", "BrowserMainLoop::Subsystem:SurfaceTexturePeer") |
465 SurfaceTexturePeer::InitInstance(new SurfaceTexturePeerBrowserImpl()); | 465 SurfaceTexturePeer::InitInstance(new SurfaceTexturePeerBrowserImpl()); |
466 } | 466 } |
467 { | 467 { |
468 TRACE_EVENT0("startup", "BrowserMainLoop::Subsystem:DataFetcher") | 468 TRACE_EVENT0("startup", "BrowserMainLoop::Subsystem:DataFetcher") |
469 DataFetcherImplAndroid::Init(base::android::AttachCurrentThread()); | 469 DataFetcherImplAndroid::Register(base::android::AttachCurrentThread()); |
bulach
2013/07/10 16:59:41
sorry, I just noticed this is in the wrong place :
timvolodine
2013/07/11 14:31:34
ok, I've pulled out this change into a separate CL
| |
470 } | 470 } |
471 #endif | 471 #endif |
472 | 472 |
473 if (parsed_command_line_.HasSwitch(switches::kMemoryMetrics)) { | 473 if (parsed_command_line_.HasSwitch(switches::kMemoryMetrics)) { |
474 TRACE_EVENT0("startup", "BrowserMainLoop::Subsystem:MemoryObserver") | 474 TRACE_EVENT0("startup", "BrowserMainLoop::Subsystem:MemoryObserver") |
475 memory_observer_.reset(new MemoryObserver()); | 475 memory_observer_.reset(new MemoryObserver()); |
476 base::MessageLoop::current()->AddTaskObserver(memory_observer_.get()); | 476 base::MessageLoop::current()->AddTaskObserver(memory_observer_.get()); |
477 } | 477 } |
478 } | 478 } |
479 | 479 |
(...skipping 453 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
933 if (parameters_.ui_task) | 933 if (parameters_.ui_task) |
934 base::MessageLoopForUI::current()->PostTask(FROM_HERE, | 934 base::MessageLoopForUI::current()->PostTask(FROM_HERE, |
935 *parameters_.ui_task); | 935 *parameters_.ui_task); |
936 | 936 |
937 base::RunLoop run_loop; | 937 base::RunLoop run_loop; |
938 run_loop.Run(); | 938 run_loop.Run(); |
939 #endif | 939 #endif |
940 } | 940 } |
941 | 941 |
942 } // namespace content | 942 } // namespace content |
OLD | NEW |