| 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/mus/bridge/wm_window_mus.h" | 5 #include "ash/mus/bridge/wm_window_mus.h" |
| 6 | 6 |
| 7 #include "ash/common/wm/container_finder.h" | 7 #include "ash/common/wm/container_finder.h" |
| 8 #include "ash/common/wm/window_state.h" | 8 #include "ash/common/wm/window_state.h" |
| 9 #include "ash/common/wm_layout_manager.h" | 9 #include "ash/common/wm_layout_manager.h" |
| 10 #include "ash/common/wm_window_observer.h" | 10 #include "ash/common/wm_window_observer.h" |
| (...skipping 557 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 568 } | 568 } |
| 569 | 569 |
| 570 void WmWindowMus::Hide() { | 570 void WmWindowMus::Hide() { |
| 571 window_->SetVisible(false); | 571 window_->SetVisible(false); |
| 572 } | 572 } |
| 573 | 573 |
| 574 void WmWindowMus::Show() { | 574 void WmWindowMus::Show() { |
| 575 window_->SetVisible(true); | 575 window_->SetVisible(true); |
| 576 } | 576 } |
| 577 | 577 |
| 578 views::Widget* WmWindowMus::GetInternalWidget() { |
| 579 // Don't return the window frame widget for an embedded client window. |
| 580 if (widget_creation_type_ == WidgetCreationType::FOR_CLIENT) |
| 581 return nullptr; |
| 582 |
| 583 return widget_; |
| 584 } |
| 585 |
| 578 void WmWindowMus::CloseWidget() { | 586 void WmWindowMus::CloseWidget() { |
| 579 DCHECK(widget_); | 587 DCHECK(widget_); |
| 580 // Allow the client to service the close request for remote widgets. | 588 // Allow the client to service the close request for remote widgets. |
| 581 if (widget_creation_type_ == WidgetCreationType::FOR_CLIENT) | 589 if (widget_creation_type_ == WidgetCreationType::FOR_CLIENT) |
| 582 window_->RequestClose(); | 590 window_->RequestClose(); |
| 583 else | 591 else |
| 584 widget_->Close(); | 592 widget_->Close(); |
| 585 } | 593 } |
| 586 | 594 |
| 587 bool WmWindowMus::IsFocused() const { | 595 bool WmWindowMus::IsFocused() const { |
| (...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 751 void WmWindowMus::OnWindowDestroying(::mus::Window* window) { | 759 void WmWindowMus::OnWindowDestroying(::mus::Window* window) { |
| 752 FOR_EACH_OBSERVER(WmWindowObserver, observers_, OnWindowDestroying(this)); | 760 FOR_EACH_OBSERVER(WmWindowObserver, observers_, OnWindowDestroying(this)); |
| 753 } | 761 } |
| 754 | 762 |
| 755 void WmWindowMus::OnWindowDestroyed(::mus::Window* window) { | 763 void WmWindowMus::OnWindowDestroyed(::mus::Window* window) { |
| 756 FOR_EACH_OBSERVER(WmWindowObserver, observers_, OnWindowDestroyed(this)); | 764 FOR_EACH_OBSERVER(WmWindowObserver, observers_, OnWindowDestroyed(this)); |
| 757 } | 765 } |
| 758 | 766 |
| 759 } // namespace mus | 767 } // namespace mus |
| 760 } // namespace ash | 768 } // namespace ash |
| OLD | NEW |