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 ui::ClientNativePixmapFactory::GetInstance()->Initialize( | |
626 ui::OzonePlatform::GetInstance()->OpenClientNativePixmapDevice().Pass()); | |
dcheng
2015/08/31 17:40:53
Pass() here is unnecessary.
dshwang
2015/08/31 18:12:29
Done. I didn't know that ScopedGeneric has move co
| |
624 #endif | 627 #endif |
625 | 628 |
626 if (parsed_command_line_.HasSwitch(switches::kMemoryMetrics)) { | 629 if (parsed_command_line_.HasSwitch(switches::kMemoryMetrics)) { |
627 TRACE_EVENT0("startup", "BrowserMainLoop::Subsystem:MemoryObserver"); | 630 TRACE_EVENT0("startup", "BrowserMainLoop::Subsystem:MemoryObserver"); |
628 memory_observer_.reset(new MemoryObserver()); | 631 memory_observer_.reset(new MemoryObserver()); |
629 base::MessageLoop::current()->AddTaskObserver(memory_observer_.get()); | 632 base::MessageLoop::current()->AddTaskObserver(memory_observer_.get()); |
630 } | 633 } |
631 | 634 |
632 if (parsed_command_line_.HasSwitch( | 635 if (parsed_command_line_.HasSwitch( |
633 switches::kEnableAggressiveDOMStorageFlushing)) { | 636 switches::kEnableAggressiveDOMStorageFlushing)) { |
(...skipping 727 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1361 DCHECK(is_tracing_startup_); | 1364 DCHECK(is_tracing_startup_); |
1362 | 1365 |
1363 is_tracing_startup_ = false; | 1366 is_tracing_startup_ = false; |
1364 TracingController::GetInstance()->DisableRecording( | 1367 TracingController::GetInstance()->DisableRecording( |
1365 TracingController::CreateFileSink( | 1368 TracingController::CreateFileSink( |
1366 startup_trace_file_, | 1369 startup_trace_file_, |
1367 base::Bind(OnStoppedStartupTracing, startup_trace_file_))); | 1370 base::Bind(OnStoppedStartupTracing, startup_trace_file_))); |
1368 } | 1371 } |
1369 | 1372 |
1370 } // namespace content | 1373 } // namespace content |
OLD | NEW |