summaryrefslogtreecommitdiffstats
path: root/ash/wm/cursor_manager_chromeos.h
blob: e1b4515fcba39cc06fd7d0f3d8e88c5b9b95c9aa (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
// Copyright 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef ASH_WM_CURSOR_MANAGER_CHROMEOS_H_
#define ASH_WM_CURSOR_MANAGER_CHROMEOS_H_

#include "ash/ash_export.h"
#include "base/compiler_specific.h"
#include "base/macros.h"
#include "base/memory/scoped_ptr.h"
#include "ui/wm/core/cursor_manager.h"
#include "ui/wm/core/native_cursor_manager_delegate.h"

namespace ui {
class KeyEvent;
}

namespace wm {
class NativeCursorManager;
}

namespace ash {

// This class overrides the cursor hiding behaviour on ChromeOS. The cursor is
// hidden on certain key events only if the accessibility keyboard is not
// enabled.
class ASH_EXPORT CursorManager : public ::wm::CursorManager {
 public:
  explicit CursorManager(
      scoped_ptr< ::wm::NativeCursorManager> delegate);
  ~CursorManager() override;

  // aura::client::CursorClient:
  bool ShouldHideCursorOnKeyEvent(const ui::KeyEvent& event) const override;

 private:
  DISALLOW_COPY_AND_ASSIGN(CursorManager);
};

}  // namespace ash

#endif  // ASH_WM_CURSOR_MANAGER_CHROMEOS_H_