| 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" |
| 11 #include "ash/shell_window_ids.h" | 11 #include "ash/shell_window_ids.h" |
| 12 #include "ui/aura/env.h" | 12 #include "ui/aura/env.h" |
| 13 #include "ui/aura/window_delegate.h" | 13 #include "ui/aura/window_delegate.h" |
| 14 #include "ui/aura/window_event_dispatcher.h" | 14 #include "ui/aura/window_event_dispatcher.h" |
| 15 #include "ui/base/cursor/cursors_aura.h" | 15 #include "ui/base/cursor/cursors_aura.h" |
| 16 #include "ui/base/hit_test.h" | 16 #include "ui/base/hit_test.h" |
| 17 #include "ui/base/resource/resource_bundle.h" | 17 #include "ui/base/resource/resource_bundle.h" |
| 18 #include "ui/compositor/dip_util.h" | 18 #include "ui/compositor/dip_util.h" |
| 19 #include "ui/gfx/canvas.h" | 19 #include "ui/gfx/canvas.h" |
| 20 #include "ui/gfx/display.h" | 20 #include "ui/gfx/display.h" |
| 21 #include "ui/gfx/image/image_skia.h" | 21 #include "ui/gfx/image/image_skia.h" |
| 22 #include "ui/gfx/image/image_skia_operations.h" | 22 #include "ui/gfx/image/image_skia_operations.h" |
| 23 | 23 |
| 24 namespace ash { | 24 namespace ash { |
| 25 namespace internal { | |
| 26 | 25 |
| 27 class CursorWindowDelegate : public aura::WindowDelegate { | 26 class CursorWindowDelegate : public aura::WindowDelegate { |
| 28 public: | 27 public: |
| 29 CursorWindowDelegate() : is_cursor_compositing_enabled_(false) {} | 28 CursorWindowDelegate() : is_cursor_compositing_enabled_(false) {} |
| 30 virtual ~CursorWindowDelegate() {} | 29 virtual ~CursorWindowDelegate() {} |
| 31 | 30 |
| 32 // aura::WindowDelegate overrides: | 31 // aura::WindowDelegate overrides: |
| 33 virtual gfx::Size GetMinimumSize() const OVERRIDE { return size_; } | 32 virtual gfx::Size GetMinimumSize() const OVERRIDE { return size_; } |
| 34 virtual gfx::Size GetMaximumSize() const OVERRIDE { return size_; } | 33 virtual gfx::Size GetMaximumSize() const OVERRIDE { return size_; } |
| 35 virtual void OnBoundsChanged(const gfx::Rect& old_bounds, | 34 virtual void OnBoundsChanged(const gfx::Rect& old_bounds, |
| (...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 251 } | 250 } |
| 252 delegate_->SetCursorImage(rotated, display_); | 251 delegate_->SetCursorImage(rotated, display_); |
| 253 if (cursor_window_) { | 252 if (cursor_window_) { |
| 254 cursor_window_->SetBounds(gfx::Rect(delegate_->size())); | 253 cursor_window_->SetBounds(gfx::Rect(delegate_->size())); |
| 255 cursor_window_->SchedulePaintInRect( | 254 cursor_window_->SchedulePaintInRect( |
| 256 gfx::Rect(cursor_window_->bounds().size())); | 255 gfx::Rect(cursor_window_->bounds().size())); |
| 257 UpdateLocation(); | 256 UpdateLocation(); |
| 258 } | 257 } |
| 259 } | 258 } |
| 260 | 259 |
| 261 } // namespace internal | |
| 262 } // namespace ash | 260 } // namespace ash |
| OLD | NEW |