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

Side by Side Diff: ui/views/controls/single_split_view.h

Issue 273223002: views: Make view::Views::GetPreferredSize() const. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: More compile fix for ToT Created 6 years, 7 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 | « ui/views/controls/separator.cc ('k') | ui/views/controls/single_split_view.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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 UI_VIEWS_CONTROLS_SINGLE_SPLIT_VIEW_H_ 5 #ifndef UI_VIEWS_CONTROLS_SINGLE_SPLIT_VIEW_H_
6 #define UI_VIEWS_CONTROLS_SINGLE_SPLIT_VIEW_H_ 6 #define UI_VIEWS_CONTROLS_SINGLE_SPLIT_VIEW_H_
7 7
8 #include "base/gtest_prod_util.h" 8 #include "base/gtest_prod_util.h"
9 #include "ui/views/view.h" 9 #include "ui/views/view.h"
10 10
(...skipping 20 matching lines...) Expand all
31 Orientation orientation, 31 Orientation orientation,
32 SingleSplitViewListener* listener); 32 SingleSplitViewListener* listener);
33 33
34 virtual void Layout() OVERRIDE; 34 virtual void Layout() OVERRIDE;
35 virtual const char* GetClassName() const OVERRIDE; 35 virtual const char* GetClassName() const OVERRIDE;
36 36
37 virtual void GetAccessibleState(ui::AXViewState* state) OVERRIDE; 37 virtual void GetAccessibleState(ui::AXViewState* state) OVERRIDE;
38 38
39 // SingleSplitView's preferred size is the sum of the preferred widths 39 // SingleSplitView's preferred size is the sum of the preferred widths
40 // and the max of the heights. 40 // and the max of the heights.
41 virtual gfx::Size GetPreferredSize() OVERRIDE; 41 virtual gfx::Size GetPreferredSize() const OVERRIDE;
42 42
43 // Overriden to return a resize cursor when over the divider. 43 // Overriden to return a resize cursor when over the divider.
44 virtual gfx::NativeCursor GetCursor(const ui::MouseEvent& event) OVERRIDE; 44 virtual gfx::NativeCursor GetCursor(const ui::MouseEvent& event) OVERRIDE;
45 45
46 Orientation orientation() const { 46 Orientation orientation() const {
47 return is_horizontal_ ? HORIZONTAL_SPLIT : VERTICAL_SPLIT; 47 return is_horizontal_ ? HORIZONTAL_SPLIT : VERTICAL_SPLIT;
48 } 48 }
49 49
50 void set_orientation(Orientation orientation) { 50 void set_orientation(Orientation orientation) {
51 is_horizontal_ = orientation == HORIZONTAL_SPLIT; 51 is_horizontal_ = orientation == HORIZONTAL_SPLIT;
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
138 138
139 // The accessible name of this view. 139 // The accessible name of this view.
140 base::string16 accessible_name_; 140 base::string16 accessible_name_;
141 141
142 DISALLOW_COPY_AND_ASSIGN(SingleSplitView); 142 DISALLOW_COPY_AND_ASSIGN(SingleSplitView);
143 }; 143 };
144 144
145 } // namespace views 145 } // namespace views
146 146
147 #endif // UI_VIEWS_CONTROLS_SINGLE_SPLIT_VIEW_H_ 147 #endif // UI_VIEWS_CONTROLS_SINGLE_SPLIT_VIEW_H_
OLDNEW
« no previous file with comments | « ui/views/controls/separator.cc ('k') | ui/views/controls/single_split_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698