| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 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 #ifndef UI_AURA_DESKTOP_DESKTOP_CURSOR_CLIENT_H_ | 5 #ifndef UI_AURA_DESKTOP_DESKTOP_CURSOR_CLIENT_H_ |
| 6 #define UI_AURA_DESKTOP_DESKTOP_CURSOR_CLIENT_H_ | 6 #define UI_AURA_DESKTOP_DESKTOP_CURSOR_CLIENT_H_ |
| 7 | 7 |
| 8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
| 9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
| 10 #include "ui/aura/aura_export.h" | |
| 11 #include "ui/aura/client/cursor_client.h" | 10 #include "ui/aura/client/cursor_client.h" |
| 11 #include "ui/views/views_export.h" |
| 12 | 12 |
| 13 namespace ui { | 13 namespace ui { |
| 14 class CursorLoader; | 14 class CursorLoader; |
| 15 } | 15 } |
| 16 | 16 |
| 17 namespace aura { | 17 namespace aura { |
| 18 class RootWindow; | 18 class RootWindow; |
| 19 | 19 |
| 20 // A CursorClient that interacts with only one RootWindow. (Unlike the one in | 20 // A CursorClient that interacts with only one RootWindow. (Unlike the one in |
| 21 // ash, which interacts with all the RootWindows.) | 21 // ash, which interacts with all the RootWindows.) |
| 22 class AURA_EXPORT DesktopCursorClient : public client::CursorClient { | 22 class VIEWS_EXPORT DesktopCursorClient : public client::CursorClient { |
| 23 public: | 23 public: |
| 24 explicit DesktopCursorClient(aura::RootWindow* window); | 24 explicit DesktopCursorClient(aura::RootWindow* window); |
| 25 virtual ~DesktopCursorClient(); | 25 virtual ~DesktopCursorClient(); |
| 26 | 26 |
| 27 // Overridden from client::CursorClient: | 27 // Overridden from client::CursorClient: |
| 28 virtual void SetCursor(gfx::NativeCursor cursor) OVERRIDE; | 28 virtual void SetCursor(gfx::NativeCursor cursor) OVERRIDE; |
| 29 virtual void ShowCursor(bool show) OVERRIDE; | 29 virtual void ShowCursor(bool show) OVERRIDE; |
| 30 virtual bool IsCursorVisible() const OVERRIDE; | 30 virtual bool IsCursorVisible() const OVERRIDE; |
| 31 virtual void SetDeviceScaleFactor(float device_scale_factor) OVERRIDE; | 31 virtual void SetDeviceScaleFactor(float device_scale_factor) OVERRIDE; |
| 32 virtual void LockCursor() OVERRIDE; | 32 virtual void LockCursor() OVERRIDE; |
| 33 virtual void UnlockCursor() OVERRIDE; | 33 virtual void UnlockCursor() OVERRIDE; |
| 34 | 34 |
| 35 private: | 35 private: |
| 36 aura::RootWindow* root_window_; | 36 aura::RootWindow* root_window_; |
| 37 scoped_ptr<ui::CursorLoader> cursor_loader_; | 37 scoped_ptr<ui::CursorLoader> cursor_loader_; |
| 38 | 38 |
| 39 gfx::NativeCursor current_cursor_; | 39 gfx::NativeCursor current_cursor_; |
| 40 bool cursor_visible_; | 40 bool cursor_visible_; |
| 41 | 41 |
| 42 DISALLOW_COPY_AND_ASSIGN(DesktopCursorClient); | 42 DISALLOW_COPY_AND_ASSIGN(DesktopCursorClient); |
| 43 }; | 43 }; |
| 44 | 44 |
| 45 } // namespace aura | 45 } // namespace aura |
| 46 | 46 |
| 47 #endif // UI_AURA_DESKTOP_DESKTOP_CURSOR_CLIENT_H_ | 47 #endif // UI_AURA_DESKTOP_DESKTOP_CURSOR_CLIENT_H_ |
| OLD | NEW |