Chromium Code Reviews| 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 496 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 507 } | 507 } |
| 508 | 508 |
| 509 void WmWindowAura::Hide() { | 509 void WmWindowAura::Hide() { |
| 510 window_->Hide(); | 510 window_->Hide(); |
| 511 } | 511 } |
| 512 | 512 |
| 513 void WmWindowAura::Show() { | 513 void WmWindowAura::Show() { |
| 514 window_->Show(); | 514 window_->Show(); |
| 515 } | 515 } |
| 516 | 516 |
| 517 views::Widget* WmWindowAura::GetWidget() { | |
| 518 return views::Widget::GetWidgetForNativeView(window_); | |
| 519 } | |
| 520 | |
| 517 void WmWindowAura::CloseWidget() { | 521 void WmWindowAura::CloseWidget() { |
|
msw
2016/06/16 23:57:44
nit: Remove this and inline GetWidget()->Close() f
James Cook
2016/06/17 03:39:29
I'm going to keep this, since there is a differenc
| |
| 518 DCHECK(views::Widget::GetWidgetForNativeView(window_)); | 522 DCHECK(GetWidget()); |
| 519 views::Widget::GetWidgetForNativeView(window_)->Close(); | 523 GetWidget()->Close(); |
| 520 } | 524 } |
| 521 | 525 |
| 522 bool WmWindowAura::IsFocused() const { | 526 bool WmWindowAura::IsFocused() const { |
| 523 return window_->HasFocus(); | 527 return window_->HasFocus(); |
| 524 } | 528 } |
| 525 | 529 |
| 526 bool WmWindowAura::IsActive() const { | 530 bool WmWindowAura::IsActive() const { |
| 527 return wm::IsActiveWindow(window_); | 531 return wm::IsActiveWindow(window_); |
| 528 } | 532 } |
| 529 | 533 |
| (...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 685 bool visible) { | 689 bool visible) { |
| 686 FOR_EACH_OBSERVER(WmWindowObserver, observers_, | 690 FOR_EACH_OBSERVER(WmWindowObserver, observers_, |
| 687 OnWindowVisibilityChanging(this, visible)); | 691 OnWindowVisibilityChanging(this, visible)); |
| 688 } | 692 } |
| 689 | 693 |
| 690 void WmWindowAura::OnWindowTitleChanged(aura::Window* window) { | 694 void WmWindowAura::OnWindowTitleChanged(aura::Window* window) { |
| 691 FOR_EACH_OBSERVER(WmWindowObserver, observers_, OnWindowTitleChanged(this)); | 695 FOR_EACH_OBSERVER(WmWindowObserver, observers_, OnWindowTitleChanged(this)); |
| 692 } | 696 } |
| 693 | 697 |
| 694 } // namespace ash | 698 } // namespace ash |
| OLD | NEW |