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

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

Issue 1354533002: Mac: move content::RenderWidgetResizeHelper to ui::WindowResizeHelperMac (acelerated_widget_mac) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 3 months 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/location.h" 9 #include "base/location.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 #endif 101 #endif
102 102
103 #if defined(OS_MACOSX) && !defined(OS_IOS) 103 #if defined(OS_MACOSX) && !defined(OS_IOS)
104 #include "base/memory/memory_pressure_monitor_mac.h" 104 #include "base/memory/memory_pressure_monitor_mac.h"
105 #include "content/browser/bootstrap_sandbox_mac.h" 105 #include "content/browser/bootstrap_sandbox_mac.h"
106 #include "content/browser/browser_io_surface_manager_mac.h" 106 #include "content/browser/browser_io_surface_manager_mac.h"
107 #include "content/browser/cocoa/system_hotkey_helper_mac.h" 107 #include "content/browser/cocoa/system_hotkey_helper_mac.h"
108 #include "content/browser/compositor/browser_compositor_view_mac.h" 108 #include "content/browser/compositor/browser_compositor_view_mac.h"
109 #include "content/browser/in_process_io_surface_manager_mac.h" 109 #include "content/browser/in_process_io_surface_manager_mac.h"
110 #include "content/browser/theme_helper_mac.h" 110 #include "content/browser/theme_helper_mac.h"
111 #include "ui/accelerated_widget_mac/window_resize_helper_mac.h"
111 #endif 112 #endif
112 113
113 #if defined(USE_OZONE) 114 #if defined(USE_OZONE)
114 #include "ui/ozone/public/client_native_pixmap_factory.h" 115 #include "ui/ozone/public/client_native_pixmap_factory.h"
115 #include "ui/ozone/public/ozone_platform.h" 116 #include "ui/ozone/public/ozone_platform.h"
116 #endif 117 #endif
117 118
118 #if defined(OS_WIN) 119 #if defined(OS_WIN)
119 #include <windows.h> 120 #include <windows.h>
120 #include <commctrl.h> 121 #include <commctrl.h>
(...skipping 573 matching lines...) Expand 10 before | Expand all | Expand 10 after
694 695
695 #if defined(OS_MACOSX) 696 #if defined(OS_MACOSX)
696 { 697 {
697 // Initialize AVFoundation if supported, for audio and video. 698 // Initialize AVFoundation if supported, for audio and video.
698 TRACE_EVENT0("startup", 699 TRACE_EVENT0("startup",
699 "BrowserMainLoop::CreateThreads:InitializeAVFoundation"); 700 "BrowserMainLoop::CreateThreads:InitializeAVFoundation");
700 AVFoundationGlue::InitializeAVFoundation(); 701 AVFoundationGlue::InitializeAVFoundation();
701 } 702 }
702 #endif 703 #endif
703 704
705 #if defined(OS_MACOSX) && !defined(OS_IOS)
706 // The WindowResizeHelper synchronizes IO thread tasks with the UI thread.
jam 2015/09/17 23:25:16 can you describe this some more? are we making the
tapted 2015/09/18 00:36:55 Updated the comment, now says // The WindowResi
707 ui::WindowResizeHelperMac::Get()->Init(base::ThreadTaskRunnerHandle::Get());
708 #endif
709
704 // 1) Need to initialize in-process GpuDataManager before creating threads. 710 // 1) Need to initialize in-process GpuDataManager before creating threads.
705 // It's unsafe to append the gpu command line switches to the global 711 // It's unsafe to append the gpu command line switches to the global
706 // CommandLine::ForCurrentProcess object after threads are created. 712 // CommandLine::ForCurrentProcess object after threads are created.
707 // 2) Must be after parts_->PreCreateThreads to pick up chrome://flags. 713 // 2) Must be after parts_->PreCreateThreads to pick up chrome://flags.
708 GpuDataManagerImpl::GetInstance()->Initialize(); 714 GpuDataManagerImpl::GetInstance()->Initialize();
709 715
710 #if !defined(OS_IOS) && (!defined(GOOGLE_CHROME_BUILD) || defined(OS_ANDROID)) 716 #if !defined(OS_IOS) && (!defined(GOOGLE_CHROME_BUILD) || defined(OS_ANDROID))
711 // Single-process is an unsupported and not fully tested mode, so 717 // Single-process is an unsupported and not fully tested mode, so
712 // don't enable it for official Chrome builds (except on Android). 718 // don't enable it for official Chrome builds (except on Android).
713 if (parsed_command_line_.HasSwitch(switches::kSingleProcess)) 719 if (parsed_command_line_.HasSwitch(switches::kSingleProcess))
(...skipping 669 matching lines...) Expand 10 before | Expand all | Expand 10 after
1383 DCHECK(is_tracing_startup_for_duration_); 1389 DCHECK(is_tracing_startup_for_duration_);
1384 1390
1385 is_tracing_startup_for_duration_ = false; 1391 is_tracing_startup_for_duration_ = false;
1386 TracingController::GetInstance()->DisableRecording( 1392 TracingController::GetInstance()->DisableRecording(
1387 TracingController::CreateFileSink( 1393 TracingController::CreateFileSink(
1388 startup_trace_file_, 1394 startup_trace_file_,
1389 base::Bind(OnStoppedStartupTracing, startup_trace_file_))); 1395 base::Bind(OnStoppedStartupTracing, startup_trace_file_)));
1390 } 1396 }
1391 1397
1392 } // namespace content 1398 } // namespace content
OLDNEW
« no previous file with comments | « base/threading/thread_restrictions.h ('k') | content/browser/compositor/browser_compositor_view_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698