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

Unified Diff: chrome/browser/ui/views/panels/panel_view.cc

Issue 11669018: Support dragging panels to stack and snap. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Change per feedback Created 7 years, 11 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/views/panels/panel_view.cc
diff --git a/chrome/browser/ui/views/panels/panel_view.cc b/chrome/browser/ui/views/panels/panel_view.cc
index b99dcb419bb4388ba7a2ef83661270ce90aa2701..9dcae89cfa2debe11231b5a423edc3cdf5b70c30 100644
--- a/chrome/browser/ui/views/panels/panel_view.cc
+++ b/chrome/browser/ui/views/panels/panel_view.cc
@@ -13,6 +13,7 @@
#include "chrome/browser/ui/panels/panel.h"
#include "chrome/browser/ui/panels/panel_bounds_animation.h"
#include "chrome/browser/ui/panels/panel_manager.h"
+#include "chrome/browser/ui/panels/stacked_panel_collection.h"
#include "chrome/browser/ui/views/panels/panel_frame_view.h"
#include "content/public/browser/render_view_host.h"
#include "content/public/browser/render_widget_host_view.h"
@@ -582,6 +583,24 @@ int PanelView::TitleOnlyHeight() const {
return panel::kTitlebarHeight;
}
+void PanelView::UpdatePanelStackingProperty() {
+#if defined(OS_WIN) && !defined(USE_AURA)
+ StackedPanelCollection* stack = NULL;
+ if (panel_->collection()->type() == PanelCollection::STACKED)
+ stack = static_cast<StackedPanelCollection*>(panel_->collection());
+ HWND owner = stack ? stack->GetNativeWindow() : NULL;
+ if (owner)
+ UpdateWindowAttribute(GWL_EXSTYLE, 0, WS_EX_APPWINDOW, false);
Dmitry Titov 2013/01/09 02:29:50 Please add a comment here, to explain why this is
jianli 2013/01/09 21:00:59 Done.
+ else
+ UpdateWindowAttribute(GWL_EXSTYLE, WS_EX_APPWINDOW, 0, false);
+ ::SetWindowLong(GetNativePanelHandle(),
+ GWL_HWNDPARENT,
+ reinterpret_cast<LONG>(owner));
+#else
+ NOTIMPLEMENTED();
+#endif
+}
+
void PanelView::AttachWebContents(content::WebContents* contents) {
web_view_->SetWebContents(contents);
}

Powered by Google App Engine
This is Rietveld 408576698