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

Side by Side Diff: components/exo/wm_helper_mus.cc

Issue 2270553002: Move ash::DisplayInfo to ui (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebased Created 4 years, 3 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 "components/exo/wm_helper_mus.h" 5 #include "components/exo/wm_helper_mus.h"
6 6
7 #include "ash/common/display/display_info.h"
8 #include "services/ui/public/cpp/window_tree_client.h" 7 #include "services/ui/public/cpp/window_tree_client.h"
9 #include "ui/aura/client/focus_client.h" 8 #include "ui/aura/client/focus_client.h"
10 #include "ui/aura/env.h" 9 #include "ui/aura/env.h"
11 #include "ui/aura/window.h" 10 #include "ui/aura/window.h"
11 #include "ui/display/manager/display_info.h"
12 #include "ui/views/mus/native_widget_mus.h" 12 #include "ui/views/mus/native_widget_mus.h"
13 #include "ui/views/mus/window_manager_connection.h" 13 #include "ui/views/mus/window_manager_connection.h"
14 #include "ui/views/widget/widget.h" 14 #include "ui/views/widget/widget.h"
15 15
16 namespace exo { 16 namespace exo {
17 namespace { 17 namespace {
18 18
19 aura::Window* GetToplevelAuraWindow(ui::Window* window) { 19 aura::Window* GetToplevelAuraWindow(ui::Window* window) {
20 DCHECK(window); 20 DCHECK(window);
21 // We never create child ui::Window, so window->parent() should be null. 21 // We never create child ui::Window, so window->parent() should be null.
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 } 66 }
67 67
68 WMHelperMus::~WMHelperMus() { 68 WMHelperMus::~WMHelperMus() {
69 views::WindowManagerConnection::Get()->client()->RemoveObserver(this); 69 views::WindowManagerConnection::Get()->client()->RemoveObserver(this);
70 aura::Env::GetInstance()->RemoveObserver(this); 70 aura::Env::GetInstance()->RemoveObserver(this);
71 } 71 }
72 72
73 //////////////////////////////////////////////////////////////////////////////// 73 ////////////////////////////////////////////////////////////////////////////////
74 // WMHelperMus, private: 74 // WMHelperMus, private:
75 75
76 const ash::DisplayInfo WMHelperMus::GetDisplayInfo(int64_t display_id) const { 76 const ui::DisplayInfo WMHelperMus::GetDisplayInfo(int64_t display_id) const {
77 // TODO(penghuang): Return real display info when it is supported in mus. 77 // TODO(penghuang): Return real display info when it is supported in mus.
78 return ash::DisplayInfo(display_id, "", false); 78 return ui::DisplayInfo(display_id, "", false);
79 } 79 }
80 80
81 aura::Window* WMHelperMus::GetContainer(int container_id) { 81 aura::Window* WMHelperMus::GetContainer(int container_id) {
82 NOTIMPLEMENTED(); 82 NOTIMPLEMENTED();
83 return nullptr; 83 return nullptr;
84 } 84 }
85 85
86 aura::Window* WMHelperMus::GetActiveWindow() const { 86 aura::Window* WMHelperMus::GetActiveWindow() const {
87 ui::Window* window = 87 ui::Window* window =
88 views::WindowManagerConnection::Get()->client()->GetFocusedWindow(); 88 views::WindowManagerConnection::Get()->client()->GetFocusedWindow();
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
173 173
174 void WMHelperMus::OnWindowFocused(aura::Window* gained_focus, 174 void WMHelperMus::OnWindowFocused(aura::Window* gained_focus,
175 aura::Window* lost_focus) { 175 aura::Window* lost_focus) {
176 if (focused_window_ != gained_focus) { 176 if (focused_window_ != gained_focus) {
177 focused_window_ = gained_focus; 177 focused_window_ = gained_focus;
178 NotifyWindowFocused(gained_focus, lost_focus); 178 NotifyWindowFocused(gained_focus, lost_focus);
179 } 179 }
180 } 180 }
181 181
182 } // namespace exo 182 } // namespace exo
OLDNEW
« ash/common/wm_shell.h ('K') | « components/exo/wm_helper_mus.h ('k') | ui/display/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698