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 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
69 #include "ui/aura/env.h" | 69 #include "ui/aura/env.h" |
70 #endif | 70 #endif |
71 | 71 |
72 #if !defined(OS_IOS) | 72 #if !defined(OS_IOS) |
73 #include "content/browser/renderer_host/render_process_host_impl.h" | 73 #include "content/browser/renderer_host/render_process_host_impl.h" |
74 #endif | 74 #endif |
75 | 75 |
76 #if defined(OS_ANDROID) | 76 #if defined(OS_ANDROID) |
77 #include "base/android/jni_android.h" | 77 #include "base/android/jni_android.h" |
78 #include "content/browser/android/browser_startup_controller.h" | 78 #include "content/browser/android/browser_startup_controller.h" |
79 #include "content/browser/android/surface_texture_peer_browser_impl.h" | 79 #include "content/browser/android/browser_surface_texture_manager.h" |
80 #include "content/browser/android/tracing_controller_android.h" | 80 #include "content/browser/android/tracing_controller_android.h" |
81 #include "ui/gl/gl_surface.h" | 81 #include "ui/gl/gl_surface.h" |
82 #endif | 82 #endif |
83 | 83 |
84 #if defined(OS_MACOSX) && !defined(OS_IOS) | 84 #if defined(OS_MACOSX) && !defined(OS_IOS) |
85 #include "content/browser/bootstrap_sandbox_mac.h" | 85 #include "content/browser/bootstrap_sandbox_mac.h" |
86 #include "content/browser/cocoa/system_hotkey_helper_mac.h" | 86 #include "content/browser/cocoa/system_hotkey_helper_mac.h" |
87 #include "content/browser/theme_helper_mac.h" | 87 #include "content/browser/theme_helper_mac.h" |
88 #endif | 88 #endif |
89 | 89 |
(...skipping 440 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
530 // message loop to avoid calling MessagePumpForUI::ScheduleWork() before | 530 // message loop to avoid calling MessagePumpForUI::ScheduleWork() before |
531 // MessagePumpForUI::Start() as it will crash the browser. | 531 // MessagePumpForUI::Start() as it will crash the browser. |
532 if (is_tracing_startup_) { | 532 if (is_tracing_startup_) { |
533 TRACE_EVENT0("startup", "BrowserMainLoop::InitStartupTracing"); | 533 TRACE_EVENT0("startup", "BrowserMainLoop::InitStartupTracing"); |
534 InitStartupTracing(parsed_command_line_); | 534 InitStartupTracing(parsed_command_line_); |
535 } | 535 } |
536 #endif // !defined(OS_IOS) | 536 #endif // !defined(OS_IOS) |
537 | 537 |
538 #if defined(OS_ANDROID) | 538 #if defined(OS_ANDROID) |
539 { | 539 { |
540 TRACE_EVENT0("startup", "BrowserMainLoop::Subsystem:SurfaceTexturePeer"); | 540 TRACE_EVENT0("startup", "BrowserMainLoop::Subsystem:SurfaceTextureManager"); |
541 SurfaceTexturePeer::InitInstance(new SurfaceTexturePeerBrowserImpl()); | 541 SurfaceTextureManager::InitInstance(new BrowserSurfaceTextureManager); |
542 } | 542 } |
543 #endif | 543 #endif |
544 | 544 |
545 if (parsed_command_line_.HasSwitch(switches::kMemoryMetrics)) { | 545 if (parsed_command_line_.HasSwitch(switches::kMemoryMetrics)) { |
546 TRACE_EVENT0("startup", "BrowserMainLoop::Subsystem:MemoryObserver"); | 546 TRACE_EVENT0("startup", "BrowserMainLoop::Subsystem:MemoryObserver"); |
547 memory_observer_.reset(new MemoryObserver()); | 547 memory_observer_.reset(new MemoryObserver()); |
548 base::MessageLoop::current()->AddTaskObserver(memory_observer_.get()); | 548 base::MessageLoop::current()->AddTaskObserver(memory_observer_.get()); |
549 } | 549 } |
550 | 550 |
551 #if defined(TCMALLOC_TRACE_MEMORY_SUPPORTED) | 551 #if defined(TCMALLOC_TRACE_MEMORY_SUPPORTED) |
(...skipping 645 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1197 | 1197 |
1198 void BrowserMainLoop::EndStartupTracing() { | 1198 void BrowserMainLoop::EndStartupTracing() { |
1199 is_tracing_startup_ = false; | 1199 is_tracing_startup_ = false; |
1200 TracingController::GetInstance()->DisableRecording( | 1200 TracingController::GetInstance()->DisableRecording( |
1201 TracingController::CreateFileSink( | 1201 TracingController::CreateFileSink( |
1202 startup_trace_file_, | 1202 startup_trace_file_, |
1203 base::Bind(OnStoppedStartupTracing, startup_trace_file_))); | 1203 base::Bind(OnStoppedStartupTracing, startup_trace_file_))); |
1204 } | 1204 } |
1205 | 1205 |
1206 } // namespace content | 1206 } // namespace content |
OLD | NEW |