| 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 |
| 251 void WmWindowAura::SetTransform(const gfx::Transform& transform) { | 255 void WmWindowAura::SetTransform(const gfx::Transform& transform) { |
| 252 window_->SetTransform(transform); | 256 window_->SetTransform(transform); |
| 253 } | 257 } |
| 254 | 258 |
| 255 gfx::Transform WmWindowAura::GetTargetTransform() const { | 259 gfx::Transform WmWindowAura::GetTargetTransform() const { |
| 256 return window_->layer()->GetTargetTransform(); | 260 return window_->layer()->GetTargetTransform(); |
| 257 } | 261 } |
| 258 | 262 |
| 259 bool WmWindowAura::IsSystemModal() const { | 263 bool WmWindowAura::IsSystemModal() const { |
| 260 return window_->GetProperty(aura::client::kModalKey) == ui::MODAL_TYPE_SYSTEM; | 264 return window_->GetProperty(aura::client::kModalKey) == ui::MODAL_TYPE_SYSTEM; |
| (...skipping 18 matching lines...) Expand all Loading... |
| 279 return false; | 283 return false; |
| 280 } | 284 } |
| 281 | 285 |
| 282 int WmWindowAura::GetIntProperty(WmWindowProperty key) { | 286 int WmWindowAura::GetIntProperty(WmWindowProperty key) { |
| 283 if (key == WmWindowProperty::SHELF_ID) | 287 if (key == WmWindowProperty::SHELF_ID) |
| 284 return GetShelfIDForWindow(window_); | 288 return GetShelfIDForWindow(window_); |
| 285 | 289 |
| 286 if (key == WmWindowProperty::TOP_VIEW_INSET) | 290 if (key == WmWindowProperty::TOP_VIEW_INSET) |
| 287 return window_->GetProperty(aura::client::kTopViewInset); | 291 return window_->GetProperty(aura::client::kTopViewInset); |
| 288 | 292 |
| 293 if (key == WmWindowProperty::TOP_VIEW_COLOR) |
| 294 return window_->GetProperty(aura::client::kTopViewColor); |
| 295 |
| 289 NOTREACHED(); | 296 NOTREACHED(); |
| 290 return 0; | 297 return 0; |
| 291 } | 298 } |
| 292 | 299 |
| 293 void WmWindowAura::SetIntProperty(WmWindowProperty key, int value) { | 300 void WmWindowAura::SetIntProperty(WmWindowProperty key, int value) { |
| 294 if (key == WmWindowProperty::SHELF_ID) { | 301 if (key == WmWindowProperty::SHELF_ID) { |
| 295 SetShelfIDForWindow(value, window_); | 302 SetShelfIDForWindow(value, window_); |
| 296 return; | 303 return; |
| 297 } | 304 } |
| 298 if (key == WmWindowProperty::TOP_VIEW_INSET) { | 305 if (key == WmWindowProperty::TOP_VIEW_INSET) { |
| 299 window_->SetProperty(aura::client::kTopViewInset, value); | 306 window_->SetProperty(aura::client::kTopViewInset, value); |
| 300 return; | 307 return; |
| 301 } | 308 } |
| 309 if (key == WmWindowProperty::TOP_VIEW_COLOR) { |
| 310 window_->SetProperty(aura::client::kTopViewColor, value); |
| 311 return; |
| 312 } |
| 302 | 313 |
| 303 NOTREACHED(); | 314 NOTREACHED(); |
| 304 } | 315 } |
| 305 | 316 |
| 306 ShelfItemDetails* WmWindowAura::GetShelfItemDetails() { | 317 ShelfItemDetails* WmWindowAura::GetShelfItemDetails() { |
| 307 return window_->GetProperty(kShelfItemDetailsKey); | 318 return window_->GetProperty(kShelfItemDetailsKey); |
| 308 } | 319 } |
| 309 | 320 |
| 310 void WmWindowAura::SetShelfItemDetails(const ShelfItemDetails& details) { | 321 void WmWindowAura::SetShelfItemDetails(const ShelfItemDetails& details) { |
| 311 // |item_details| is owned by |window_|. | 322 // |item_details| is owned by |window_|. |
| (...skipping 512 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 824 OnTransientChildAdded(this, Get(transient))); | 835 OnTransientChildAdded(this, Get(transient))); |
| 825 } | 836 } |
| 826 | 837 |
| 827 void WmWindowAura::OnTransientChildRemoved(aura::Window* window, | 838 void WmWindowAura::OnTransientChildRemoved(aura::Window* window, |
| 828 aura::Window* transient) { | 839 aura::Window* transient) { |
| 829 FOR_EACH_OBSERVER(WmTransientWindowObserver, transient_observers_, | 840 FOR_EACH_OBSERVER(WmTransientWindowObserver, transient_observers_, |
| 830 OnTransientChildRemoved(this, Get(transient))); | 841 OnTransientChildRemoved(this, Get(transient))); |
| 831 } | 842 } |
| 832 | 843 |
| 833 } // namespace ash | 844 } // namespace ash |
| OLD | NEW |