| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 "ash/aura/wm_window_aura.h" | 5 #include "ash/aura/wm_window_aura.h" |
| 6 | 6 |
| 7 #include "ash/aura/aura_layout_manager_adapter.h" | 7 #include "ash/aura/aura_layout_manager_adapter.h" |
| 8 #include "ash/aura/wm_root_window_controller_aura.h" | 8 #include "ash/aura/wm_root_window_controller_aura.h" |
| 9 #include "ash/aura/wm_shell_aura.h" | 9 #include "ash/aura/wm_shell_aura.h" |
| 10 #include "ash/common/ash_constants.h" | 10 #include "ash/common/ash_constants.h" |
| (...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 241 } | 241 } |
| 242 | 242 |
| 243 void WmWindowAura::SetOpacity(float opacity) { | 243 void WmWindowAura::SetOpacity(float opacity) { |
| 244 window_->layer()->SetOpacity(opacity); | 244 window_->layer()->SetOpacity(opacity); |
| 245 } | 245 } |
| 246 | 246 |
| 247 float WmWindowAura::GetTargetOpacity() const { | 247 float WmWindowAura::GetTargetOpacity() const { |
| 248 return window_->layer()->GetTargetOpacity(); | 248 return window_->layer()->GetTargetOpacity(); |
| 249 } | 249 } |
| 250 | 250 |
| 251 gfx::Rect WmWindowAura::GetMinimizeAnimationTargetBoundsInScreen() const { | |
| 252 return ash::GetMinimizeAnimationTargetBoundsInScreen(window_); | |
| 253 } | |
| 254 | |
| 255 void WmWindowAura::SetTransform(const gfx::Transform& transform) { | 251 void WmWindowAura::SetTransform(const gfx::Transform& transform) { |
| 256 window_->SetTransform(transform); | 252 window_->SetTransform(transform); |
| 257 } | 253 } |
| 258 | 254 |
| 259 gfx::Transform WmWindowAura::GetTargetTransform() const { | 255 gfx::Transform WmWindowAura::GetTargetTransform() const { |
| 260 return window_->layer()->GetTargetTransform(); | 256 return window_->layer()->GetTargetTransform(); |
| 261 } | 257 } |
| 262 | 258 |
| 263 bool WmWindowAura::IsSystemModal() const { | 259 bool WmWindowAura::IsSystemModal() const { |
| 264 return window_->GetProperty(aura::client::kModalKey) == ui::MODAL_TYPE_SYSTEM; | 260 return window_->GetProperty(aura::client::kModalKey) == ui::MODAL_TYPE_SYSTEM; |
| (...skipping 11 matching lines...) Expand all Loading... |
| 276 return window_->GetProperty(aura::client::kExcludeFromMruKey); | 272 return window_->GetProperty(aura::client::kExcludeFromMruKey); |
| 277 | 273 |
| 278 default: | 274 default: |
| 279 NOTREACHED(); | 275 NOTREACHED(); |
| 280 break; | 276 break; |
| 281 } | 277 } |
| 282 | 278 |
| 283 return false; | 279 return false; |
| 284 } | 280 } |
| 285 | 281 |
| 286 SkColor WmWindowAura::GetColorProperty(WmWindowProperty key) { | |
| 287 if (key == WmWindowProperty::TOP_VIEW_COLOR) | |
| 288 return window_->GetProperty(aura::client::kTopViewColor); | |
| 289 | |
| 290 NOTREACHED(); | |
| 291 return 0; | |
| 292 } | |
| 293 | |
| 294 void WmWindowAura::SetColorProperty(WmWindowProperty key, SkColor value) { | |
| 295 if (key == WmWindowProperty::TOP_VIEW_COLOR) { | |
| 296 window_->SetProperty(aura::client::kTopViewColor, value); | |
| 297 return; | |
| 298 } | |
| 299 | |
| 300 NOTREACHED(); | |
| 301 } | |
| 302 | |
| 303 int WmWindowAura::GetIntProperty(WmWindowProperty key) { | 282 int WmWindowAura::GetIntProperty(WmWindowProperty key) { |
| 304 if (key == WmWindowProperty::SHELF_ID) | 283 if (key == WmWindowProperty::SHELF_ID) |
| 305 return GetShelfIDForWindow(window_); | 284 return GetShelfIDForWindow(window_); |
| 306 | 285 |
| 307 if (key == WmWindowProperty::TOP_VIEW_INSET) | 286 if (key == WmWindowProperty::TOP_VIEW_INSET) |
| 308 return window_->GetProperty(aura::client::kTopViewInset); | 287 return window_->GetProperty(aura::client::kTopViewInset); |
| 309 | 288 |
| 310 NOTREACHED(); | 289 NOTREACHED(); |
| 311 return 0; | 290 return 0; |
| 312 } | 291 } |
| (...skipping 532 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 845 OnTransientChildAdded(this, Get(transient))); | 824 OnTransientChildAdded(this, Get(transient))); |
| 846 } | 825 } |
| 847 | 826 |
| 848 void WmWindowAura::OnTransientChildRemoved(aura::Window* window, | 827 void WmWindowAura::OnTransientChildRemoved(aura::Window* window, |
| 849 aura::Window* transient) { | 828 aura::Window* transient) { |
| 850 FOR_EACH_OBSERVER(WmTransientWindowObserver, transient_observers_, | 829 FOR_EACH_OBSERVER(WmTransientWindowObserver, transient_observers_, |
| 851 OnTransientChildRemoved(this, Get(transient))); | 830 OnTransientChildRemoved(this, Get(transient))); |
| 852 } | 831 } |
| 853 | 832 |
| 854 } // namespace ash | 833 } // namespace ash |
| OLD | NEW |