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

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

Issue 2642003002: Removes ash::mus::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_lookup_mus.h" 5 #include "ash/mus/bridge/wm_lookup_mus.h"
6 6
7 #include "ash/common/wm_window.h" 7 #include "ash/common/wm_window.h"
8 #include "ash/mus/bridge/wm_shell_mus.h" 8 #include "ash/mus/bridge/wm_shell_mus.h"
9 #include "ash/mus/root_window_controller.h"
10 #include "ui/views/widget/widget.h" 9 #include "ui/views/widget/widget.h"
11 10
12 namespace ash { 11 namespace ash {
13 namespace mus { 12 namespace mus {
14 13
15 WmLookupMus::WmLookupMus() { 14 WmLookupMus::WmLookupMus() {
16 WmLookup::Set(this); 15 WmLookup::Set(this);
17 } 16 }
18 17
19 WmLookupMus::~WmLookupMus() { 18 WmLookupMus::~WmLookupMus() {
20 if (WmLookupMus::Get() == this) 19 if (WmLookupMus::Get() == this)
21 WmLookup::Set(nullptr); 20 WmLookup::Set(nullptr);
22 } 21 }
23 22
24 ash::RootWindowController* WmLookupMus::GetRootWindowControllerWithDisplayId( 23 RootWindowController* WmLookupMus::GetRootWindowControllerWithDisplayId(
msw 2017/01/18 23:31:26 aside: I wonder if this helper is still useful.
sky 2017/01/19 01:02:19 It's still used in a couple of places.
25 int64_t id) { 24 int64_t id) {
26 return WmShellMus::Get() 25 return WmShellMus::Get()->GetRootWindowControllerWithDisplayId(id);
27 ->GetRootWindowControllerWithDisplayId(id)
28 ->ash_root_window_controller();
29 } 26 }
30 27
31 WmWindow* WmLookupMus::GetWindowForWidget(views::Widget* widget) { 28 WmWindow* WmLookupMus::GetWindowForWidget(views::Widget* widget) {
32 return WmWindow::Get(widget->GetNativeWindow()); 29 return WmWindow::Get(widget->GetNativeWindow());
33 } 30 }
34 31
35 } // namespace mus 32 } // namespace mus
36 } // namespace ash 33 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698