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

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: Patch to land 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 ab24051d24d067fff98ff44496cbadcff145924e..e82f2c00b34dead422043b9cc00d0b349e3192ff 100644
--- a/chrome/browser/ui/panels/panel_browser_view.cc
+++ b/chrome/browser/ui/panels/panel_browser_view.cc
@@ -542,19 +542,26 @@ bool PanelBrowserView::EndDragging(bool cancelled) {
void PanelBrowserView::SetPanelAppIconVisibility(bool visible) {
#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:
« no previous file with comments | « chrome/browser/ui/panels/panel_browser_view.h ('k') | chrome/browser/ui/panels/panel_browser_window_cocoa.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698