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

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

Issue 2625843002: Folds WmRootWindowController into RootWindowController (Closed)
Patch Set: Created 3 years, 11 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/shelf/shelf_item_types.h" 7 #include "ash/common/shelf/shelf_item_types.h"
8 #include "ash/common/wm/container_finder.h" 8 #include "ash/common/wm/container_finder.h"
9 #include "ash/common/wm/window_positioning_utils.h" 9 #include "ash/common/wm/window_positioning_utils.h"
10 #include "ash/common/wm/window_state.h" 10 #include "ash/common/wm/window_state.h"
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 54
55 // static 55 // static
56 WmWindowMus* WmWindowMus::Get(views::Widget* widget) { 56 WmWindowMus* WmWindowMus::Get(views::Widget* widget) {
57 return WmWindowMus::Get(widget->GetNativeView()); 57 return WmWindowMus::Get(widget->GetNativeView());
58 } 58 }
59 59
60 bool WmWindowMus::IsContainer() const { 60 bool WmWindowMus::IsContainer() const {
61 return GetShellWindowId() != kShellWindowId_Invalid; 61 return GetShellWindowId() != kShellWindowId_Invalid;
62 } 62 }
63 63
64 WmRootWindowController* WmWindowMus::GetRootWindowController() { 64 ash::RootWindowController* WmWindowMus::GetRootWindowController() {
65 return RootWindowController::ForWindow(aura_window()) 65 return RootWindowController::ForWindow(aura_window())
66 ->ash_root_window_controller() 66 ->ash_root_window_controller();
67 ->wm_root_window_controller();
68 } 67 }
69 68
70 WmShell* WmWindowMus::GetShell() const { 69 WmShell* WmWindowMus::GetShell() const {
71 return WmShellMus::Get(); 70 return WmShellMus::Get();
72 } 71 }
73 72
74 void WmWindowMus::CloseWidget() { 73 void WmWindowMus::CloseWidget() {
75 // NOTE: in the FOR_CLIENT case there is not necessarily a widget associated 74 // NOTE: in the FOR_CLIENT case there is not necessarily a widget associated
76 // with the window. Mash only creates widgets for top level windows if mash 75 // with the window. Mash only creates widgets for top level windows if mash
77 // renders the non-client frame. 76 // renders the non-client frame.
78 if (aura_window()->GetProperty(kWidgetCreationTypeKey) == 77 if (aura_window()->GetProperty(kWidgetCreationTypeKey) ==
79 WidgetCreationType::FOR_CLIENT) { 78 WidgetCreationType::FOR_CLIENT) {
80 WmShellMus::Get()->window_manager()->window_manager_client()->RequestClose( 79 WmShellMus::Get()->window_manager()->window_manager_client()->RequestClose(
81 aura_window()); 80 aura_window());
82 } else { 81 } else {
83 WmWindowAura::CloseWidget(); 82 WmWindowAura::CloseWidget();
84 } 83 }
85 } 84 }
86 85
87 void WmWindowMus::AddLimitedPreTargetHandler(ui::EventHandler* handler) { 86 void WmWindowMus::AddLimitedPreTargetHandler(ui::EventHandler* handler) {
88 DCHECK(WmShellMus::Get()->window_tree_client()->WasCreatedByThisClient( 87 DCHECK(WmShellMus::Get()->window_tree_client()->WasCreatedByThisClient(
89 aura::WindowMus::Get(aura_window()))); 88 aura::WindowMus::Get(aura_window())));
90 WmWindowAura::AddLimitedPreTargetHandler(handler); 89 WmWindowAura::AddLimitedPreTargetHandler(handler);
91 } 90 }
92 91
93 } // namespace mus 92 } // namespace mus
94 } // namespace ash 93 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698