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 UI_VIEWS_WIDGET_DESKTOP_AURA_DESKTOP_NATIVE_CURSOR_MANAGER_H_ |
| 6 #define UI_VIEWS_WIDGET_DESKTOP_AURA_DESKTOP_NATIVE_CURSOR_MANAGER_H_ |
| 7 |
| 8 #include "base/compiler_specific.h" |
| 9 #include "base/memory/scoped_ptr.h" |
| 10 #include "ui/views/corewm/native_cursor_manager.h" |
| 11 #include "ui/views/views_export.h" |
| 12 |
| 13 namespace aura { |
| 14 class RootWindow; |
| 15 } |
| 16 |
| 17 namespace ui { |
| 18 class CursorLoader; |
| 19 } |
| 20 |
| 21 namespace views { |
| 22 |
| 23 namespace corewm { |
| 24 class NativeCursorManagerDelegate; |
| 25 } |
| 26 |
| 27 // A NativeCursorManager that interacts with only one RootWindow. (Unlike the |
| 28 // one in ash, which interacts with all the RootWindows that ash knows about.) |
| 29 class VIEWS_EXPORT DesktopNativeCursorManager |
| 30 : public views::corewm::NativeCursorManager { |
| 31 public: |
| 32 explicit DesktopNativeCursorManager(aura::RootWindow* window); |
| 33 virtual ~DesktopNativeCursorManager(); |
| 34 |
| 35 private: |
| 36 // Overridden from views::corewm::NativeCursorManager: |
| 37 virtual void SetDeviceScaleFactor( |
| 38 float device_scale_factor, |
| 39 views::corewm::NativeCursorManagerDelegate* delegate) OVERRIDE; |
| 40 virtual void SetCursor( |
| 41 gfx::NativeCursor cursor, |
| 42 views::corewm::NativeCursorManagerDelegate* delegate) OVERRIDE; |
| 43 virtual void SetVisibility( |
| 44 bool visible, |
| 45 views::corewm::NativeCursorManagerDelegate* delegate) OVERRIDE; |
| 46 virtual void SetMouseEventsEnabled( |
| 47 bool enabled, |
| 48 views::corewm::NativeCursorManagerDelegate* delegate) OVERRIDE; |
| 49 |
| 50 aura::RootWindow* root_window_; |
| 51 scoped_ptr<ui::CursorLoader> cursor_loader_; |
| 52 |
| 53 DISALLOW_COPY_AND_ASSIGN(DesktopNativeCursorManager); |
| 54 }; |
| 55 |
| 56 } // namespace views |
| 57 |
| 58 #endif // UI_VIEWS_WIDGET_DESKTOP_AURA_DESKTOP_NATIVE_CURSOR_MANAGER_H_ |
| 59 |
OLD | NEW |