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

Unified Diff: base/win_util.cc

Issue 12434: Focus manager subclassing check (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 12 years, 1 month 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 | « base/win_util.h ('k') | chrome/views/focus_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/win_util.cc
===================================================================
--- base/win_util.cc (revision 5976)
+++ base/win_util.cc (working copy)
@@ -257,6 +257,12 @@
// installed.
static const wchar_t* const kHandlerKey = L"__ORIGINAL_MESSAGE_HANDLER__";
+bool IsSubclassed(HWND window, WNDPROC subclass_proc) {
+ WNDPROC original_handler =
+ reinterpret_cast<WNDPROC>(GetWindowLongPtr(window, GWLP_WNDPROC));
+ return original_handler == subclass_proc;
+}
+
bool Subclass(HWND window, WNDPROC subclass_proc) {
WNDPROC original_handler =
reinterpret_cast<WNDPROC>(GetWindowLongPtr(window, GWLP_WNDPROC));
« no previous file with comments | « base/win_util.h ('k') | chrome/views/focus_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698