| 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 499 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 510 } | 510 } |
| 511 | 511 |
| 512 void WmWindowAura::Hide() { | 512 void WmWindowAura::Hide() { |
| 513 window_->Hide(); | 513 window_->Hide(); |
| 514 } | 514 } |
| 515 | 515 |
| 516 void WmWindowAura::Show() { | 516 void WmWindowAura::Show() { |
| 517 window_->Show(); | 517 window_->Show(); |
| 518 } | 518 } |
| 519 | 519 |
| 520 views::Widget* WmWindowAura::GetInternalWidget() { |
| 521 return views::Widget::GetWidgetForNativeView(window_); |
| 522 } |
| 523 |
| 520 void WmWindowAura::CloseWidget() { | 524 void WmWindowAura::CloseWidget() { |
| 521 DCHECK(views::Widget::GetWidgetForNativeView(window_)); | 525 DCHECK(GetInternalWidget()); |
| 522 views::Widget::GetWidgetForNativeView(window_)->Close(); | 526 GetInternalWidget()->Close(); |
| 523 } | 527 } |
| 524 | 528 |
| 525 bool WmWindowAura::IsFocused() const { | 529 bool WmWindowAura::IsFocused() const { |
| 526 return window_->HasFocus(); | 530 return window_->HasFocus(); |
| 527 } | 531 } |
| 528 | 532 |
| 529 bool WmWindowAura::IsActive() const { | 533 bool WmWindowAura::IsActive() const { |
| 530 return wm::IsActiveWindow(window_); | 534 return wm::IsActiveWindow(window_); |
| 531 } | 535 } |
| 532 | 536 |
| (...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 694 bool visible) { | 698 bool visible) { |
| 695 FOR_EACH_OBSERVER(WmWindowObserver, observers_, | 699 FOR_EACH_OBSERVER(WmWindowObserver, observers_, |
| 696 OnWindowVisibilityChanging(this, visible)); | 700 OnWindowVisibilityChanging(this, visible)); |
| 697 } | 701 } |
| 698 | 702 |
| 699 void WmWindowAura::OnWindowTitleChanged(aura::Window* window) { | 703 void WmWindowAura::OnWindowTitleChanged(aura::Window* window) { |
| 700 FOR_EACH_OBSERVER(WmWindowObserver, observers_, OnWindowTitleChanged(this)); | 704 FOR_EACH_OBSERVER(WmWindowObserver, observers_, OnWindowTitleChanged(this)); |
| 701 } | 705 } |
| 702 | 706 |
| 703 } // namespace ash | 707 } // namespace ash |
| OLD | NEW |