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

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

Issue 11669018: Support dragging panels to stack and snap. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix CrOS build for relanding 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/browser/ui/panels/panel.cc ('k') | chrome/browser/ui/panels/panel_drag_browsertest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_COLLECTION_H_ 5 #ifndef CHROME_BROWSER_UI_PANELS_PANEL_COLLECTION_H_
6 #define CHROME_BROWSER_UI_PANELS_PANEL_COLLECTION_H_ 6 #define CHROME_BROWSER_UI_PANELS_PANEL_COLLECTION_H_
7 7
8 #include "chrome/browser/ui/panels/panel_constants.h" 8 #include "chrome/browser/ui/panels/panel_constants.h"
9 #include "ui/gfx/point.h" 9 #include "ui/gfx/point.h"
10 #include "ui/gfx/rect.h" 10 #include "ui/gfx/rect.h"
(...skipping 11 matching lines...) Expand all
22 STACKED, // panels are stacked together 22 STACKED, // panels are stacked together
23 }; 23 };
24 24
25 // Masks that control how the panel is added and positioned. 25 // Masks that control how the panel is added and positioned.
26 enum PositioningMask { 26 enum PositioningMask {
27 // The panel is added and placed at default position that is decided by the 27 // The panel is added and placed at default position that is decided by the
28 // collection. 28 // collection.
29 DEFAULT_POSITION = 0x0, 29 DEFAULT_POSITION = 0x0,
30 // The panel is being added based on its current known position. 30 // The panel is being added based on its current known position.
31 KNOWN_POSITION = 0x1, 31 KNOWN_POSITION = 0x1,
32 // The panel is added and placed at top position (currently only used by
33 // stacked collection)
34 TOP_POSITION = 0x2,
32 // Do not update panel bounds. Only valid with DEFAULT_POSIITON. 35 // Do not update panel bounds. Only valid with DEFAULT_POSIITON.
33 DO_NOT_UPDATE_BOUNDS = 0x2, 36 DO_NOT_UPDATE_BOUNDS = 0x4,
34 // Wait for a brief delay before refreshing layout of the collection after 37 // Wait for a brief delay before refreshing layout of the collection after
35 // adding panel to the collection. If not set, the collection will refresh 38 // adding panel to the collection. If not set, the collection will refresh
36 // its layout immediately. 39 // its layout immediately.
37 DELAY_LAYOUT_REFRESH = 0x4, 40 DELAY_LAYOUT_REFRESH = 0x8,
41 // Do not refresh layout. Used by stacking.
42 NO_LAYOUT_REFRESH = 0x10
38 }; 43 };
39 44
40 Type type() const { return type_; } 45 Type type() const { return type_; }
41 46
42 // Called when the display area is changed. 47 // Called when the display area is changed.
43 virtual void OnDisplayAreaChanged(const gfx::Rect& old_display_area) = 0; 48 virtual void OnDisplayAreaChanged(const gfx::Rect& old_display_area) = 0;
44 49
45 // Updates the positioning of all panels in the collection, usually as 50 // Updates the positioning of all panels in the collection, usually as
46 // a result of removing or resizing a panel in collection. 51 // a result of removing or resizing a panel in collection.
47 virtual void RefreshLayout() = 0; 52 virtual void RefreshLayout() = 0;
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 virtual void UpdatePanelOnCollectionChange(Panel* panel) = 0; 125 virtual void UpdatePanelOnCollectionChange(Panel* panel) = 0;
121 126
122 protected: 127 protected:
123 explicit PanelCollection(Type type); 128 explicit PanelCollection(Type type);
124 virtual ~PanelCollection(); 129 virtual ~PanelCollection();
125 130
126 const Type type_; // Type of this panel collection. 131 const Type type_; // Type of this panel collection.
127 }; 132 };
128 133
129 #endif // CHROME_BROWSER_UI_PANELS_PANEL_COLLECTION_H_ 134 #endif // CHROME_BROWSER_UI_PANELS_PANEL_COLLECTION_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/panels/panel.cc ('k') | chrome/browser/ui/panels/panel_drag_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698