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

Side by Side Diff: ash/aura/wm_window_aura.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/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
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
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
OLDNEW
« no previous file with comments | « ash/aura/wm_window_aura.h ('k') | ash/common/focus_cycler.h » ('j') | ash/common/wm_window.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698