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

Side by Side Diff: ash/display/cursor_window_controller.cc

Issue 2911393002: Nix GetRootWindowController, use RootWindowController::ForWindow. (Closed)
Patch Set: Sync and rebase AGAIN Created 3 years, 6 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/app_list/app_list_presenter_delegate.cc ('k') | ash/display/display_util_unittest.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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/display/cursor_window_controller.h" 5 #include "ash/display/cursor_window_controller.h"
6 6
7 #include "ash/ash_constants.h" 7 #include "ash/ash_constants.h"
8 #include "ash/display/mirror_window_controller.h" 8 #include "ash/display/mirror_window_controller.h"
9 #include "ash/display/window_tree_host_manager.h" 9 #include "ash/display/window_tree_host_manager.h"
10 #include "ash/public/cpp/shell_window_ids.h" 10 #include "ash/public/cpp/shell_window_ids.h"
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
155 return; 155 return;
156 } 156 }
157 157
158 display_ = display; 158 display_ = display;
159 aura::Window* root_window = 159 aura::Window* root_window =
160 Shell::Get()->window_tree_host_manager()->GetRootWindowForDisplayId( 160 Shell::Get()->window_tree_host_manager()->GetRootWindowForDisplayId(
161 display.id()); 161 display.id());
162 if (!root_window) 162 if (!root_window)
163 return; 163 return;
164 164
165 SetContainer(GetRootWindowController(root_window) 165 SetContainer(RootWindowController::ForWindow(root_window)
166 ->GetContainer(kShellWindowId_MouseCursorContainer)); 166 ->GetContainer(kShellWindowId_MouseCursorContainer));
167 SetBoundsInScreen(display.bounds()); 167 SetBoundsInScreen(display.bounds());
168 // Updates the hot point based on the current display. 168 // Updates the hot point based on the current display.
169 UpdateCursorImage(); 169 UpdateCursorImage();
170 } 170 }
171 171
172 void CursorWindowController::UpdateLocation() { 172 void CursorWindowController::UpdateLocation() {
173 if (!cursor_window_) 173 if (!cursor_window_)
174 return; 174 return;
175 gfx::Point point = aura::Env::GetInstance()->last_mouse_location(); 175 gfx::Point point = aura::Env::GetInstance()->last_mouse_location();
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
324 cursor_window_->Show(); 324 cursor_window_->Show();
325 else 325 else
326 cursor_window_->Hide(); 326 cursor_window_->Hide();
327 } 327 }
328 328
329 const gfx::ImageSkia& CursorWindowController::GetCursorImageForTest() const { 329 const gfx::ImageSkia& CursorWindowController::GetCursorImageForTest() const {
330 return delegate_->cursor_image(); 330 return delegate_->cursor_image();
331 } 331 }
332 332
333 } // namespace ash 333 } // namespace ash
OLDNEW
« no previous file with comments | « ash/app_list/app_list_presenter_delegate.cc ('k') | ash/display/display_util_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698