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_NATIVE_CURSOR_MANAGER_H_ |
| 6 #define ASH_WM_ASH_NATIVE_CURSOR_MANAGER_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/native_cursor_manager.h" |
| 15 #include "ui/views/corewm/native_cursor_manager_delegate.h" |
| 16 |
| 17 namespace ash { |
| 18 |
| 19 namespace test { |
| 20 class CursorManagerTestApi; |
| 21 } |
| 22 |
| 23 class ImageCursors; |
| 24 |
| 25 // This does the ash-specific setting of cursor details like cursor |
| 26 // visibility. It communicates back with the CursorManager through the |
| 27 // NativeCursorManagerDelegate interface, which receives messages about what |
| 28 // changes were acted on. |
| 29 class ASH_EXPORT AshNativeCursorManager |
| 30 : public views::corewm::NativeCursorManager { |
| 31 public: |
| 32 AshNativeCursorManager(); |
| 33 virtual ~AshNativeCursorManager(); |
| 34 |
| 35 private: |
| 36 friend class test::CursorManagerTestApi; |
| 37 |
| 38 // Overridden from views::corewm::NativeCursorManager: |
| 39 virtual void SetDeviceScaleFactor( |
| 40 float device_scale_factor, |
| 41 views::corewm::NativeCursorManagerDelegate* delegate) OVERRIDE; |
| 42 virtual void SetCursor( |
| 43 gfx::NativeCursor cursor, |
| 44 views::corewm::NativeCursorManagerDelegate* delegate) OVERRIDE; |
| 45 virtual void SetVisibility( |
| 46 bool visible, |
| 47 views::corewm::NativeCursorManagerDelegate* delegate) OVERRIDE; |
| 48 virtual void SetMouseEventsEnabled( |
| 49 bool enabled, |
| 50 views::corewm::NativeCursorManagerDelegate* delegate) OVERRIDE; |
| 51 |
| 52 // The cursor location where the cursor was disabled. |
| 53 gfx::Point disabled_cursor_location_; |
| 54 |
| 55 scoped_ptr<ImageCursors> image_cursors_; |
| 56 |
| 57 DISALLOW_COPY_AND_ASSIGN(AshNativeCursorManager); |
| 58 }; |
| 59 |
| 60 } // namespace ash |
| 61 |
| 62 #endif // ASH_WM_ASH_NATIVE_CURSOR_MANAGER_H_ |
OLD | NEW |