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

Side by Side Diff: ui/views/widget/widget.cc

Issue 9452008: Allow platform apps to specify a maximum size for the shell container. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: missing file Created 8 years, 9 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/widget/widget.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) 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/widget/widget.h" 5 #include "ui/views/widget/widget.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/message_loop.h" 8 #include "base/message_loop.h"
9 #include "base/utf_string_conversions.h" 9 #include "base/utf_string_conversions.h"
10 #include "ui/base/hit_test.h" 10 #include "ui/base/hit_test.h"
(...skipping 950 matching lines...) Expand 10 before | Expand all | Expand 10 after
961 void Widget::OnNativeWidgetDestroyed() { 961 void Widget::OnNativeWidgetDestroyed() {
962 widget_delegate_->DeleteDelegate(); 962 widget_delegate_->DeleteDelegate();
963 widget_delegate_ = NULL; 963 widget_delegate_ = NULL;
964 native_widget_destroyed_ = true; 964 native_widget_destroyed_ = true;
965 } 965 }
966 966
967 gfx::Size Widget::GetMinimumSize() { 967 gfx::Size Widget::GetMinimumSize() {
968 return non_client_view_ ? non_client_view_->GetMinimumSize() : gfx::Size(); 968 return non_client_view_ ? non_client_view_->GetMinimumSize() : gfx::Size();
969 } 969 }
970 970
971 gfx::Size Widget::GetMaximumSize() {
972 return non_client_view_ ? non_client_view_->GetMaximumSize() : gfx::Size();
973 }
974
971 void Widget::OnNativeWidgetSizeChanged(const gfx::Size& new_size) { 975 void Widget::OnNativeWidgetSizeChanged(const gfx::Size& new_size) {
972 root_view_->SetSize(new_size); 976 root_view_->SetSize(new_size);
973 977
974 // Size changed notifications can fire prior to full initialization 978 // Size changed notifications can fire prior to full initialization
975 // i.e. during session restore. Avoid saving session state during these 979 // i.e. during session restore. Avoid saving session state during these
976 // startup procedures. 980 // startup procedures.
977 if (native_widget_initialized_) 981 if (native_widget_initialized_)
978 SaveWindowPlacement(); 982 SaveWindowPlacement();
979 } 983 }
980 984
(...skipping 298 matching lines...) Expand 10 before | Expand all | Expand 10 after
1279 1283
1280 //////////////////////////////////////////////////////////////////////////////// 1284 ////////////////////////////////////////////////////////////////////////////////
1281 // internal::NativeWidgetPrivate, NativeWidget implementation: 1285 // internal::NativeWidgetPrivate, NativeWidget implementation:
1282 1286
1283 internal::NativeWidgetPrivate* NativeWidgetPrivate::AsNativeWidgetPrivate() { 1287 internal::NativeWidgetPrivate* NativeWidgetPrivate::AsNativeWidgetPrivate() {
1284 return this; 1288 return this;
1285 } 1289 }
1286 1290
1287 } // namespace internal 1291 } // namespace internal
1288 } // namespace views 1292 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/widget/widget.h ('k') | ui/views/window/non_client_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698