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

Side by Side Diff: ash/shell/window_watcher.cc

Issue 1924703002: Rename gfx::Display/Screen to display::Display/Screen in ash (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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/shell/window_watcher.h ('k') | ash/system/audio/tray_audio.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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/shell/window_watcher.h" 5 #include "ash/shell/window_watcher.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "ash/display/window_tree_host_manager.h" 9 #include "ash/display/window_tree_host_manager.h"
10 #include "ash/shelf/shelf.h" 10 #include "ash/shelf/shelf.h"
11 #include "ash/shelf/shelf_item_delegate_manager.h" 11 #include "ash/shelf/shelf_item_delegate_manager.h"
12 #include "ash/shelf/shelf_model.h" 12 #include "ash/shelf/shelf_model.h"
13 #include "ash/shelf/shelf_util.h" 13 #include "ash/shelf/shelf_util.h"
14 #include "ash/shelf/shelf_widget.h" 14 #include "ash/shelf/shelf_widget.h"
15 #include "ash/shell.h" 15 #include "ash/shell.h"
16 #include "ash/shell/window_watcher_shelf_item_delegate.h" 16 #include "ash/shell/window_watcher_shelf_item_delegate.h"
17 #include "ash/shell_window_ids.h" 17 #include "ash/shell_window_ids.h"
18 #include "ash/wm/window_util.h" 18 #include "ash/wm/window_util.h"
19 #include "ui/aura/window.h" 19 #include "ui/aura/window.h"
20 #include "ui/aura/window_event_dispatcher.h" 20 #include "ui/aura/window_event_dispatcher.h"
21 #include "ui/gfx/display.h" 21 #include "ui/display/display.h"
22 22
23 namespace ash { 23 namespace ash {
24 namespace shell { 24 namespace shell {
25 25
26 class WindowWatcher::WorkspaceWindowWatcher : public aura::WindowObserver { 26 class WindowWatcher::WorkspaceWindowWatcher : public aura::WindowObserver {
27 public: 27 public:
28 explicit WorkspaceWindowWatcher(WindowWatcher* watcher) : watcher_(watcher) { 28 explicit WorkspaceWindowWatcher(WindowWatcher* watcher) : watcher_(watcher) {
29 } 29 }
30 30
31 ~WorkspaceWindowWatcher() override {} 31 ~WorkspaceWindowWatcher() override {}
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 ShelfModel* model = Shell::GetInstance()->shelf_model(); 131 ShelfModel* model = Shell::GetInstance()->shelf_model();
132 int index = model->ItemIndexByID(i->first); 132 int index = model->ItemIndexByID(i->first);
133 DCHECK_NE(-1, index); 133 DCHECK_NE(-1, index);
134 model->RemoveItemAt(index); 134 model->RemoveItemAt(index);
135 id_to_window_.erase(i); 135 id_to_window_.erase(i);
136 break; 136 break;
137 } 137 }
138 } 138 }
139 } 139 }
140 140
141 void WindowWatcher::OnDisplayAdded(const gfx::Display& new_display) { 141 void WindowWatcher::OnDisplayAdded(const display::Display& new_display) {
142 aura::Window* root = Shell::GetInstance() 142 aura::Window* root = Shell::GetInstance()
143 ->window_tree_host_manager() 143 ->window_tree_host_manager()
144 ->GetRootWindowForDisplayId(new_display.id()); 144 ->GetRootWindowForDisplayId(new_display.id());
145 workspace_window_watcher_->RootWindowAdded(root); 145 workspace_window_watcher_->RootWindowAdded(root);
146 } 146 }
147 147
148 void WindowWatcher::OnDisplayRemoved(const gfx::Display& old_display) { 148 void WindowWatcher::OnDisplayRemoved(const display::Display& old_display) {
149 // All windows in the display has already been removed, so no need to 149 // All windows in the display has already been removed, so no need to
150 // remove observers. 150 // remove observers.
151 } 151 }
152 152
153 void WindowWatcher::OnDisplayMetricsChanged(const gfx::Display&, uint32_t) { 153 void WindowWatcher::OnDisplayMetricsChanged(const display::Display&, uint32_t) {
154 } 154 }
155 155
156 } // namespace shell 156 } // namespace shell
157 } // namespace ash 157 } // namespace ash
OLDNEW
« no previous file with comments | « ash/shell/window_watcher.h ('k') | ash/system/audio/tray_audio.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698