Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(175)

Side by Side Diff: ash/wm/ash_cursor_platform_delegate.h

Issue 12263050: Rework ash::CursorManager into a corewm object, to share code with desktop. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: General patch cleanup. Created 7 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(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_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698