forked from chromium/chromium
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcursor_manager_test_api.cc
39 lines (29 loc) · 1.22 KB
/
cursor_manager_test_api.cc
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
// Copyright (c) 2012 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.
#include "ash/wm/cursor_manager_test_api.h"
#include "ash/shell.h"
#include "ash/shell_test_api.h"
#include "ash/wm/native_cursor_manager_ash.h"
#include "ui/base/cursor/image_cursors.h"
#include "ui/display/display.h"
#include "ui/wm/core/cursor_manager.h"
namespace ash {
CursorManagerTestApi::CursorManagerTestApi(::wm::CursorManager* cursor_manager)
: cursor_manager_(cursor_manager) {}
CursorManagerTestApi::~CursorManagerTestApi() = default;
// TODO(tdanderson): CursorManagerTestApi may no longer be needed.
ui::CursorSize CursorManagerTestApi::GetCurrentCursorSize() const {
return cursor_manager_->GetCursorSize();
}
gfx::NativeCursor CursorManagerTestApi::GetCurrentCursor() const {
return cursor_manager_->GetCursor();
}
display::Display::Rotation CursorManagerTestApi::GetCurrentCursorRotation()
const {
return ShellTestApi(Shell::Get()).native_cursor_manager_ash()->GetRotation();
}
float CursorManagerTestApi::GetCurrentCursorScale() const {
return ShellTestApi(Shell::Get()).native_cursor_manager_ash()->GetScale();
}
} // namespace ash