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

Side by Side Diff: ash/wm/ash_native_cursor_manager.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: Rebase to ToT 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
« no previous file with comments | « ash/tooltips/tooltip_controller_unittest.cc ('k') | ash/wm/ash_native_cursor_manager.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_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_
OLDNEW
« no previous file with comments | « ash/tooltips/tooltip_controller_unittest.cc ('k') | ash/wm/ash_native_cursor_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698