OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/aura_shell/modal_container_layout_manager.h" | 5 #include "ui/aura_shell/modal_container_layout_manager.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "ui/aura/client/aura_constants.h" | 8 #include "ui/aura/client/aura_constants.h" |
9 #include "ui/aura/desktop.h" | 9 #include "ui/aura/desktop.h" |
10 #include "ui/aura/event.h" | 10 #include "ui/aura/event.h" |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
84 | 84 |
85 void ModalContainerLayoutManager::SetChildBounds( | 85 void ModalContainerLayoutManager::SetChildBounds( |
86 aura::Window* child, | 86 aura::Window* child, |
87 const gfx::Rect& requested_bounds) { | 87 const gfx::Rect& requested_bounds) { |
88 SetChildBoundsDirect(child, requested_bounds); | 88 SetChildBoundsDirect(child, requested_bounds); |
89 } | 89 } |
90 | 90 |
91 //////////////////////////////////////////////////////////////////////////////// | 91 //////////////////////////////////////////////////////////////////////////////// |
92 // ModalContainerLayoutManager, aura::WindowObserver implementation: | 92 // ModalContainerLayoutManager, aura::WindowObserver implementation: |
93 | 93 |
94 void ModalContainerLayoutManager::OnPropertyChanged(aura::Window* window, | 94 void ModalContainerLayoutManager::OnWindowPropertyChanged(aura::Window* window, |
95 const char* key, | 95 const char* key, |
96 void* old) { | 96 void* old) { |
97 if (key != aura::kModalKey) | 97 if (key != aura::kModalKey) |
98 return; | 98 return; |
99 | 99 |
100 if (window->GetIntProperty(aura::kModalKey)) { | 100 if (window->GetIntProperty(aura::kModalKey)) { |
101 AddModalWindow(window); | 101 AddModalWindow(window); |
102 } else if (static_cast<int>(reinterpret_cast<intptr_t>(old))) { | 102 } else if (static_cast<int>(reinterpret_cast<intptr_t>(old))) { |
103 RemoveModalWindow(window); | 103 RemoveModalWindow(window); |
104 } | 104 } |
105 } | 105 } |
106 | 106 |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
183 | 183 |
184 void ModalContainerLayoutManager::HideModalScreen() { | 184 void ModalContainerLayoutManager::HideModalScreen() { |
185 Shell::GetInstance()->RemoveDesktopEventFilter(modality_filter_.get()); | 185 Shell::GetInstance()->RemoveDesktopEventFilter(modality_filter_.get()); |
186 ui::LayerAnimator::ScopedSettings settings( | 186 ui::LayerAnimator::ScopedSettings settings( |
187 modal_screen_->GetNativeView()->layer()->GetAnimator()); | 187 modal_screen_->GetNativeView()->layer()->GetAnimator()); |
188 modal_screen_->GetNativeView()->layer()->SetOpacity(0.0f); | 188 modal_screen_->GetNativeView()->layer()->SetOpacity(0.0f); |
189 } | 189 } |
190 | 190 |
191 } // namespace internal | 191 } // namespace internal |
192 } // namespace aura_shell | 192 } // namespace aura_shell |
OLD | NEW |