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 720 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
731 // handles the case of a maximize animation acquiring the layer (acquiring a | 731 // handles the case of a maximize animation acquiring the layer (acquiring a |
732 // layer results in clearing the bounds). | 732 // layer results in clearing the bounds). |
733 if (old_bounds.origin() != new_bounds.origin() || | 733 if (old_bounds.origin() != new_bounds.origin() || |
734 (old_bounds == gfx::Rect(0, 0, 0, 0) && !new_bounds.IsEmpty())) { | 734 (old_bounds == gfx::Rect(0, 0, 0, 0) && !new_bounds.IsEmpty())) { |
735 delegate_->OnNativeWidgetMove(); | 735 delegate_->OnNativeWidgetMove(); |
736 } | 736 } |
737 if (old_bounds.size() != new_bounds.size()) | 737 if (old_bounds.size() != new_bounds.size()) |
738 delegate_->OnNativeWidgetSizeChanged(new_bounds.size()); | 738 delegate_->OnNativeWidgetSizeChanged(new_bounds.size()); |
739 } | 739 } |
740 | 740 |
741 void NativeWidgetAura::OnPropertyChanged(const void* key, intptr_t old) { | |
742 if (key == aura::client::kShowStateKey) { | |
743 delegate_->OnNativeWidgetWindowShowStateChanged( | |
sky
2014/08/06 17:23:00
Won't this result in double the notifications if t
jackhou1
2014/08/11 05:41:06
Yeah, SaveWindowPlacement gets called twice. I thi
| |
744 static_cast<ui::WindowShowState>(old)); | |
745 } | |
746 } | |
747 | |
741 gfx::NativeCursor NativeWidgetAura::GetCursor(const gfx::Point& point) { | 748 gfx::NativeCursor NativeWidgetAura::GetCursor(const gfx::Point& point) { |
742 return cursor_; | 749 return cursor_; |
743 } | 750 } |
744 | 751 |
745 int NativeWidgetAura::GetNonClientComponent(const gfx::Point& point) const { | 752 int NativeWidgetAura::GetNonClientComponent(const gfx::Point& point) const { |
746 return delegate_->GetNonClientComponent(point); | 753 return delegate_->GetNonClientComponent(point); |
747 } | 754 } |
748 | 755 |
749 bool NativeWidgetAura::ShouldDescendIntoChildForEventHandling( | 756 bool NativeWidgetAura::ShouldDescendIntoChildForEventHandling( |
750 aura::Window* child, | 757 aura::Window* child, |
(...skipping 401 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1152 l10n_util::AdjustUIFont(&(ncm.lfCaptionFont)); | 1159 l10n_util::AdjustUIFont(&(ncm.lfCaptionFont)); |
1153 base::win::ScopedHFONT caption_font(CreateFontIndirect(&(ncm.lfCaptionFont))); | 1160 base::win::ScopedHFONT caption_font(CreateFontIndirect(&(ncm.lfCaptionFont))); |
1154 return gfx::FontList(gfx::Font(caption_font)); | 1161 return gfx::FontList(gfx::Font(caption_font)); |
1155 #else | 1162 #else |
1156 return gfx::FontList(); | 1163 return gfx::FontList(); |
1157 #endif | 1164 #endif |
1158 } | 1165 } |
1159 | 1166 |
1160 } // namespace internal | 1167 } // namespace internal |
1161 } // namespace views | 1168 } // namespace views |
OLD | NEW |