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

Side by Side Diff: ash/aura/wm_window_aura.cc

Issue 2157393002: Moves WindowCycleList/Controller to ash/common (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Feedback and std::move Created 4 years, 5 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
« no previous file with comments | « ash/aura/wm_window_aura.h ('k') | ash/common/wm/window_cycle_controller.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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"
11 #include "ash/common/shell_window_ids.h" 11 #include "ash/common/shell_window_ids.h"
12 #include "ash/common/wm/window_state.h" 12 #include "ash/common/wm/window_state.h"
13 #include "ash/common/wm_layout_manager.h" 13 #include "ash/common/wm_layout_manager.h"
14 #include "ash/common/wm_window_observer.h" 14 #include "ash/common/wm_window_observer.h"
15 #include "ash/common/wm_window_property.h" 15 #include "ash/common/wm_window_property.h"
16 #include "ash/screen_util.h" 16 #include "ash/screen_util.h"
17 #include "ash/shelf/shelf_util.h" 17 #include "ash/shelf/shelf_util.h"
18 #include "ash/shell.h" 18 #include "ash/shell.h"
19 #include "ash/wm/resize_shadow_controller.h" 19 #include "ash/wm/resize_shadow_controller.h"
20 #include "ash/wm/window_animations.h" 20 #include "ash/wm/window_animations.h"
21 #include "ash/wm/window_mirror_view.h"
21 #include "ash/wm/window_properties.h" 22 #include "ash/wm/window_properties.h"
22 #include "ash/wm/window_state_aura.h" 23 #include "ash/wm/window_state_aura.h"
23 #include "ash/wm/window_util.h" 24 #include "ash/wm/window_util.h"
24 #include "base/memory/ptr_util.h" 25 #include "base/memory/ptr_util.h"
25 #include "ui/aura/client/aura_constants.h" 26 #include "ui/aura/client/aura_constants.h"
26 #include "ui/aura/client/window_tree_client.h" 27 #include "ui/aura/client/window_tree_client.h"
27 #include "ui/aura/layout_manager.h" 28 #include "ui/aura/layout_manager.h"
28 #include "ui/aura/window.h" 29 #include "ui/aura/window.h"
29 #include "ui/aura/window_delegate.h" 30 #include "ui/aura/window_delegate.h"
30 #include "ui/aura/window_property.h" 31 #include "ui/aura/window_property.h"
(...skipping 597 matching lines...) Expand 10 before | Expand all | Expand 10 after
628 gfx::Insets touch_extend = 629 gfx::Insets touch_extend =
629 mouse_extend.Scale(kResizeOutsideBoundsScaleForTouch); 630 mouse_extend.Scale(kResizeOutsideBoundsScaleForTouch);
630 window_->SetEventTargeter(base::WrapUnique( 631 window_->SetEventTargeter(base::WrapUnique(
631 new ::wm::EasyResizeWindowTargeter(window_, mouse_extend, touch_extend))); 632 new ::wm::EasyResizeWindowTargeter(window_, mouse_extend, touch_extend)));
632 } 633 }
633 634
634 void WmWindowAura::SetDescendantsStayInSameRootWindow(bool value) { 635 void WmWindowAura::SetDescendantsStayInSameRootWindow(bool value) {
635 window_->SetProperty(kStayInSameRootWindowKey, true); 636 window_->SetProperty(kStayInSameRootWindowKey, true);
636 } 637 }
637 638
639 std::unique_ptr<views::View> WmWindowAura::CreateViewWithRecreatedLayers() {
640 std::unique_ptr<wm::WindowMirrorView> view(new wm::WindowMirrorView(this));
641 view->Init();
642 return std::move(view);
643 }
644
638 void WmWindowAura::AddObserver(WmWindowObserver* observer) { 645 void WmWindowAura::AddObserver(WmWindowObserver* observer) {
639 observers_.AddObserver(observer); 646 observers_.AddObserver(observer);
640 } 647 }
641 648
642 void WmWindowAura::RemoveObserver(WmWindowObserver* observer) { 649 void WmWindowAura::RemoveObserver(WmWindowObserver* observer) {
643 observers_.RemoveObserver(observer); 650 observers_.RemoveObserver(observer);
644 } 651 }
645 652
646 bool WmWindowAura::HasObserver(const WmWindowObserver* observer) const { 653 bool WmWindowAura::HasObserver(const WmWindowObserver* observer) const {
647 return observers_.HasObserver(observer); 654 return observers_.HasObserver(observer);
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
722 bool visible) { 729 bool visible) {
723 FOR_EACH_OBSERVER(WmWindowObserver, observers_, 730 FOR_EACH_OBSERVER(WmWindowObserver, observers_,
724 OnWindowVisibilityChanged(this, visible)); 731 OnWindowVisibilityChanged(this, visible));
725 } 732 }
726 733
727 void WmWindowAura::OnWindowTitleChanged(aura::Window* window) { 734 void WmWindowAura::OnWindowTitleChanged(aura::Window* window) {
728 FOR_EACH_OBSERVER(WmWindowObserver, observers_, OnWindowTitleChanged(this)); 735 FOR_EACH_OBSERVER(WmWindowObserver, observers_, OnWindowTitleChanged(this));
729 } 736 }
730 737
731 } // namespace ash 738 } // namespace ash
OLDNEW
« no previous file with comments | « ash/aura/wm_window_aura.h ('k') | ash/common/wm/window_cycle_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698