| 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_WM_ASH_CURSOR_PLATFORM_DELEGATE_H_ |
| 6 #define ASH_WM_ASH_CURSOR_PLATFORM_DELEGATE_H_ |
| 7 |
| 8 #include "ash/ash_export.h" |
| 9 #include "base/basictypes.h" |
| 10 #include "base/compiler_specific.h" |
| 11 #include "base/memory/scoped_ptr.h" |
| 12 #include "ui/gfx/native_widget_types.h" |
| 13 #include "ui/gfx/point.h" |
| 14 #include "ui/views/corewm/cursor_manager_delegate.h" |
| 15 #include "ui/views/corewm/cursor_platform_delegate.h" |
| 16 |
| 17 namespace ash { |
| 18 |
| 19 namespace test { |
| 20 class CursorManagerTestApi; |
| 21 } |
| 22 |
| 23 class ImageCursors; |
| 24 |
| 25 // This class controls the visibility and the type of the cursor. |
| 26 // The cursor type can be locked so that the type stays the same |
| 27 // until it's unlocked. |
| 28 class ASH_EXPORT AshCursorPlatformDelegate |
| 29 : public views::corewm::CursorPlatformDelegate { |
| 30 public: |
| 31 AshCursorPlatformDelegate(); |
| 32 virtual ~AshCursorPlatformDelegate(); |
| 33 |
| 34 private: |
| 35 friend class test::CursorManagerTestApi; |
| 36 |
| 37 // Overridden from views::corewm::CursorPlatformDelegate: |
| 38 virtual void SetDeviceScaleFactor( |
| 39 float device_scale_factor, |
| 40 views::corewm::CursorManagerDelegate* delegate) OVERRIDE; |
| 41 virtual void SetCursor( |
| 42 gfx::NativeCursor cursor, |
| 43 views::corewm::CursorManagerDelegate* delegate) OVERRIDE; |
| 44 virtual void SetVisibility( |
| 45 bool visible, |
| 46 views::corewm::CursorManagerDelegate* delegate) OVERRIDE; |
| 47 virtual void SetMouseEventsEnabled( |
| 48 bool enabled, |
| 49 views::corewm::CursorManagerDelegate* delegate) OVERRIDE; |
| 50 |
| 51 // The cursor location where the cursor was disabled. |
| 52 gfx::Point disabled_cursor_location_; |
| 53 |
| 54 scoped_ptr<ImageCursors> image_cursors_; |
| 55 |
| 56 DISALLOW_COPY_AND_ASSIGN(AshCursorPlatformDelegate); |
| 57 }; |
| 58 |
| 59 } // namespace ash |
| 60 |
| 61 #endif // ASH_WM_ASH_CURSOR_PLATFORM_DELEGATE_H_ |
| OLD | NEW |