| 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/logging.h" | 9 #include "base/logging.h" |
| 10 #include "base/memory/memory_pressure_monitor.h" | 10 #include "base/memory/memory_pressure_monitor.h" |
| (...skipping 553 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 564 // MessagePumpForUI::Start() as it will crash the browser. | 564 // MessagePumpForUI::Start() as it will crash the browser. |
| 565 if (is_tracing_startup_) { | 565 if (is_tracing_startup_) { |
| 566 TRACE_EVENT0("startup", "BrowserMainLoop::InitStartupTracing"); | 566 TRACE_EVENT0("startup", "BrowserMainLoop::InitStartupTracing"); |
| 567 InitStartupTracing(parsed_command_line_); | 567 InitStartupTracing(parsed_command_line_); |
| 568 } | 568 } |
| 569 #endif // !defined(OS_IOS) | 569 #endif // !defined(OS_IOS) |
| 570 | 570 |
| 571 #if defined(OS_ANDROID) | 571 #if defined(OS_ANDROID) |
| 572 { | 572 { |
| 573 TRACE_EVENT0("startup", "BrowserMainLoop::Subsystem:SurfaceTextureManager"); | 573 TRACE_EVENT0("startup", "BrowserMainLoop::Subsystem:SurfaceTextureManager"); |
| 574 SurfaceTextureManager::InitInstance(new BrowserSurfaceTextureManager); | 574 SurfaceTextureManager::SetInstance(new BrowserSurfaceTextureManager); |
| 575 } | 575 } |
| 576 | 576 |
| 577 if (!parsed_command_line_.HasSwitch( | 577 if (!parsed_command_line_.HasSwitch( |
| 578 switches::kDisableScreenOrientationLock)) { | 578 switches::kDisableScreenOrientationLock)) { |
| 579 TRACE_EVENT0("startup", | 579 TRACE_EVENT0("startup", |
| 580 "BrowserMainLoop::Subsystem:ScreenOrientationProvider"); | 580 "BrowserMainLoop::Subsystem:ScreenOrientationProvider"); |
| 581 screen_orientation_delegate_.reset( | 581 screen_orientation_delegate_.reset( |
| 582 new ScreenOrientationDelegateAndroid()); | 582 new ScreenOrientationDelegateAndroid()); |
| 583 ScreenOrientationProvider::SetDelegate(screen_orientation_delegate_.get()); | 583 ScreenOrientationProvider::SetDelegate(screen_orientation_delegate_.get()); |
| 584 } | 584 } |
| (...skipping 742 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1327 | 1327 |
| 1328 void BrowserMainLoop::EndStartupTracing() { | 1328 void BrowserMainLoop::EndStartupTracing() { |
| 1329 is_tracing_startup_ = false; | 1329 is_tracing_startup_ = false; |
| 1330 TracingController::GetInstance()->DisableRecording( | 1330 TracingController::GetInstance()->DisableRecording( |
| 1331 TracingController::CreateFileSink( | 1331 TracingController::CreateFileSink( |
| 1332 startup_trace_file_, | 1332 startup_trace_file_, |
| 1333 base::Bind(OnStoppedStartupTracing, startup_trace_file_))); | 1333 base::Bind(OnStoppedStartupTracing, startup_trace_file_))); |
| 1334 } | 1334 } |
| 1335 | 1335 |
| 1336 } // namespace content | 1336 } // namespace content |
| OLD | NEW |