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

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

Issue 10066032: Enable user resizing for docked Panels (GTK and Mac). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix tests Created 8 years, 8 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
« no previous file with comments | « chrome/browser/ui/panels/docked_panel_strip.h ('k') | chrome/browser/ui/panels/overflow_panel_strip.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/panels/docked_panel_strip.cc
diff --git a/chrome/browser/ui/panels/docked_panel_strip.cc b/chrome/browser/ui/panels/docked_panel_strip.cc
index 29a15fe81e8def190068bd97a0ff5c2afb96787b..5753783abb130ddcd2d4e5d59f6c30fb42543851 100644
--- a/chrome/browser/ui/panels/docked_panel_strip.cc
+++ b/chrome/browser/ui/panels/docked_panel_strip.cc
@@ -434,14 +434,17 @@ void DockedPanelStrip::EndDraggingPanelWithinStrip(Panel* panel, bool aborted) {
RefreshLayout();
}
-bool DockedPanelStrip::CanResizePanel(const Panel* panel) const {
- return false;
+panel::Resizability DockedPanelStrip::GetPanelResizability(
+ const Panel* panel) const {
+ return (!panel->has_temporary_layout() &&
+ panel->expansion_state() == Panel::EXPANDED) ?
+ panel::RESIZABLE_ALL_SIDES_EXCEPT_BOTTOM : panel::NOT_RESIZABLE;
}
void DockedPanelStrip::OnPanelResizedByMouse(Panel* panel,
const gfx::Rect& new_bounds) {
DCHECK_EQ(this, panel->panel_strip());
- NOTREACHED();
+ panel->SetPanelBoundsInstantly(new_bounds);
}
@@ -886,5 +889,5 @@ void DockedPanelStrip::UpdatePanelOnStripChange(Panel* panel) {
panel->set_attention_mode(Panel::USE_PANEL_ATTENTION);
panel->SetAppIconVisibility(true);
panel->SetAlwaysOnTop(true);
- panel->EnableResizeByMouse(false);
+ panel->EnableResizeByMouse(true);
}
« no previous file with comments | « chrome/browser/ui/panels/docked_panel_strip.h ('k') | chrome/browser/ui/panels/overflow_panel_strip.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698