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

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

Issue 11366215: Prevents windows in chromeos from resizing bigger than their maximum size. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix DesktopNativeWidgetAura Created 8 years 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/native_widget_aura.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/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_change_observer.h" 10 #include "ui/aura/client/activation_change_observer.h"
(...skipping 630 matching lines...) Expand 10 before | Expand all | Expand 10 after
641 focus_manager->OnKeyEvent(key); 641 focus_manager->OnKeyEvent(key);
642 } 642 }
643 643
644 //////////////////////////////////////////////////////////////////////////////// 644 ////////////////////////////////////////////////////////////////////////////////
645 // NativeWidgetAura, aura::WindowDelegate implementation: 645 // NativeWidgetAura, aura::WindowDelegate implementation:
646 646
647 gfx::Size NativeWidgetAura::GetMinimumSize() const { 647 gfx::Size NativeWidgetAura::GetMinimumSize() const {
648 return delegate_->GetMinimumSize(); 648 return delegate_->GetMinimumSize();
649 } 649 }
650 650
651 gfx::Size NativeWidgetAura::GetMaximumSize() const {
652 return delegate_->GetMaximumSize();
653 }
654
651 void NativeWidgetAura::OnBoundsChanged(const gfx::Rect& old_bounds, 655 void NativeWidgetAura::OnBoundsChanged(const gfx::Rect& old_bounds,
652 const gfx::Rect& new_bounds) { 656 const gfx::Rect& new_bounds) {
653 if (old_bounds.origin() != new_bounds.origin()) 657 if (old_bounds.origin() != new_bounds.origin())
654 delegate_->OnNativeWidgetMove(); 658 delegate_->OnNativeWidgetMove();
655 if (old_bounds.size() != new_bounds.size()) 659 if (old_bounds.size() != new_bounds.size())
656 delegate_->OnNativeWidgetSizeChanged(new_bounds.size()); 660 delegate_->OnNativeWidgetSizeChanged(new_bounds.size());
657 } 661 }
658 662
659 void NativeWidgetAura::OnFocus(aura::Window* old_focused_window) { 663 void NativeWidgetAura::OnFocus(aura::Window* old_focused_window) {
660 // In aura, it is possible for child native widgets to take input and focus, 664 // In aura, it is possible for child native widgets to take input and focus,
(...skipping 375 matching lines...) Expand 10 before | Expand all | Expand 10 after
1036 return aura::Env::GetInstance()->is_mouse_button_down(); 1040 return aura::Env::GetInstance()->is_mouse_button_down();
1037 } 1041 }
1038 1042
1039 // static 1043 // static
1040 bool NativeWidgetPrivate::IsTouchDown() { 1044 bool NativeWidgetPrivate::IsTouchDown() {
1041 return aura::Env::GetInstance()->is_touch_down(); 1045 return aura::Env::GetInstance()->is_touch_down();
1042 } 1046 }
1043 1047
1044 } // namespace internal 1048 } // namespace internal
1045 } // namespace views 1049 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/widget/native_widget_aura.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698