Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(108)

Side by Side Diff: ash/mus/bridge/wm_window_mus.cc

Issue 2075923002: mash: Convert FocusCycler to wm common types and move to //ash/common (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: cleanup Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 553 matching lines...) Expand 10 before | Expand all | Expand 10 after
564 } 564 }
565 565
566 void WmWindowMus::Hide() { 566 void WmWindowMus::Hide() {
567 window_->SetVisible(false); 567 window_->SetVisible(false);
568 } 568 }
569 569
570 void WmWindowMus::Show() { 570 void WmWindowMus::Show() {
571 window_->SetVisible(true); 571 window_->SetVisible(true);
572 } 572 }
573 573
574 views::Widget* WmWindowMus::GetWidget() {
575 // Don't return the window frame widget for an embedded window.
576 if (widget_creation_type_ == WidgetCreationType::FOR_CLIENT)
577 return nullptr;
578
579 return widget_;
580 }
581
574 void WmWindowMus::CloseWidget() { 582 void WmWindowMus::CloseWidget() {
575 DCHECK(widget_); 583 DCHECK(widget_);
576 // Allow the client to service the close request for remote widgets. 584 // Allow the client to service the close request for remote widgets.
577 if (widget_creation_type_ == WidgetCreationType::FOR_CLIENT) 585 if (widget_creation_type_ == WidgetCreationType::FOR_CLIENT)
578 window_->RequestClose(); 586 window_->RequestClose();
579 else 587 else
580 widget_->Close(); 588 widget_->Close();
581 } 589 }
582 590
583 bool WmWindowMus::IsFocused() const { 591 bool WmWindowMus::IsFocused() const {
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
743 void WmWindowMus::OnWindowDestroying(::mus::Window* window) { 751 void WmWindowMus::OnWindowDestroying(::mus::Window* window) {
744 FOR_EACH_OBSERVER(WmWindowObserver, observers_, OnWindowDestroying(this)); 752 FOR_EACH_OBSERVER(WmWindowObserver, observers_, OnWindowDestroying(this));
745 } 753 }
746 754
747 void WmWindowMus::OnWindowDestroyed(::mus::Window* window) { 755 void WmWindowMus::OnWindowDestroyed(::mus::Window* window) {
748 FOR_EACH_OBSERVER(WmWindowObserver, observers_, OnWindowDestroyed(this)); 756 FOR_EACH_OBSERVER(WmWindowObserver, observers_, OnWindowDestroyed(this));
749 } 757 }
750 758
751 } // namespace mus 759 } // namespace mus
752 } // namespace ash 760 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698