| OLD | NEW |
| 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/display/display_controller.h" | 7 #include "ash/display/display_controller.h" |
| 8 #include "ash/display/mirror_window_controller.h" | 8 #include "ash/display/mirror_window_controller.h" |
| 9 #include "ash/root_window_controller.h" | 9 #include "ash/root_window_controller.h" |
| 10 #include "ash/shell.h" | 10 #include "ash/shell.h" |
| (...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 113 UpdateCursorImage(); | 113 UpdateCursorImage(); |
| 114 UpdateContainer(); | 114 UpdateContainer(); |
| 115 } | 115 } |
| 116 } | 116 } |
| 117 | 117 |
| 118 void CursorWindowController::UpdateContainer() { | 118 void CursorWindowController::UpdateContainer() { |
| 119 display_ = Shell::GetScreen()->GetPrimaryDisplay(); | 119 display_ = Shell::GetScreen()->GetPrimaryDisplay(); |
| 120 if (is_cursor_compositing_enabled_) { | 120 if (is_cursor_compositing_enabled_) { |
| 121 SetDisplay(display_); | 121 SetDisplay(display_); |
| 122 } else { | 122 } else { |
| 123 aura::WindowTreeHost* mirror_host = Shell::GetInstance()-> | 123 AshWindowTreeHost* mirror_host = Shell::GetInstance()-> |
| 124 display_controller()->mirror_window_controller()->host(); | 124 display_controller()->mirror_window_controller()->ash_host(); |
| 125 SetContainer(mirror_host ? mirror_host->window() : NULL); | 125 SetContainer(mirror_host ? mirror_host->AsWindowTreeHost()->window() : NULL)
; |
| 126 } | 126 } |
| 127 } | 127 } |
| 128 | 128 |
| 129 void CursorWindowController::SetDisplay(const gfx::Display& display) { | 129 void CursorWindowController::SetDisplay(const gfx::Display& display) { |
| 130 if (!is_cursor_compositing_enabled_) | 130 if (!is_cursor_compositing_enabled_) |
| 131 return; | 131 return; |
| 132 | 132 |
| 133 display_ = display; | 133 display_ = display; |
| 134 aura::Window* root_window = Shell::GetInstance()->display_controller()-> | 134 aura::Window* root_window = Shell::GetInstance()->display_controller()-> |
| 135 GetRootWindowForDisplayId(display.id()); | 135 GetRootWindowForDisplayId(display.id()); |
| (...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 255 if (cursor_window_) { | 255 if (cursor_window_) { |
| 256 cursor_window_->SetBounds(gfx::Rect(delegate_->size())); | 256 cursor_window_->SetBounds(gfx::Rect(delegate_->size())); |
| 257 cursor_window_->SchedulePaintInRect( | 257 cursor_window_->SchedulePaintInRect( |
| 258 gfx::Rect(cursor_window_->bounds().size())); | 258 gfx::Rect(cursor_window_->bounds().size())); |
| 259 UpdateLocation(); | 259 UpdateLocation(); |
| 260 } | 260 } |
| 261 } | 261 } |
| 262 | 262 |
| 263 } // namespace internal | 263 } // namespace internal |
| 264 } // namespace ash | 264 } // namespace ash |
| OLD | NEW |