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

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

Issue 2779653003: WindowTreeHostManager::GetRootWindowForDisplayId -> WmShell::GetRoo... (Closed)
Patch Set: Created 3 years, 8 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 (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/common/shelf/shelf_model.h" 9 #include "ash/common/shelf/shelf_model.h"
10 #include "ash/common/shelf/shelf_widget.h" 10 #include "ash/common/shelf/shelf_widget.h"
11 #include "ash/common/wm_shell.h" 11 #include "ash/common/wm_shell.h"
12 #include "ash/common/wm_window.h" 12 #include "ash/common/wm_window.h"
13 #include "ash/display/window_tree_host_manager.h"
14 #include "ash/public/cpp/shelf_item.h" 13 #include "ash/public/cpp/shelf_item.h"
15 #include "ash/public/cpp/shell_window_ids.h" 14 #include "ash/public/cpp/shell_window_ids.h"
16 #include "ash/shell.h" 15 #include "ash/shell.h"
17 #include "ash/shell/window_watcher_shelf_item_delegate.h" 16 #include "ash/shell/window_watcher_shelf_item_delegate.h"
18 #include "ash/wm/window_properties.h" 17 #include "ash/wm/window_properties.h"
19 #include "ash/wm/window_util.h" 18 #include "ash/wm/window_util.h"
20 #include "ui/aura/window.h" 19 #include "ui/aura/window.h"
21 #include "ui/aura/window_event_dispatcher.h" 20 #include "ui/aura/window_event_dispatcher.h"
22 #include "ui/display/display.h" 21 #include "ui/display/display.h"
23 22
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 int index = model->ItemIndexByID(i->first); 127 int index = model->ItemIndexByID(i->first);
129 DCHECK_NE(-1, index); 128 DCHECK_NE(-1, index);
130 model->RemoveItemAt(index); 129 model->RemoveItemAt(index);
131 id_to_window_.erase(i); 130 id_to_window_.erase(i);
132 break; 131 break;
133 } 132 }
134 } 133 }
135 } 134 }
136 135
137 void WindowWatcher::OnDisplayAdded(const display::Display& new_display) { 136 void WindowWatcher::OnDisplayAdded(const display::Display& new_display) {
138 aura::Window* root = Shell::GetInstance() 137 WmWindow* root = WmShell::Get()->GetRootWindowForDisplayId(new_display.id());
139 ->window_tree_host_manager() 138 workspace_window_watcher_->RootWindowAdded(root->aura_window());
140 ->GetRootWindowForDisplayId(new_display.id());
141 workspace_window_watcher_->RootWindowAdded(root);
142 } 139 }
143 140
144 void WindowWatcher::OnDisplayRemoved(const display::Display& old_display) { 141 void WindowWatcher::OnDisplayRemoved(const display::Display& old_display) {
145 // All windows in the display has already been removed, so no need to 142 // All windows in the display has already been removed, so no need to
146 // remove observers. 143 // remove observers.
147 } 144 }
148 145
149 void WindowWatcher::OnDisplayMetricsChanged(const display::Display&, uint32_t) { 146 void WindowWatcher::OnDisplayMetricsChanged(const display::Display&, uint32_t) {
150 } 147 }
151 148
152 } // namespace shell 149 } // namespace shell
153 } // namespace ash 150 } // namespace ash
OLDNEW
« no previous file with comments | « ash/app_list/app_list_presenter_delegate.cc ('k') | ash/sticky_keys/sticky_keys_overlay_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698