| 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 "content/browser/screen_orientation/screen_orientation_delegate_android
.h" | 81 #include "content/browser/screen_orientation/screen_orientation_delegate_android
.h" |
| 82 #include "content/public/browser/screen_orientation_provider.h" | 82 #include "content/public/browser/screen_orientation_provider.h" |
| 83 #include "ui/gl/gl_surface.h" | 83 #include "ui/gl/gl_surface.h" |
| 84 #endif | 84 #endif |
| 85 | 85 |
| 86 #if defined(OS_MACOSX) && !defined(OS_IOS) | 86 #if defined(OS_MACOSX) && !defined(OS_IOS) |
| 87 #include "content/browser/bootstrap_sandbox_mac.h" | 87 #include "content/browser/bootstrap_sandbox_mac.h" |
| 88 #include "content/browser/cocoa/system_hotkey_helper_mac.h" | 88 #include "content/browser/cocoa/system_hotkey_helper_mac.h" |
| 89 #include "content/browser/theme_helper_mac.h" | 89 #include "content/browser/theme_helper_mac.h" |
| (...skipping 442 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 532 // message loop to avoid calling MessagePumpForUI::ScheduleWork() before | 532 // message loop to avoid calling MessagePumpForUI::ScheduleWork() before |
| 533 // MessagePumpForUI::Start() as it will crash the browser. | 533 // MessagePumpForUI::Start() as it will crash the browser. |
| 534 if (is_tracing_startup_) { | 534 if (is_tracing_startup_) { |
| 535 TRACE_EVENT0("startup", "BrowserMainLoop::InitStartupTracing"); | 535 TRACE_EVENT0("startup", "BrowserMainLoop::InitStartupTracing"); |
| 536 InitStartupTracing(parsed_command_line_); | 536 InitStartupTracing(parsed_command_line_); |
| 537 } | 537 } |
| 538 #endif // !defined(OS_IOS) | 538 #endif // !defined(OS_IOS) |
| 539 | 539 |
| 540 #if defined(OS_ANDROID) | 540 #if defined(OS_ANDROID) |
| 541 { | 541 { |
| 542 TRACE_EVENT0("startup", "BrowserMainLoop::Subsystem:SurfaceTexturePeer"); | 542 TRACE_EVENT0("startup", "BrowserMainLoop::Subsystem:SurfaceTextureManager"); |
| 543 SurfaceTexturePeer::InitInstance(new SurfaceTexturePeerBrowserImpl()); | 543 SurfaceTextureManager::InitInstance(new BrowserSurfaceTextureManager); |
| 544 } | 544 } |
| 545 | 545 |
| 546 { | 546 { |
| 547 TRACE_EVENT0("startup", | 547 TRACE_EVENT0("startup", |
| 548 "BrowserMainLoop::Subsystem:ScreenOrientationProvider"); | 548 "BrowserMainLoop::Subsystem:ScreenOrientationProvider"); |
| 549 screen_orientation_delegate_.reset( | 549 screen_orientation_delegate_.reset( |
| 550 new ScreenOrientationDelegateAndroid()); | 550 new ScreenOrientationDelegateAndroid()); |
| 551 ScreenOrientationProvider::SetDelegate(screen_orientation_delegate_.get()); | 551 ScreenOrientationProvider::SetDelegate(screen_orientation_delegate_.get()); |
| 552 } | 552 } |
| 553 #endif | 553 #endif |
| (...skipping 653 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1207 | 1207 |
| 1208 void BrowserMainLoop::EndStartupTracing() { | 1208 void BrowserMainLoop::EndStartupTracing() { |
| 1209 is_tracing_startup_ = false; | 1209 is_tracing_startup_ = false; |
| 1210 TracingController::GetInstance()->DisableRecording( | 1210 TracingController::GetInstance()->DisableRecording( |
| 1211 TracingController::CreateFileSink( | 1211 TracingController::CreateFileSink( |
| 1212 startup_trace_file_, | 1212 startup_trace_file_, |
| 1213 base::Bind(OnStoppedStartupTracing, startup_trace_file_))); | 1213 base::Bind(OnStoppedStartupTracing, startup_trace_file_))); |
| 1214 } | 1214 } |
| 1215 | 1215 |
| 1216 } // namespace content | 1216 } // namespace content |
| OLD | NEW |