Move render_view_context_menu.* and related files out of tab_contents.
[chromium-blink-merge.git] / ash / wm / ash_native_cursor_manager.h
blob6a1e450e830eff55ce538ff1426e8a1b317c2cc9
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.
5 #ifndef ASH_WM_ASH_NATIVE_CURSOR_MANAGER_H_
6 #define ASH_WM_ASH_NATIVE_CURSOR_MANAGER_H_
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 "base/strings/string16.h"
13 #include "ui/gfx/native_widget_types.h"
14 #include "ui/gfx/point.h"
15 #include "ui/views/corewm/native_cursor_manager.h"
16 #include "ui/views/corewm/native_cursor_manager_delegate.h"
18 namespace ash {
20 namespace test {
21 class CursorManagerTestApi;
24 class ImageCursors;
26 // This does the ash-specific setting of cursor details like cursor
27 // visibility. It communicates back with the CursorManager through the
28 // NativeCursorManagerDelegate interface, which receives messages about what
29 // changes were acted on.
30 class ASH_EXPORT AshNativeCursorManager
31 : public views::corewm::NativeCursorManager {
32 public:
33 AshNativeCursorManager();
34 virtual ~AshNativeCursorManager();
36 // Toggle native cursor enabled/disabled.
37 // The native cursor is enabled by default. When disabled, we hide the native
38 // cursor regardless of visibility state, and let CursorWindowManager draw
39 // the cursor.
40 void SetNativeCursorEnabled(bool enabled);
42 private:
43 friend class test::CursorManagerTestApi;
45 // Overridden from views::corewm::NativeCursorManager:
46 virtual void SetDisplay(
47 const gfx::Display& display,
48 views::corewm::NativeCursorManagerDelegate* delegate) OVERRIDE;
49 virtual void SetCursor(
50 gfx::NativeCursor cursor,
51 views::corewm::NativeCursorManagerDelegate* delegate) OVERRIDE;
52 virtual void SetVisibility(
53 bool visible,
54 views::corewm::NativeCursorManagerDelegate* delegate) OVERRIDE;
55 virtual void SetScale(
56 float scale,
57 views::corewm::NativeCursorManagerDelegate* delegate) OVERRIDE;
58 virtual void SetCursorSet(
59 ui::CursorSetType cursor_set,
60 views::corewm::NativeCursorManagerDelegate* delegate) OVERRIDE;
61 virtual void SetMouseEventsEnabled(
62 bool enabled,
63 views::corewm::NativeCursorManagerDelegate* delegate) OVERRIDE;
65 // The cursor location where the cursor was disabled.
66 gfx::Point disabled_cursor_location_;
68 bool native_cursor_enabled_;
70 scoped_ptr<ImageCursors> image_cursors_;
72 DISALLOW_COPY_AND_ASSIGN(AshNativeCursorManager);
75 } // namespace ash
77 #endif // ASH_WM_ASH_NATIVE_CURSOR_MANAGER_H_