| 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/wm/aura/wm_window_aura.h" | 5 #include "ash/wm/aura/wm_window_aura.h" |
| 6 | 6 |
| 7 #include "ash/screen_util.h" | 7 #include "ash/screen_util.h" |
| 8 #include "ash/shelf/shelf_util.h" | 8 #include "ash/shelf/shelf_util.h" |
| 9 #include "ash/wm/aura/aura_layout_manager_adapter.h" | 9 #include "ash/wm/aura/aura_layout_manager_adapter.h" |
| 10 #include "ash/wm/aura/wm_globals_aura.h" | 10 #include "ash/wm/aura/wm_globals_aura.h" |
| (...skipping 339 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 350 } | 350 } |
| 351 | 351 |
| 352 void WmWindowAura::SetRestoreBoundsInScreen(const gfx::Rect& bounds) { | 352 void WmWindowAura::SetRestoreBoundsInScreen(const gfx::Rect& bounds) { |
| 353 window_->SetProperty(aura::client::kRestoreBoundsKey, new gfx::Rect(bounds)); | 353 window_->SetProperty(aura::client::kRestoreBoundsKey, new gfx::Rect(bounds)); |
| 354 } | 354 } |
| 355 | 355 |
| 356 gfx::Rect WmWindowAura::GetRestoreBoundsInScreen() const { | 356 gfx::Rect WmWindowAura::GetRestoreBoundsInScreen() const { |
| 357 return *window_->GetProperty(aura::client::kRestoreBoundsKey); | 357 return *window_->GetProperty(aura::client::kRestoreBoundsKey); |
| 358 } | 358 } |
| 359 | 359 |
| 360 void WmWindowAura::OnWMEvent(const wm::WMEvent* event) { | |
| 361 ash::wm::GetWindowState(window_)->OnWMEvent(event); | |
| 362 } | |
| 363 | |
| 364 bool WmWindowAura::Contains(const WmWindow* other) const { | 360 bool WmWindowAura::Contains(const WmWindow* other) const { |
| 365 return other | 361 return other |
| 366 ? window_->Contains( | 362 ? window_->Contains( |
| 367 static_cast<const WmWindowAura*>(other)->window_) | 363 static_cast<const WmWindowAura*>(other)->window_) |
| 368 : false; | 364 : false; |
| 369 } | 365 } |
| 370 | 366 |
| 371 void WmWindowAura::SetShowState(ui::WindowShowState show_state) { | 367 void WmWindowAura::SetShowState(ui::WindowShowState show_state) { |
| 372 window_->SetProperty(aura::client::kShowStateKey, show_state); | 368 window_->SetProperty(aura::client::kShowStateKey, show_state); |
| 373 } | 369 } |
| (...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 556 } | 552 } |
| 557 | 553 |
| 558 void WmWindowAura::OnWindowVisibilityChanging(aura::Window* window, | 554 void WmWindowAura::OnWindowVisibilityChanging(aura::Window* window, |
| 559 bool visible) { | 555 bool visible) { |
| 560 FOR_EACH_OBSERVER(WmWindowObserver, observers_, | 556 FOR_EACH_OBSERVER(WmWindowObserver, observers_, |
| 561 OnWindowVisibilityChanging(this, visible)); | 557 OnWindowVisibilityChanging(this, visible)); |
| 562 } | 558 } |
| 563 | 559 |
| 564 } // namespace wm | 560 } // namespace wm |
| 565 } // namespace ash | 561 } // namespace ash |
| OLD | NEW |