Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(178)

Side by Side Diff: content/browser/browser_main_loop.cc

Issue 1513053002: WIP - Gutterless resize on Windows Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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/feature_list.h" 9 #include "base/feature_list.h"
10 #include "base/location.h" 10 #include "base/location.h"
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 #endif 105 #endif
106 106
107 #if defined(OS_MACOSX) && !defined(OS_IOS) 107 #if defined(OS_MACOSX) && !defined(OS_IOS)
108 #include "base/memory/memory_pressure_monitor_mac.h" 108 #include "base/memory/memory_pressure_monitor_mac.h"
109 #include "content/browser/bootstrap_sandbox_manager_mac.h" 109 #include "content/browser/bootstrap_sandbox_manager_mac.h"
110 #include "content/browser/browser_io_surface_manager_mac.h" 110 #include "content/browser/browser_io_surface_manager_mac.h"
111 #include "content/browser/cocoa/system_hotkey_helper_mac.h" 111 #include "content/browser/cocoa/system_hotkey_helper_mac.h"
112 #include "content/browser/compositor/browser_compositor_view_mac.h" 112 #include "content/browser/compositor/browser_compositor_view_mac.h"
113 #include "content/browser/in_process_io_surface_manager_mac.h" 113 #include "content/browser/in_process_io_surface_manager_mac.h"
114 #include "content/browser/theme_helper_mac.h" 114 #include "content/browser/theme_helper_mac.h"
115 #include "ui/accelerated_widget_mac/window_resize_helper_mac.h" 115 #endif
116
117 #if (defined(OS_MACOSX) && !defined(OS_IOS)) || defined(OS_WIN)
118 #include "ui/base/window_resize_helper.h"
116 #endif 119 #endif
117 120
118 #if defined(USE_OZONE) 121 #if defined(USE_OZONE)
119 #include "ui/ozone/public/client_native_pixmap_factory.h" 122 #include "ui/ozone/public/client_native_pixmap_factory.h"
120 #include "ui/ozone/public/ozone_platform.h" 123 #include "ui/ozone/public/ozone_platform.h"
121 #endif 124 #endif
122 125
123 #if defined(OS_WIN) 126 #if defined(OS_WIN)
124 #include <windows.h> 127 #include <windows.h>
125 #include <commctrl.h> 128 #include <commctrl.h>
(...skipping 615 matching lines...) Expand 10 before | Expand all | Expand 10 after
741 744
742 #if defined(OS_MACOSX) 745 #if defined(OS_MACOSX)
743 { 746 {
744 // Initialize AVFoundation if supported, for audio and video. 747 // Initialize AVFoundation if supported, for audio and video.
745 TRACE_EVENT0("startup", 748 TRACE_EVENT0("startup",
746 "BrowserMainLoop::CreateThreads:InitializeAVFoundation"); 749 "BrowserMainLoop::CreateThreads:InitializeAVFoundation");
747 AVFoundationGlue::InitializeAVFoundation(); 750 AVFoundationGlue::InitializeAVFoundation();
748 } 751 }
749 #endif 752 #endif
750 753
751 #if defined(OS_MACOSX) && !defined(OS_IOS) 754 #if (defined(OS_MACOSX) && !defined(OS_IOS)) || defined(USE_AURA)
ericrk 2015/12/10 23:08:43 should be OS_WIN not USE_AURA, will adjust in next
752 // The WindowResizeHelper allows the UI thread to wait on specific renderer 755 // The WindowResizeHelper allows the UI thread to wait on specific renderer
753 // and GPU messages from the IO thread. Initializing it before the IO thread 756 // and GPU messages from the IO thread. Initializing it before the IO thread
754 // starts ensures the affected IO thread messages always have somewhere to go. 757 // starts ensures the affected IO thread messages always have somewhere to go.
755 ui::WindowResizeHelperMac::Get()->Init(base::ThreadTaskRunnerHandle::Get()); 758 ui::WindowResizeHelper::Get()->Init(base::ThreadTaskRunnerHandle::Get());
756 #endif 759 #endif
757 760
758 // 1) Need to initialize in-process GpuDataManager before creating threads. 761 // 1) Need to initialize in-process GpuDataManager before creating threads.
759 // It's unsafe to append the gpu command line switches to the global 762 // It's unsafe to append the gpu command line switches to the global
760 // CommandLine::ForCurrentProcess object after threads are created. 763 // CommandLine::ForCurrentProcess object after threads are created.
761 // 2) Must be after parts_->PreCreateThreads to pick up chrome://flags. 764 // 2) Must be after parts_->PreCreateThreads to pick up chrome://flags.
762 GpuDataManagerImpl::GetInstance()->Initialize(); 765 GpuDataManagerImpl::GetInstance()->Initialize();
763 766
764 #if !defined(OS_IOS) && (!defined(GOOGLE_CHROME_BUILD) || defined(OS_ANDROID)) 767 #if !defined(OS_IOS) && (!defined(GOOGLE_CHROME_BUILD) || defined(OS_ANDROID))
765 // Single-process is an unsupported and not fully tested mode, so 768 // Single-process is an unsupported and not fully tested mode, so
(...skipping 703 matching lines...) Expand 10 before | Expand all | Expand 10 after
1469 DCHECK(is_tracing_startup_for_duration_); 1472 DCHECK(is_tracing_startup_for_duration_);
1470 1473
1471 is_tracing_startup_for_duration_ = false; 1474 is_tracing_startup_for_duration_ = false;
1472 TracingController::GetInstance()->StopTracing( 1475 TracingController::GetInstance()->StopTracing(
1473 TracingController::CreateFileSink( 1476 TracingController::CreateFileSink(
1474 startup_trace_file_, 1477 startup_trace_file_,
1475 base::Bind(OnStoppedStartupTracing, startup_trace_file_))); 1478 base::Bind(OnStoppedStartupTracing, startup_trace_file_)));
1476 } 1479 }
1477 1480
1478 } // namespace content 1481 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698