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

Side by Side Diff: ui/views/window/non_client_view.cc

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/window/non_client_view.h ('k') | no next file » | 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 #include "ui/views/window/non_client_view.h" 5 #include "ui/views/window/non_client_view.h"
6 6
7 #include "ui/accessibility/ax_view_state.h" 7 #include "ui/accessibility/ax_view_state.h"
8 #include "ui/base/hit_test.h" 8 #include "ui/base/hit_test.h"
9 #include "ui/gfx/rect_conversions.h" 9 #include "ui/gfx/rect_conversions.h"
10 #include "ui/views/rect_based_targeting_utils.h" 10 #include "ui/views/rect_based_targeting_utils.h"
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 frame_view_->Layout(); 127 frame_view_->Layout();
128 } 128 }
129 129
130 void NonClientView::SetAccessibleName(const base::string16& name) { 130 void NonClientView::SetAccessibleName(const base::string16& name) {
131 accessible_name_ = name; 131 accessible_name_ = name;
132 } 132 }
133 133
134 //////////////////////////////////////////////////////////////////////////////// 134 ////////////////////////////////////////////////////////////////////////////////
135 // NonClientView, View overrides: 135 // NonClientView, View overrides:
136 136
137 gfx::Size NonClientView::GetPreferredSize() { 137 gfx::Size NonClientView::GetPreferredSize() const {
138 // TODO(pkasting): This should probably be made to look similar to 138 // TODO(pkasting): This should probably be made to look similar to
139 // GetMinimumSize() below. This will require implementing GetPreferredSize() 139 // GetMinimumSize() below. This will require implementing GetPreferredSize()
140 // better in the various frame views. 140 // better in the various frame views.
141 gfx::Rect client_bounds(gfx::Point(), client_view_->GetPreferredSize()); 141 gfx::Rect client_bounds(gfx::Point(), client_view_->GetPreferredSize());
142 return GetWindowBoundsForClientBounds(client_bounds).size(); 142 return GetWindowBoundsForClientBounds(client_bounds).size();
143 } 143 }
144 144
145 gfx::Size NonClientView::GetMinimumSize() { 145 gfx::Size NonClientView::GetMinimumSize() const {
146 return frame_view_->GetMinimumSize(); 146 return frame_view_->GetMinimumSize();
147 } 147 }
148 148
149 gfx::Size NonClientView::GetMaximumSize() { 149 gfx::Size NonClientView::GetMaximumSize() {
150 return frame_view_->GetMaximumSize(); 150 return frame_view_->GetMaximumSize();
151 } 151 }
152 152
153 void NonClientView::Layout() { 153 void NonClientView::Layout() {
154 LayoutFrameView(); 154 LayoutFrameView();
155 155
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
322 322
323 void NonClientFrameView::OnBoundsChanged(const gfx::Rect& previous_bounds) { 323 void NonClientFrameView::OnBoundsChanged(const gfx::Rect& previous_bounds) {
324 // Overridden to do nothing. The NonClientView manually calls Layout on the 324 // Overridden to do nothing. The NonClientView manually calls Layout on the
325 // FrameView when it is itself laid out, see comment in NonClientView::Layout. 325 // FrameView when it is itself laid out, see comment in NonClientView::Layout.
326 } 326 }
327 327
328 NonClientFrameView::NonClientFrameView() : inactive_rendering_disabled_(false) { 328 NonClientFrameView::NonClientFrameView() : inactive_rendering_disabled_(false) {
329 } 329 }
330 330
331 } // namespace views 331 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/window/non_client_view.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698