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

Unified Diff: chrome/browser/ui/panels/panel_browser_view.cc

Issue 9546001: Support detaching/attaching panels via inter-strip drags. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix per feedback Created 8 years, 9 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/browser/ui/panels/panel_browser_view.cc
diff --git a/chrome/browser/ui/panels/panel_browser_view.cc b/chrome/browser/ui/panels/panel_browser_view.cc
index 92daaa3b372e838fc27f89b9780dc515e1461371..7139b9c7fa4a24a0beea43aae87e21e9b9c3a3e0 100644
--- a/chrome/browser/ui/panels/panel_browser_view.cc
+++ b/chrome/browser/ui/panels/panel_browser_view.cc
@@ -522,21 +522,29 @@ bool PanelBrowserView::EndDragging(bool cancelled) {
}
void PanelBrowserView::SetPanelAppIconVisibility(bool visible) {
+ // The panel should not show app icon in the desktop bar if it is in overflow.
jennb 2012/03/08 23:41:09 Delete. If you need such a comment, it belongs in
jianli 2012/03/09 21:48:58 Done.
#if defined(OS_WIN) && !defined(USE_AURA)
gfx::NativeWindow native_window = GetNativeHandle();
- ::ShowWindow(native_window, SW_HIDE);
int style = ::GetWindowLong(native_window, GWL_EXSTYLE);
+ int new_style = style;
if (visible)
- style &= (~WS_EX_TOOLWINDOW);
+ new_style &= (~WS_EX_TOOLWINDOW);
else
- style |= WS_EX_TOOLWINDOW;
- ::SetWindowLong(native_window, GWL_EXSTYLE, style);
- ::ShowWindow(native_window, SW_SHOWNA);
+ new_style |= WS_EX_TOOLWINDOW;
+ if (style != new_style) {
+ ::ShowWindow(native_window, SW_HIDE);
+ ::SetWindowLong(native_window, GWL_EXSTYLE, new_style);
+ ::ShowWindow(native_window, SW_SHOWNA);
+ }
#else
NOTIMPLEMENTED();
#endif
}
+void PanelBrowserView::SetPanelAlwaysOnTop(bool on_top) {
+ GetWidget()->SetAlwaysOnTop(on_top);
+}
+
// NativePanelTesting implementation.
class NativePanelTestingWin : public NativePanelTesting {
public:

Powered by Google App Engine
This is Rietveld 408576698