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

Unified Diff: base/win/win_util.h

Issue 1351513002: Added common check for USER32 and GDI32 API availability. (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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | base/win/win_util.cc » ('j') | base/win/win_util.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/win/win_util.h
diff --git a/base/win/win_util.h b/base/win/win_util.h
index 9f42e445748f319e39cb09529f381347b2edeadb..3c900ff9b0a8fce7d2c3c3dc0e8bc60605a092a1 100644
--- a/base/win/win_util.h
+++ b/base/win/win_util.h
@@ -166,6 +166,13 @@ BASE_EXPORT void SetDomainStateForTesting(bool state);
// run-time detection of this capability.
BASE_EXPORT bool MaybeHasSHA256Support();
+// Returns true if the current process can make USER32 or GDI32 calls such as
+// CreateWindow and CreateDC. Windows 8 and above allow the kernel component
+// of these calls to be disabled which can cause undefined behaviour such as
+// crashes. This function can be used to guard areas of code using these calls
+// and provide a fallback path if necessary.
+BASE_EXPORT bool IsUser32AndGdi32Available();
+
} // namespace win
} // namespace base
« no previous file with comments | « no previous file | base/win/win_util.cc » ('j') | base/win/win_util.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698