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

Side by Side Diff: ui/views/window/native_frame_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/native_frame_view.h ('k') | ui/views/window/non_client_view.h » ('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 #include "ui/views/window/native_frame_view.h" 5 #include "ui/views/window/native_frame_view.h"
6 6
7 #include "ui/views/widget/native_widget.h" 7 #include "ui/views/widget/native_widget.h"
8 #include "ui/views/widget/widget.h" 8 #include "ui/views/widget/widget.h"
9 9
10 #if defined(OS_WIN) 10 #if defined(OS_WIN)
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 } 63 }
64 64
65 void NativeFrameView::UpdateWindowIcon() { 65 void NativeFrameView::UpdateWindowIcon() {
66 // Nothing to do. 66 // Nothing to do.
67 } 67 }
68 68
69 void NativeFrameView::UpdateWindowTitle() { 69 void NativeFrameView::UpdateWindowTitle() {
70 // Nothing to do. 70 // Nothing to do.
71 } 71 }
72 72
73 gfx::Size NativeFrameView::GetPreferredSize() { 73 gfx::Size NativeFrameView::GetPreferredSize() const {
74 gfx::Size client_preferred_size = frame_->client_view()->GetPreferredSize(); 74 gfx::Size client_preferred_size = frame_->client_view()->GetPreferredSize();
75 #if defined(OS_WIN) 75 #if defined(OS_WIN)
76 // Returns the client size. On Windows, this is the expected behavior for 76 // Returns the client size. On Windows, this is the expected behavior for
77 // native frames (see |NativeWidgetWin::WidgetSizeIsClientSize()|), while 77 // native frames (see |NativeWidgetWin::WidgetSizeIsClientSize()|), while
78 // other platforms currently always return client bounds from 78 // other platforms currently always return client bounds from
79 // |GetWindowBoundsForClientBounds()|. 79 // |GetWindowBoundsForClientBounds()|.
80 return client_preferred_size; 80 return client_preferred_size;
81 #else 81 #else
82 return frame_->non_client_view()->GetWindowBoundsForClientBounds( 82 return frame_->non_client_view()->GetWindowBoundsForClientBounds(
83 gfx::Rect(client_preferred_size)).size(); 83 gfx::Rect(client_preferred_size)).size();
84 #endif 84 #endif
85 } 85 }
86 86
87 gfx::Size NativeFrameView::GetMinimumSize() { 87 gfx::Size NativeFrameView::GetMinimumSize() const {
88 return frame_->client_view()->GetMinimumSize(); 88 return frame_->client_view()->GetMinimumSize();
89 } 89 }
90 90
91 gfx::Size NativeFrameView::GetMaximumSize() { 91 gfx::Size NativeFrameView::GetMaximumSize() {
92 return frame_->client_view()->GetMaximumSize(); 92 return frame_->client_view()->GetMaximumSize();
93 } 93 }
94 94
95 const char* NativeFrameView::GetClassName() const { 95 const char* NativeFrameView::GetClassName() const {
96 return kViewClassName; 96 return kViewClassName;
97 } 97 }
98 98
99 } // namespace views 99 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/window/native_frame_view.h ('k') | ui/views/window/non_client_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698