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

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

Issue 10162017: Re-reland Propagate OnNativeWidgetMove to delegate/observers, etc. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Sync and merge. 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/bubble/bubble_frame_view.cc ('k') | ui/views/widget/native_widget_delegate.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/native_widget_aura.h" 5 #include "ui/views/widget/native_widget_aura.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/string_util.h" 8 #include "base/string_util.h"
9 #include "third_party/skia/include/core/SkRegion.h" 9 #include "third_party/skia/include/core/SkRegion.h"
10 #include "ui/aura/client/activation_client.h" 10 #include "ui/aura/client/activation_client.h"
(...skipping 701 matching lines...) Expand 10 before | Expand all | Expand 10 after
712 //////////////////////////////////////////////////////////////////////////////// 712 ////////////////////////////////////////////////////////////////////////////////
713 // NativeWidgetAura, aura::WindowDelegate implementation: 713 // NativeWidgetAura, aura::WindowDelegate implementation:
714 714
715 gfx::Size NativeWidgetAura::GetMinimumSize() const { 715 gfx::Size NativeWidgetAura::GetMinimumSize() const {
716 return delegate_->GetMinimumSize(); 716 return delegate_->GetMinimumSize();
717 } 717 }
718 718
719 void NativeWidgetAura::OnBoundsChanged(const gfx::Rect& old_bounds, 719 void NativeWidgetAura::OnBoundsChanged(const gfx::Rect& old_bounds,
720 const gfx::Rect& new_bounds) { 720 const gfx::Rect& new_bounds) {
721 if (old_bounds.origin() != new_bounds.origin()) 721 if (old_bounds.origin() != new_bounds.origin())
722 GetWidget()->widget_delegate()->OnWidgetMove(); 722 delegate_->OnNativeWidgetMove();
723 if (old_bounds.size() != new_bounds.size()) { 723 if (old_bounds.size() != new_bounds.size()) {
724 #if defined(ENABLE_DIP) 724 #if defined(ENABLE_DIP)
725 delegate_->OnNativeWidgetSizeChanged( 725 delegate_->OnNativeWidgetSizeChanged(
726 ConvertSizeFromMonitor(new_bounds.size())); 726 ConvertSizeFromMonitor(new_bounds.size()));
727 #else 727 #else
728 delegate_->OnNativeWidgetSizeChanged(new_bounds.size()); 728 delegate_->OnNativeWidgetSizeChanged(new_bounds.size());
729 #endif 729 #endif
730 } 730 }
731 } 731 }
732 732
(...skipping 316 matching lines...) Expand 10 before | Expand all | Expand 10 after
1049 } 1049 }
1050 } 1050 }
1051 1051
1052 // static 1052 // static
1053 bool NativeWidgetPrivate::IsMouseButtonDown() { 1053 bool NativeWidgetPrivate::IsMouseButtonDown() {
1054 return aura::Env::GetInstance()->is_mouse_button_down(); 1054 return aura::Env::GetInstance()->is_mouse_button_down();
1055 } 1055 }
1056 1056
1057 } // namespace internal 1057 } // namespace internal
1058 } // namespace views 1058 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/bubble/bubble_frame_view.cc ('k') | ui/views/widget/native_widget_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698