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

Unified Diff: views/widget/monitor_win.cc

Issue 7646003: Support auto-hide taskbar for panels on Windows. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 4 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: views/widget/monitor_win.cc
===================================================================
--- views/widget/monitor_win.cc (revision 98344)
+++ views/widget/monitor_win.cc (working copy)
@@ -4,7 +4,7 @@
#include "views/widget/monitor_win.h"
-#include <windows.h>
+#include <shellapi.h>
#include "base/logging.h"
#include "ui/gfx/rect.h"
@@ -24,4 +24,19 @@
return gfx::Rect();
}
+HWND GetTopmostAutoHideTaskbarForEdge(UINT edge, HMONITOR monitor) {
+ if (monitor == NULL)
Peter Kasting 2011/08/30 18:31:32 Nit: I'd roll this into the conditional below like
jianli 2011/08/30 18:38:55 Done.
+ return NULL;
+ APPBARDATA taskbar_data = { 0 };
Peter Kasting 2011/08/30 18:31:32 Nit: Shorter: APPBARDATA taskbar_data = { sizeof
jianli 2011/08/30 18:38:55 Done.
+ taskbar_data.cbSize = sizeof APPBARDATA;
+ taskbar_data.uEdge = edge;
+ HWND taskbar = reinterpret_cast<HWND>(SHAppBarMessage(ABM_GETAUTOHIDEBAR,
+ &taskbar_data));
+ if (::IsWindow(taskbar) &&
Peter Kasting 2011/08/30 18:31:32 Nit: Shorter: return (...) ? taskbar : NULL;
jianli 2011/08/30 18:38:55 Done.
+ (MonitorFromWindow(taskbar, MONITOR_DEFAULTTONULL) == monitor) &&
+ (GetWindowLong(taskbar, GWL_EXSTYLE) & WS_EX_TOPMOST))
+ return taskbar;
+ return NULL;
+}
+
} // namespace views

Powered by Google App Engine
This is Rietveld 408576698