| 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 235 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 246 } | 246 } |
| 247 | 247 |
| 248 void WmWindowAura::SetOpacity(float opacity) { | 248 void WmWindowAura::SetOpacity(float opacity) { |
| 249 window_->layer()->SetOpacity(opacity); | 249 window_->layer()->SetOpacity(opacity); |
| 250 } | 250 } |
| 251 | 251 |
| 252 float WmWindowAura::GetTargetOpacity() const { | 252 float WmWindowAura::GetTargetOpacity() const { |
| 253 return window_->layer()->GetTargetOpacity(); | 253 return window_->layer()->GetTargetOpacity(); |
| 254 } | 254 } |
| 255 | 255 |
| 256 gfx::Rect WmWindowAura::GetMinimizeAnimationTargetBoundsInScreen() const { |
| 257 return ash::GetMinimizeAnimationTargetBoundsInScreen(window_); |
| 258 } |
| 259 |
| 256 void WmWindowAura::SetTransform(const gfx::Transform& transform) { | 260 void WmWindowAura::SetTransform(const gfx::Transform& transform) { |
| 257 window_->SetTransform(transform); | 261 window_->SetTransform(transform); |
| 258 } | 262 } |
| 259 | 263 |
| 260 gfx::Transform WmWindowAura::GetTargetTransform() const { | 264 gfx::Transform WmWindowAura::GetTargetTransform() const { |
| 261 return window_->layer()->GetTargetTransform(); | 265 return window_->layer()->GetTargetTransform(); |
| 262 } | 266 } |
| 263 | 267 |
| 264 bool WmWindowAura::IsSystemModal() const { | 268 bool WmWindowAura::IsSystemModal() const { |
| 265 return window_->GetProperty(aura::client::kModalKey) == ui::MODAL_TYPE_SYSTEM; | 269 return window_->GetProperty(aura::client::kModalKey) == ui::MODAL_TYPE_SYSTEM; |
| (...skipping 11 matching lines...) Expand all Loading... |
| 277 return window_->GetProperty(aura::client::kExcludeFromMruKey); | 281 return window_->GetProperty(aura::client::kExcludeFromMruKey); |
| 278 | 282 |
| 279 default: | 283 default: |
| 280 NOTREACHED(); | 284 NOTREACHED(); |
| 281 break; | 285 break; |
| 282 } | 286 } |
| 283 | 287 |
| 284 return false; | 288 return false; |
| 285 } | 289 } |
| 286 | 290 |
| 291 SkColor WmWindowAura::GetColorProperty(WmWindowProperty key) { |
| 292 if (key == WmWindowProperty::TOP_VIEW_COLOR) |
| 293 return window_->GetProperty(aura::client::kTopViewColor); |
| 294 |
| 295 NOTREACHED(); |
| 296 return 0; |
| 297 } |
| 298 |
| 299 void WmWindowAura::SetColorProperty(WmWindowProperty key, SkColor value) { |
| 300 if (key == WmWindowProperty::TOP_VIEW_COLOR) { |
| 301 window_->SetProperty(aura::client::kTopViewColor, value); |
| 302 return; |
| 303 } |
| 304 |
| 305 NOTREACHED(); |
| 306 } |
| 307 |
| 287 int WmWindowAura::GetIntProperty(WmWindowProperty key) { | 308 int WmWindowAura::GetIntProperty(WmWindowProperty key) { |
| 288 if (key == WmWindowProperty::SHELF_ID) | 309 if (key == WmWindowProperty::SHELF_ID) |
| 289 return GetShelfIDForWindow(window_); | 310 return GetShelfIDForWindow(window_); |
| 290 | 311 |
| 291 if (key == WmWindowProperty::TOP_VIEW_INSET) | 312 if (key == WmWindowProperty::TOP_VIEW_INSET) |
| 292 return window_->GetProperty(aura::client::kTopViewInset); | 313 return window_->GetProperty(aura::client::kTopViewInset); |
| 293 | 314 |
| 294 NOTREACHED(); | 315 NOTREACHED(); |
| 295 return 0; | 316 return 0; |
| 296 } | 317 } |
| (...skipping 536 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 833 OnTransientChildAdded(this, Get(transient))); | 854 OnTransientChildAdded(this, Get(transient))); |
| 834 } | 855 } |
| 835 | 856 |
| 836 void WmWindowAura::OnTransientChildRemoved(aura::Window* window, | 857 void WmWindowAura::OnTransientChildRemoved(aura::Window* window, |
| 837 aura::Window* transient) { | 858 aura::Window* transient) { |
| 838 FOR_EACH_OBSERVER(WmTransientWindowObserver, transient_observers_, | 859 FOR_EACH_OBSERVER(WmTransientWindowObserver, transient_observers_, |
| 839 OnTransientChildRemoved(this, Get(transient))); | 860 OnTransientChildRemoved(this, Get(transient))); |
| 840 } | 861 } |
| 841 | 862 |
| 842 } // namespace ash | 863 } // namespace ash |
| OLD | NEW |