Chromium Code Reviews| OLD | NEW |
|---|---|
| 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/strings/string_util.h" | 8 #include "base/strings/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/aura_constants.h" | 10 #include "ui/aura/client/aura_constants.h" |
| (...skipping 678 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 689 } | 689 } |
| 690 | 690 |
| 691 //////////////////////////////////////////////////////////////////////////////// | 691 //////////////////////////////////////////////////////////////////////////////// |
| 692 // NativeWidgetAura, aura::WindowDelegate implementation: | 692 // NativeWidgetAura, aura::WindowDelegate implementation: |
| 693 | 693 |
| 694 gfx::Size NativeWidgetAura::GetMinimumSize() const { | 694 gfx::Size NativeWidgetAura::GetMinimumSize() const { |
| 695 return delegate_->GetMinimumSize(); | 695 return delegate_->GetMinimumSize(); |
| 696 } | 696 } |
| 697 | 697 |
| 698 gfx::Size NativeWidgetAura::GetMaximumSize() const { | 698 gfx::Size NativeWidgetAura::GetMaximumSize() const { |
| 699 // If a window havea maximum size, the window should not be | |
|
Ben Goodger (Google)
2014/04/25 19:29:32
have a
tfarina
2014/04/25 19:30:16
s/havea/have a
Although my English is not all the
oshima
2014/04/25 22:20:56
Done.
| |
| 700 // maximizable. | |
| 701 DCHECK(delegate_->GetMaximumSize().IsEmpty() || | |
| 702 !window_->GetProperty(aura::client::kCanMaximizeKey)); | |
| 699 return delegate_->GetMaximumSize(); | 703 return delegate_->GetMaximumSize(); |
| 700 } | 704 } |
| 701 | 705 |
| 702 void NativeWidgetAura::OnBoundsChanged(const gfx::Rect& old_bounds, | 706 void NativeWidgetAura::OnBoundsChanged(const gfx::Rect& old_bounds, |
| 703 const gfx::Rect& new_bounds) { | 707 const gfx::Rect& new_bounds) { |
| 704 // Assume that if the old bounds was completely empty a move happened. This | 708 // Assume that if the old bounds was completely empty a move happened. This |
| 705 // handles the case of a maximize animation acquiring the layer (acquiring a | 709 // handles the case of a maximize animation acquiring the layer (acquiring a |
| 706 // layer results in clearing the bounds). | 710 // layer results in clearing the bounds). |
| 707 if (old_bounds.origin() != new_bounds.origin() || | 711 if (old_bounds.origin() != new_bounds.origin() || |
| 708 (old_bounds == gfx::Rect(0, 0, 0, 0) && !new_bounds.IsEmpty())) { | 712 (old_bounds == gfx::Rect(0, 0, 0, 0) && !new_bounds.IsEmpty())) { |
| (...skipping 425 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1134 l10n_util::AdjustUIFont(&(ncm.lfCaptionFont)); | 1138 l10n_util::AdjustUIFont(&(ncm.lfCaptionFont)); |
| 1135 base::win::ScopedHFONT caption_font(CreateFontIndirect(&(ncm.lfCaptionFont))); | 1139 base::win::ScopedHFONT caption_font(CreateFontIndirect(&(ncm.lfCaptionFont))); |
| 1136 return gfx::FontList(gfx::Font(caption_font)); | 1140 return gfx::FontList(gfx::Font(caption_font)); |
| 1137 #else | 1141 #else |
| 1138 return gfx::FontList(); | 1142 return gfx::FontList(); |
| 1139 #endif | 1143 #endif |
| 1140 } | 1144 } |
| 1141 | 1145 |
| 1142 } // namespace internal | 1146 } // namespace internal |
| 1143 } // namespace views | 1147 } // namespace views |
| OLD | NEW |