| 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 409 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 420 | 420 |
| 421 void WmWindowAura::ClearRestoreBounds() { | 421 void WmWindowAura::ClearRestoreBounds() { |
| 422 window_->ClearProperty(aura::client::kRestoreBoundsKey); | 422 window_->ClearProperty(aura::client::kRestoreBoundsKey); |
| 423 } | 423 } |
| 424 | 424 |
| 425 void WmWindowAura::SetRestoreBoundsInScreen(const gfx::Rect& bounds) { | 425 void WmWindowAura::SetRestoreBoundsInScreen(const gfx::Rect& bounds) { |
| 426 window_->SetProperty(aura::client::kRestoreBoundsKey, new gfx::Rect(bounds)); | 426 window_->SetProperty(aura::client::kRestoreBoundsKey, new gfx::Rect(bounds)); |
| 427 } | 427 } |
| 428 | 428 |
| 429 gfx::Rect WmWindowAura::GetRestoreBoundsInScreen() const { | 429 gfx::Rect WmWindowAura::GetRestoreBoundsInScreen() const { |
| 430 return *window_->GetProperty(aura::client::kRestoreBoundsKey); | 430 gfx::Rect* bounds = window_->GetProperty(aura::client::kRestoreBoundsKey); |
| 431 return bounds ? *bounds : gfx::Rect(); |
| 431 } | 432 } |
| 432 | 433 |
| 433 bool WmWindowAura::Contains(const WmWindow* other) const { | 434 bool WmWindowAura::Contains(const WmWindow* other) const { |
| 434 return other | 435 return other |
| 435 ? window_->Contains( | 436 ? window_->Contains( |
| 436 static_cast<const WmWindowAura*>(other)->window_) | 437 static_cast<const WmWindowAura*>(other)->window_) |
| 437 : false; | 438 : false; |
| 438 } | 439 } |
| 439 | 440 |
| 440 void WmWindowAura::SetShowState(ui::WindowShowState show_state) { | 441 void WmWindowAura::SetShowState(ui::WindowShowState show_state) { |
| (...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 698 bool visible) { | 699 bool visible) { |
| 699 FOR_EACH_OBSERVER(WmWindowObserver, observers_, | 700 FOR_EACH_OBSERVER(WmWindowObserver, observers_, |
| 700 OnWindowVisibilityChanging(this, visible)); | 701 OnWindowVisibilityChanging(this, visible)); |
| 701 } | 702 } |
| 702 | 703 |
| 703 void WmWindowAura::OnWindowTitleChanged(aura::Window* window) { | 704 void WmWindowAura::OnWindowTitleChanged(aura::Window* window) { |
| 704 FOR_EACH_OBSERVER(WmWindowObserver, observers_, OnWindowTitleChanged(this)); | 705 FOR_EACH_OBSERVER(WmWindowObserver, observers_, OnWindowTitleChanged(this)); |
| 705 } | 706 } |
| 706 | 707 |
| 707 } // namespace ash | 708 } // namespace ash |
| OLD | NEW |