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

Side by Side Diff: chrome/browser/chrome_browser_main_win.cc

Issue 857123002: Disable Win32k renderer lockdown if DirectWrite is disabled. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix cloudprint Created 5 years, 11 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 "chrome/browser/chrome_browser_main_win.h" 5 #include "chrome/browser/chrome_browser_main_win.h"
6 6
7 #include <windows.h> 7 #include <windows.h>
8 #include <shellapi.h> 8 #include <shellapi.h>
9 9
10 #include <algorithm> 10 #include <algorithm>
(...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after
230 230
231 // Windows 8+ provides a mode where by a process cannot call Win32K/GDI 231 // Windows 8+ provides a mode where by a process cannot call Win32K/GDI
232 // functions in the kernel (win32k.sys). If we are on Windows 8+ and if 232 // functions in the kernel (win32k.sys). If we are on Windows 8+ and if
233 // we are launched with the kEnableWin32kRendererLockDown switch then we 233 // we are launched with the kEnableWin32kRendererLockDown switch then we
234 // force the PDF pepper plugin to run out of process. This is because the 234 // force the PDF pepper plugin to run out of process. This is because the
235 // PDF plugin uses GDI for text rendering which does not work in the 235 // PDF plugin uses GDI for text rendering which does not work in the
236 // Win32K lockdown mode. Running it out of process ensures that the process 236 // Win32K lockdown mode. Running it out of process ensures that the process
237 // launched for the plugin does not have the Win32K lockdown mode enabled. 237 // launched for the plugin does not have the Win32K lockdown mode enabled.
238 // TODO(ananta) 238 // TODO(ananta)
239 // Revisit this when the pdf plugin uses skia and stops using GDI. 239 // Revisit this when the pdf plugin uses skia and stops using GDI.
240 if (switches::IsWin32kRendererLockdownEnabled() && 240 if (switches::IsWin32kRendererLockdownEnabled(false)) {
241 base::win::GetVersion() >= base::win::VERSION_WIN8) {
242 base::CommandLine::ForCurrentProcess()->AppendSwitch( 241 base::CommandLine::ForCurrentProcess()->AppendSwitch(
243 switches::kEnableOutOfProcessPdf); 242 switches::kEnableOutOfProcessPdf);
244 } 243 }
245 return rv; 244 return rv;
246 } 245 }
247 246
248 void ChromeBrowserMainPartsWin::ShowMissingLocaleMessageBox() { 247 void ChromeBrowserMainPartsWin::ShowMissingLocaleMessageBox() {
249 ui::MessageBox(NULL, 248 ui::MessageBox(NULL,
250 base::ASCIIToUTF16(chrome_browser::kMissingLocaleDataMessage), 249 base::ASCIIToUTF16(chrome_browser::kMissingLocaleDataMessage),
251 base::ASCIIToUTF16(chrome_browser::kMissingLocaleDataTitle), 250 base::ASCIIToUTF16(chrome_browser::kMissingLocaleDataTitle),
(...skipping 16 matching lines...) Expand all
268 base::Bind(ExecuteFontCacheBuildTask, path)); 267 base::Bind(ExecuteFontCacheBuildTask, path));
269 } 268 }
270 } 269 }
271 } 270 }
272 271
273 void ChromeBrowserMainPartsWin::PostBrowserStart() { 272 void ChromeBrowserMainPartsWin::PostBrowserStart() {
274 ChromeBrowserMainParts::PostBrowserStart(); 273 ChromeBrowserMainParts::PostBrowserStart();
275 274
276 UMA_HISTOGRAM_BOOLEAN("Windows.Tablet", base::win::IsTabletDevice()); 275 UMA_HISTOGRAM_BOOLEAN("Windows.Tablet", base::win::IsTabletDevice());
277 UMA_HISTOGRAM_BOOLEAN("Windows.Win32kRendererLockdown", 276 UMA_HISTOGRAM_BOOLEAN("Windows.Win32kRendererLockdown",
278 switches::IsWin32kRendererLockdownEnabled()); 277 switches::IsWin32kRendererLockdownEnabled(false));
279 278
280 // Set up a task to verify installed modules in the current process. Use a 279 // Set up a task to verify installed modules in the current process. Use a
281 // delay to reduce the impact on startup time. 280 // delay to reduce the impact on startup time.
282 content::BrowserThread::GetMessageLoopProxyForThread( 281 content::BrowserThread::GetMessageLoopProxyForThread(
283 content::BrowserThread::UI)->PostDelayedTask( 282 content::BrowserThread::UI)->PostDelayedTask(
284 FROM_HERE, 283 FROM_HERE,
285 base::Bind(&VerifyInstallation), 284 base::Bind(&VerifyInstallation),
286 base::TimeDelta::FromSeconds(45)); 285 base::TimeDelta::FromSeconds(45));
287 286
288 InitializeChromeElf(); 287 InitializeChromeElf();
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after
475 if (resource_id) 474 if (resource_id)
476 return l10n_util::GetStringUTF16(resource_id); 475 return l10n_util::GetStringUTF16(resource_id);
477 return base::string16(); 476 return base::string16();
478 } 477 }
479 478
480 // static 479 // static
481 void ChromeBrowserMainPartsWin::SetupInstallerUtilStrings() { 480 void ChromeBrowserMainPartsWin::SetupInstallerUtilStrings() {
482 CR_DEFINE_STATIC_LOCAL(TranslationDelegate, delegate, ()); 481 CR_DEFINE_STATIC_LOCAL(TranslationDelegate, delegate, ());
483 installer::SetTranslationDelegate(&delegate); 482 installer::SetTranslationDelegate(&delegate);
484 } 483 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/startup/bad_flags_prompt.cc » ('j') | chrome/browser/ui/startup/bad_flags_prompt.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698