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

Side by Side Diff: chrome/browser/ui/panels/panel_strip.h

Issue 10066032: Enable user resizing for docked Panels (GTK and Mac). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: minor cleanup 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_UI_PANELS_PANEL_STRIP_H_ 5 #ifndef CHROME_BROWSER_UI_PANELS_PANEL_STRIP_H_
6 #define CHROME_BROWSER_UI_PANELS_PANEL_STRIP_H_ 6 #define CHROME_BROWSER_UI_PANELS_PANEL_STRIP_H_
7 #pragma once 7 #pragma once
8 8
9 #include "chrome/browser/ui/panels/panel_constants.h" 9 #include "chrome/browser/ui/panels/panel_constants.h"
10 #include "ui/gfx/point.h" 10 #include "ui/gfx/point.h"
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 virtual void CloseAll() = 0; 56 virtual void CloseAll() = 0;
57 57
58 // Resizes the |panel| to the |preferred_window_size| and updates the layout 58 // Resizes the |panel| to the |preferred_window_size| and updates the layout
59 // of other panels in the collection accordingly. 59 // of other panels in the collection accordingly.
60 // |preferred_window_size| is the outer dimensions of the window, not 60 // |preferred_window_size| is the outer dimensions of the window, not
61 // the content area, and is in screen coordinates. 61 // the content area, and is in screen coordinates.
62 // The preferred size may be adjusted to fit layout constraints. 62 // The preferred size may be adjusted to fit layout constraints.
63 virtual void ResizePanelWindow(Panel* panel, 63 virtual void ResizePanelWindow(Panel* panel,
64 const gfx::Size& preferred_window_size) = 0; 64 const gfx::Size& preferred_window_size) = 0;
65 65
66 // Returns true if |panel| can be resized by the user when in this strip. 66 // Returns whether/how |panel| can be resized by the user when in this strip.
jianli 2012/04/13 00:52:36 Probably clearer to say: returns the edges that ca
jennb 2012/04/13 19:48:04 Done.
67 virtual bool CanResizePanel(const Panel* panel) const = 0; 67 virtual panel::Resizability CanResizePanel(const Panel* panel) const = 0;
jianli 2012/04/13 00:52:36 Can*** makes me think about the bool return value.
Dmitry Titov 2012/04/13 02:55:45 GetPanelResizability()?
jennb 2012/04/13 19:48:04 Done. Did not rename CanResizeByMouse() in this pa
68 68
69 // Change panel's bounds and take care of all possible side effects 69 // Change panel's bounds and take care of all possible side effects
70 // in ths strip as a result of the panel being resized by the user. 70 // in ths strip as a result of the panel being resized by the user.
71 // TODO (AndreiB) Add a parameter telling what how to approach animation 71 // TODO (AndreiB) Add a parameter telling what how to approach animation
72 // (no animation, continue existing, or start new). 72 // (no animation, continue existing, or start new).
73 virtual void OnPanelResizedByMouse(Panel* panel, 73 virtual void OnPanelResizedByMouse(Panel* panel,
74 const gfx::Rect& new_bounds) = 0; 74 const gfx::Rect& new_bounds) = 0;
75 75
76 // Invoked when the draw attention state of the panel has changed. 76 // Invoked when the draw attention state of the panel has changed.
77 // Subclass should update the display of the panel to match the new 77 // Subclass should update the display of the panel to match the new
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 virtual void UpdatePanelOnStripChange(Panel* panel) = 0; 132 virtual void UpdatePanelOnStripChange(Panel* panel) = 0;
133 133
134 protected: 134 protected:
135 explicit PanelStrip(Type type); 135 explicit PanelStrip(Type type);
136 virtual ~PanelStrip(); 136 virtual ~PanelStrip();
137 137
138 const Type type_; // Type of this panel strip. 138 const Type type_; // Type of this panel strip.
139 }; 139 };
140 140
141 #endif // CHROME_BROWSER_UI_PANELS_PANEL_STRIP_H_ 141 #endif // CHROME_BROWSER_UI_PANELS_PANEL_STRIP_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698