| 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 <stddef.h> | 7 #include <stddef.h> |
| 8 #include <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 117 #include "content/browser/bootstrap_sandbox_manager_mac.h" | 117 #include "content/browser/bootstrap_sandbox_manager_mac.h" |
| 118 #include "content/browser/cocoa/system_hotkey_helper_mac.h" | 118 #include "content/browser/cocoa/system_hotkey_helper_mac.h" |
| 119 #include "content/browser/compositor/browser_compositor_view_mac.h" | 119 #include "content/browser/compositor/browser_compositor_view_mac.h" |
| 120 #include "content/browser/mach_broker_mac.h" | 120 #include "content/browser/mach_broker_mac.h" |
| 121 #include "content/browser/theme_helper_mac.h" | 121 #include "content/browser/theme_helper_mac.h" |
| 122 #include "ui/accelerated_widget_mac/window_resize_helper_mac.h" | 122 #include "ui/accelerated_widget_mac/window_resize_helper_mac.h" |
| 123 #endif | 123 #endif |
| 124 | 124 |
| 125 #if defined(USE_OZONE) | 125 #if defined(USE_OZONE) |
| 126 #include "ui/ozone/public/client_native_pixmap_factory.h" | 126 #include "ui/ozone/public/client_native_pixmap_factory.h" |
| 127 #include "ui/ozone/public/ozone_platform.h" | |
| 128 #endif | 127 #endif |
| 129 | 128 |
| 130 #if defined(OS_WIN) | 129 #if defined(OS_WIN) |
| 131 #include <windows.h> | 130 #include <windows.h> |
| 132 #include <commctrl.h> | 131 #include <commctrl.h> |
| 133 #include <shellapi.h> | 132 #include <shellapi.h> |
| 134 | 133 |
| 135 #include "base/memory/memory_pressure_monitor_win.h" | 134 #include "base/memory/memory_pressure_monitor_win.h" |
| 136 #include "base/win/windows_version.h" | 135 #include "base/win/windows_version.h" |
| 137 #include "content/browser/screen_orientation/screen_orientation_delegate_win.h" | 136 #include "content/browser/screen_orientation/screen_orientation_delegate_win.h" |
| (...skipping 532 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 670 TRACE_EVENT0("startup", | 669 TRACE_EVENT0("startup", |
| 671 "BrowserMainLoop::Subsystem:BootstrapSandbox"); | 670 "BrowserMainLoop::Subsystem:BootstrapSandbox"); |
| 672 CHECK(BootstrapSandboxManager::GetInstance()); | 671 CHECK(BootstrapSandboxManager::GetInstance()); |
| 673 } | 672 } |
| 674 #endif | 673 #endif |
| 675 | 674 |
| 676 #if defined(USE_OZONE) | 675 #if defined(USE_OZONE) |
| 677 client_native_pixmap_factory_ = ui::ClientNativePixmapFactory::Create(); | 676 client_native_pixmap_factory_ = ui::ClientNativePixmapFactory::Create(); |
| 678 ui::ClientNativePixmapFactory::SetInstance( | 677 ui::ClientNativePixmapFactory::SetInstance( |
| 679 client_native_pixmap_factory_.get()); | 678 client_native_pixmap_factory_.get()); |
| 680 ui::ClientNativePixmapFactory::GetInstance()->Initialize( | |
| 681 ui::OzonePlatform::GetInstance()->OpenClientNativePixmapDevice()); | |
| 682 #endif | 679 #endif |
| 683 | 680 |
| 684 if (parsed_command_line_.HasSwitch(switches::kMemoryMetrics)) { | 681 if (parsed_command_line_.HasSwitch(switches::kMemoryMetrics)) { |
| 685 TRACE_EVENT0("startup", "BrowserMainLoop::Subsystem:MemoryObserver"); | 682 TRACE_EVENT0("startup", "BrowserMainLoop::Subsystem:MemoryObserver"); |
| 686 memory_observer_.reset(new MemoryObserver()); | 683 memory_observer_.reset(new MemoryObserver()); |
| 687 base::MessageLoop::current()->AddTaskObserver(memory_observer_.get()); | 684 base::MessageLoop::current()->AddTaskObserver(memory_observer_.get()); |
| 688 } | 685 } |
| 689 | 686 |
| 690 if (parsed_command_line_.HasSwitch( | 687 if (parsed_command_line_.HasSwitch( |
| 691 switches::kEnableAggressiveDOMStorageFlushing)) { | 688 switches::kEnableAggressiveDOMStorageFlushing)) { |
| (...skipping 791 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1483 DCHECK(is_tracing_startup_for_duration_); | 1480 DCHECK(is_tracing_startup_for_duration_); |
| 1484 | 1481 |
| 1485 is_tracing_startup_for_duration_ = false; | 1482 is_tracing_startup_for_duration_ = false; |
| 1486 TracingController::GetInstance()->StopTracing( | 1483 TracingController::GetInstance()->StopTracing( |
| 1487 TracingController::CreateFileSink( | 1484 TracingController::CreateFileSink( |
| 1488 startup_trace_file_, | 1485 startup_trace_file_, |
| 1489 base::Bind(OnStoppedStartupTracing, startup_trace_file_))); | 1486 base::Bind(OnStoppedStartupTracing, startup_trace_file_))); |
| 1490 } | 1487 } |
| 1491 | 1488 |
| 1492 } // namespace content | 1489 } // namespace content |
| OLD | NEW |