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