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/message_loop/message_loop.h" | 10 #include "base/message_loop/message_loop.h" |
(...skipping 548 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
559 InitStartupTracing(parsed_command_line_); | 559 InitStartupTracing(parsed_command_line_); |
560 } | 560 } |
561 #endif // !defined(OS_IOS) | 561 #endif // !defined(OS_IOS) |
562 | 562 |
563 #if defined(OS_ANDROID) | 563 #if defined(OS_ANDROID) |
564 { | 564 { |
565 TRACE_EVENT0("startup", "BrowserMainLoop::Subsystem:SurfaceTextureManager"); | 565 TRACE_EVENT0("startup", "BrowserMainLoop::Subsystem:SurfaceTextureManager"); |
566 SurfaceTextureManager::InitInstance(new BrowserSurfaceTextureManager); | 566 SurfaceTextureManager::InitInstance(new BrowserSurfaceTextureManager); |
567 } | 567 } |
568 | 568 |
569 { | 569 if (!parsed_command_line_.HasSwitch( |
| 570 switches::kDisableScreenOrientationLock)) { |
570 TRACE_EVENT0("startup", | 571 TRACE_EVENT0("startup", |
571 "BrowserMainLoop::Subsystem:ScreenOrientationProvider"); | 572 "BrowserMainLoop::Subsystem:ScreenOrientationProvider"); |
572 screen_orientation_delegate_.reset( | 573 screen_orientation_delegate_.reset( |
573 new ScreenOrientationDelegateAndroid()); | 574 new ScreenOrientationDelegateAndroid()); |
574 ScreenOrientationProvider::SetDelegate(screen_orientation_delegate_.get()); | 575 ScreenOrientationProvider::SetDelegate(screen_orientation_delegate_.get()); |
575 } | 576 } |
576 #endif | 577 #endif |
577 | 578 |
578 if (parsed_command_line_.HasSwitch(switches::kMemoryMetrics)) { | 579 if (parsed_command_line_.HasSwitch(switches::kMemoryMetrics)) { |
579 TRACE_EVENT0("startup", "BrowserMainLoop::Subsystem:MemoryObserver"); | 580 TRACE_EVENT0("startup", "BrowserMainLoop::Subsystem:MemoryObserver"); |
(...skipping 694 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1274 | 1275 |
1275 void BrowserMainLoop::EndStartupTracing() { | 1276 void BrowserMainLoop::EndStartupTracing() { |
1276 is_tracing_startup_ = false; | 1277 is_tracing_startup_ = false; |
1277 TracingController::GetInstance()->DisableRecording( | 1278 TracingController::GetInstance()->DisableRecording( |
1278 TracingController::CreateFileSink( | 1279 TracingController::CreateFileSink( |
1279 startup_trace_file_, | 1280 startup_trace_file_, |
1280 base::Bind(OnStoppedStartupTracing, startup_trace_file_))); | 1281 base::Bind(OnStoppedStartupTracing, startup_trace_file_))); |
1281 } | 1282 } |
1282 | 1283 |
1283 } // namespace content | 1284 } // namespace content |
OLD | NEW |