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

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

Issue 10021029: Propagate OnNativeWidgetMove to delegate/observers, etc. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Use |move_loop_widget_| and GetAttachedBrowserView, etc. Created 8 years, 8 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') | 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/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 941 matching lines...) Expand 10 before | Expand all | Expand 10 after
952 } 952 }
953 953
954 gfx::Size Widget::GetMinimumSize() { 954 gfx::Size Widget::GetMinimumSize() {
955 return non_client_view_ ? non_client_view_->GetMinimumSize() : gfx::Size(); 955 return non_client_view_ ? non_client_view_->GetMinimumSize() : gfx::Size();
956 } 956 }
957 957
958 gfx::Size Widget::GetMaximumSize() { 958 gfx::Size Widget::GetMaximumSize() {
959 return non_client_view_ ? non_client_view_->GetMaximumSize() : gfx::Size(); 959 return non_client_view_ ? non_client_view_->GetMaximumSize() : gfx::Size();
960 } 960 }
961 961
962 void Widget::OnNativeWidgetMove() {
963 widget_delegate_->OnWidgetMove();
964 FOR_EACH_OBSERVER(Observer, observers_, OnWidgetMove(this));
965 }
966
962 void Widget::OnNativeWidgetSizeChanged(const gfx::Size& new_size) { 967 void Widget::OnNativeWidgetSizeChanged(const gfx::Size& new_size) {
963 root_view_->SetSize(new_size); 968 root_view_->SetSize(new_size);
964 969
965 // Size changed notifications can fire prior to full initialization 970 // Size changed notifications can fire prior to full initialization
966 // i.e. during session restore. Avoid saving session state during these 971 // i.e. during session restore. Avoid saving session state during these
967 // startup procedures. 972 // startup procedures.
968 if (native_widget_initialized_) 973 if (native_widget_initialized_)
969 SaveWindowPlacement(); 974 SaveWindowPlacement();
970 } 975 }
971 976
(...skipping 283 matching lines...) Expand 10 before | Expand all | Expand 10 after
1255 1260
1256 //////////////////////////////////////////////////////////////////////////////// 1261 ////////////////////////////////////////////////////////////////////////////////
1257 // internal::NativeWidgetPrivate, NativeWidget implementation: 1262 // internal::NativeWidgetPrivate, NativeWidget implementation:
1258 1263
1259 internal::NativeWidgetPrivate* NativeWidgetPrivate::AsNativeWidgetPrivate() { 1264 internal::NativeWidgetPrivate* NativeWidgetPrivate::AsNativeWidgetPrivate() {
1260 return this; 1265 return this;
1261 } 1266 }
1262 1267
1263 } // namespace internal 1268 } // namespace internal
1264 } // namespace views 1269 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/widget/widget.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698