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/location.h" | 9 #include "base/location.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
(...skipping 602 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
613 } else { | 613 } else { |
614 IOSurfaceManager::SetInstance(BrowserIOSurfaceManager::GetInstance()); | 614 IOSurfaceManager::SetInstance(BrowserIOSurfaceManager::GetInstance()); |
615 } | 615 } |
616 } | 616 } |
617 #endif | 617 #endif |
618 | 618 |
619 #if defined(USE_OZONE) | 619 #if defined(USE_OZONE) |
620 client_native_pixmap_factory_ = ui::ClientNativePixmapFactory::Create(); | 620 client_native_pixmap_factory_ = ui::ClientNativePixmapFactory::Create(); |
621 ui::ClientNativePixmapFactory::SetInstance( | 621 ui::ClientNativePixmapFactory::SetInstance( |
622 client_native_pixmap_factory_.get()); | 622 client_native_pixmap_factory_.get()); |
623 auto scoped_fd(ui::ClientNativePixmapFactory::GetInstance()->OpenVgemFD()); | |
spang
2015/08/17 18:03:41
The usual syntax is:
auto scoped_fd = ui::ClientN
dshwang
2015/08/18 14:14:39
Done.
| |
624 ui::ClientNativePixmapFactory::GetInstance()->SetVgemFD(scoped_fd.Pass()); | |
623 #endif | 625 #endif |
624 | 626 |
625 if (parsed_command_line_.HasSwitch(switches::kMemoryMetrics)) { | 627 if (parsed_command_line_.HasSwitch(switches::kMemoryMetrics)) { |
626 TRACE_EVENT0("startup", "BrowserMainLoop::Subsystem:MemoryObserver"); | 628 TRACE_EVENT0("startup", "BrowserMainLoop::Subsystem:MemoryObserver"); |
627 memory_observer_.reset(new MemoryObserver()); | 629 memory_observer_.reset(new MemoryObserver()); |
628 base::MessageLoop::current()->AddTaskObserver(memory_observer_.get()); | 630 base::MessageLoop::current()->AddTaskObserver(memory_observer_.get()); |
629 } | 631 } |
630 | 632 |
631 if (parsed_command_line_.HasSwitch( | 633 if (parsed_command_line_.HasSwitch( |
632 switches::kEnableAggressiveDOMStorageFlushing)) { | 634 switches::kEnableAggressiveDOMStorageFlushing)) { |
(...skipping 727 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1360 DCHECK(is_tracing_startup_); | 1362 DCHECK(is_tracing_startup_); |
1361 | 1363 |
1362 is_tracing_startup_ = false; | 1364 is_tracing_startup_ = false; |
1363 TracingController::GetInstance()->DisableRecording( | 1365 TracingController::GetInstance()->DisableRecording( |
1364 TracingController::CreateFileSink( | 1366 TracingController::CreateFileSink( |
1365 startup_trace_file_, | 1367 startup_trace_file_, |
1366 base::Bind(OnStoppedStartupTracing, startup_trace_file_))); | 1368 base::Bind(OnStoppedStartupTracing, startup_trace_file_))); |
1367 } | 1369 } |
1368 | 1370 |
1369 } // namespace content | 1371 } // namespace content |
OLD | NEW |