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

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

Issue 259253002: Add OnDisplayMetricsChanged in DisplayObserver. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@update_orientation
Patch Set: Created 6 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/web_notification/web_notification_tray.cc » ('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 "ash/display/display_controller.h" 7 #include "ash/display/display_controller.h"
8 #include "ash/shelf/shelf.h" 8 #include "ash/shelf/shelf.h"
9 #include "ash/shelf/shelf_item_delegate_manager.h" 9 #include "ash/shelf/shelf_item_delegate_manager.h"
10 #include "ash/shelf/shelf_model.h" 10 #include "ash/shelf/shelf_model.h"
(...skipping 120 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::OnDisplayBoundsChanged(const gfx::Display& display) {
142 }
143
144 void WindowWatcher::OnDisplayAdded(const gfx::Display& new_display) { 141 void WindowWatcher::OnDisplayAdded(const gfx::Display& new_display) {
145 aura::Window* root = Shell::GetInstance()->display_controller()-> 142 aura::Window* root = Shell::GetInstance()->display_controller()->
146 GetRootWindowForDisplayId(new_display.id()); 143 GetRootWindowForDisplayId(new_display.id());
147 workspace_window_watcher_->RootWindowAdded(root); 144 workspace_window_watcher_->RootWindowAdded(root);
148 } 145 }
149 146
150 void WindowWatcher::OnDisplayRemoved(const gfx::Display& old_display) { 147 void WindowWatcher::OnDisplayRemoved(const gfx::Display& old_display) {
151 // All windows in the display has already been removed, so no need to 148 // All windows in the display has already been removed, so no need to
152 // remove observers. 149 // remove observers.
153 } 150 }
154 151
152 void WindowWatcher::OnDisplayMetricsChanged(const gfx::Display&, uint32_t) {
153 }
154
155 } // namespace shell 155 } // namespace shell
156 } // namespace ash 156 } // namespace ash
OLDNEW
« no previous file with comments | « ash/shell/window_watcher.h ('k') | ash/system/web_notification/web_notification_tray.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698