Chromium Code Reviews| 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 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 104 #include "content/browser/bootstrap_sandbox_mac.h" | 104 #include "content/browser/bootstrap_sandbox_mac.h" |
| 105 #include "content/browser/browser_io_surface_manager_mac.h" | 105 #include "content/browser/browser_io_surface_manager_mac.h" |
| 106 #include "content/browser/cocoa/system_hotkey_helper_mac.h" | 106 #include "content/browser/cocoa/system_hotkey_helper_mac.h" |
| 107 #include "content/browser/compositor/browser_compositor_view_mac.h" | 107 #include "content/browser/compositor/browser_compositor_view_mac.h" |
| 108 #include "content/browser/in_process_io_surface_manager_mac.h" | 108 #include "content/browser/in_process_io_surface_manager_mac.h" |
| 109 #include "content/browser/theme_helper_mac.h" | 109 #include "content/browser/theme_helper_mac.h" |
| 110 #endif | 110 #endif |
| 111 | 111 |
| 112 #if defined(USE_OZONE) | 112 #if defined(USE_OZONE) |
| 113 #include "ui/ozone/public/client_native_pixmap_factory.h" | 113 #include "ui/ozone/public/client_native_pixmap_factory.h" |
| 114 #include "ui/ozone/public/ozone_platform.h" | |
| 114 #endif | 115 #endif |
| 115 | 116 |
| 116 #if defined(OS_WIN) | 117 #if defined(OS_WIN) |
| 117 #include <windows.h> | 118 #include <windows.h> |
| 118 #include <commctrl.h> | 119 #include <commctrl.h> |
| 119 #include <shellapi.h> | 120 #include <shellapi.h> |
| 120 | 121 |
| 121 #include "base/memory/memory_pressure_monitor_win.h" | 122 #include "base/memory/memory_pressure_monitor_win.h" |
| 122 #include "content/browser/system_message_window_win.h" | 123 #include "content/browser/system_message_window_win.h" |
| 123 #include "content/common/sandbox_win.h" | 124 #include "content/common/sandbox_win.h" |
| (...skipping 490 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 614 } else { | 615 } else { |
| 615 IOSurfaceManager::SetInstance(BrowserIOSurfaceManager::GetInstance()); | 616 IOSurfaceManager::SetInstance(BrowserIOSurfaceManager::GetInstance()); |
| 616 } | 617 } |
| 617 } | 618 } |
| 618 #endif | 619 #endif |
| 619 | 620 |
| 620 #if defined(USE_OZONE) | 621 #if defined(USE_OZONE) |
| 621 client_native_pixmap_factory_ = ui::ClientNativePixmapFactory::Create(); | 622 client_native_pixmap_factory_ = ui::ClientNativePixmapFactory::Create(); |
| 622 ui::ClientNativePixmapFactory::SetInstance( | 623 ui::ClientNativePixmapFactory::SetInstance( |
| 623 client_native_pixmap_factory_.get()); | 624 client_native_pixmap_factory_.get()); |
| 625 auto scoped_fd = | |
|
dcheng
2015/08/21 14:44:06
Use the full typename rather than auto (ScopedFD i
dshwang
2015/08/21 18:38:37
Done.
| |
| 626 ui::OzonePlatform::GetInstance()->OpenClientNativePixmapDevice(); | |
| 627 ui::ClientNativePixmapFactory::GetInstance()->Initialize(scoped_fd.Pass()); | |
| 624 #endif | 628 #endif |
| 625 | 629 |
| 626 if (parsed_command_line_.HasSwitch(switches::kMemoryMetrics)) { | 630 if (parsed_command_line_.HasSwitch(switches::kMemoryMetrics)) { |
| 627 TRACE_EVENT0("startup", "BrowserMainLoop::Subsystem:MemoryObserver"); | 631 TRACE_EVENT0("startup", "BrowserMainLoop::Subsystem:MemoryObserver"); |
| 628 memory_observer_.reset(new MemoryObserver()); | 632 memory_observer_.reset(new MemoryObserver()); |
| 629 base::MessageLoop::current()->AddTaskObserver(memory_observer_.get()); | 633 base::MessageLoop::current()->AddTaskObserver(memory_observer_.get()); |
| 630 } | 634 } |
| 631 | 635 |
| 632 if (parsed_command_line_.HasSwitch( | 636 if (parsed_command_line_.HasSwitch( |
| 633 switches::kEnableAggressiveDOMStorageFlushing)) { | 637 switches::kEnableAggressiveDOMStorageFlushing)) { |
| (...skipping 727 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1361 DCHECK(is_tracing_startup_); | 1365 DCHECK(is_tracing_startup_); |
| 1362 | 1366 |
| 1363 is_tracing_startup_ = false; | 1367 is_tracing_startup_ = false; |
| 1364 TracingController::GetInstance()->DisableRecording( | 1368 TracingController::GetInstance()->DisableRecording( |
| 1365 TracingController::CreateFileSink( | 1369 TracingController::CreateFileSink( |
| 1366 startup_trace_file_, | 1370 startup_trace_file_, |
| 1367 base::Bind(OnStoppedStartupTracing, startup_trace_file_))); | 1371 base::Bind(OnStoppedStartupTracing, startup_trace_file_))); |
| 1368 } | 1372 } |
| 1369 | 1373 |
| 1370 } // namespace content | 1374 } // namespace content |
| OLD | NEW |