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

Unified Diff: chrome_frame/utils.cc

Issue 604014: First batch of context menu tests... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 years, 10 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
Index: chrome_frame/utils.cc
===================================================================
--- chrome_frame/utils.cc (revision 38776)
+++ chrome_frame/utils.cc (working copy)
@@ -857,3 +857,11 @@
return moniker_url;
}
+bool IsTopLevelWindow(HWND window) {
+ long style = GetWindowLong(window, GWL_STYLE); // NOLINT
+ if (!(style & WS_CHILD))
+ return true;
+
+ HWND parent = GetParent(window);
+ return !parent || (parent == GetDesktopWindow());
+}

Powered by Google App Engine
This is Rietveld 408576698