OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef ASH_MAGNIFIER_MAGNIFIED_CURSOR_H_ |
| 6 #define ASH_MAGNIFIER_MAGNIFIED_CURSOR_H_ |
| 7 #pragma once |
| 8 |
| 9 #include "ui/compositor/layer_delegate.h" |
| 10 #include "ui/compositor/layer.h" |
| 11 #include "ui/gfx/image/image.h" |
| 12 #include "ui/gfx/canvas.h" |
| 13 |
| 14 namespace aura { |
| 15 class RootWindow; |
| 16 } |
| 17 |
| 18 namespace ash { |
| 19 namespace internal { |
| 20 |
| 21 class MagnifiedCursor : public ui::LayerDelegate { |
| 22 public: |
| 23 explicit MagnifiedCursor(aura::RootWindow* root_window); |
| 24 virtual ~MagnifiedCursor() {} |
| 25 |
| 26 ui::Layer* layer() { return layer_.get(); } |
| 27 void MovePointer(gfx::Point position); |
| 28 void SetVisible(bool show); |
| 29 |
| 30 // ui::LayerDelegate implementation: |
| 31 virtual void OnPaintLayer(gfx::Canvas* canvas) OVERRIDE; |
| 32 virtual void OnDeviceScaleFactorChanged(float device_scale_factor) OVERRIDE; |
| 33 |
| 34 private: |
| 35 scoped_ptr<ui::Layer> layer_; |
| 36 aura::RootWindow* root_window_; |
| 37 |
| 38 DISALLOW_COPY_AND_ASSIGN(MagnifiedCursor); |
| 39 }; |
| 40 |
| 41 } |
| 42 } |
| 43 |
| 44 #endif // ASH_MAGNIFIER_MAGNIFIED_CURSOR_H_ |
OLD | NEW |