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

Side by Side Diff: ui/views/widget/desktop_aura/desktop_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, 9 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 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
OLDNEW
« no previous file with comments | « ui/views/widget/desktop_aura/desktop_cursor_client.cc ('k') | ui/views/widget/desktop_aura/desktop_native_cursor_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698