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

Unified Diff: ash/wm/native_cursor_manager_ash_classic.cc

Issue 2932563002: Implement cursor changing on Mushrome (Closed)
Patch Set: oshima patch take 2 Created 3 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ash/wm/native_cursor_manager_ash_classic.h ('k') | ash/wm/native_cursor_manager_ash_interactive_uitest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/wm/native_cursor_manager_ash_classic.cc
diff --git a/ash/wm/ash_native_cursor_manager.cc b/ash/wm/native_cursor_manager_ash_classic.cc
similarity index 85%
copy from ash/wm/ash_native_cursor_manager.cc
copy to ash/wm/native_cursor_manager_ash_classic.cc
index 45a3ef82f59b4d8ffeabbd7e72ab466b331897da..8b5112c9698f9ab9912a52ac4d4c5860b244b644 100644
--- a/ash/wm/ash_native_cursor_manager.cc
+++ b/ash/wm/native_cursor_manager_ash_classic.cc
@@ -1,8 +1,8 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Copyright 2017 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/ash_native_cursor_manager.h"
+#include "ash/wm/native_cursor_manager_ash_classic.h"
#include "ash/display/cursor_window_controller.h"
#include "ash/display/window_tree_host_manager.h"
@@ -52,19 +52,27 @@ void NotifyMouseEventsEnableStateChange(bool enabled) {
} // namespace
-AshNativeCursorManager::AshNativeCursorManager()
+NativeCursorManagerAshClassic::NativeCursorManagerAshClassic()
: native_cursor_enabled_(true), image_cursors_(new ui::ImageCursors) {}
-AshNativeCursorManager::~AshNativeCursorManager() {}
+NativeCursorManagerAshClassic::~NativeCursorManagerAshClassic() {}
-void AshNativeCursorManager::SetNativeCursorEnabled(bool enabled) {
+void NativeCursorManagerAshClassic::SetNativeCursorEnabled(bool enabled) {
native_cursor_enabled_ = enabled;
::wm::CursorManager* cursor_manager = Shell::Get()->cursor_manager();
SetCursor(cursor_manager->GetCursor(), cursor_manager);
}
-void AshNativeCursorManager::SetDisplay(
+float NativeCursorManagerAshClassic::GetScale() const {
+ return image_cursors_->GetScale();
+}
+
+display::Display::Rotation NativeCursorManagerAshClassic::GetRotation() const {
+ return image_cursors_->GetRotation();
+}
+
+void NativeCursorManagerAshClassic::SetDisplay(
const display::Display& display,
::wm::NativeCursorManagerDelegate* delegate) {
DCHECK(display.is_valid());
@@ -87,7 +95,7 @@ void AshNativeCursorManager::SetDisplay(
->SetDisplay(display);
}
-void AshNativeCursorManager::SetCursor(
+void NativeCursorManagerAshClassic::SetCursor(
gfx::NativeCursor cursor,
::wm::NativeCursorManagerDelegate* delegate) {
if (native_cursor_enabled_) {
@@ -111,7 +119,7 @@ void AshNativeCursorManager::SetCursor(
SetCursorOnAllRootWindows(cursor);
}
-void AshNativeCursorManager::SetCursorSet(
+void NativeCursorManagerAshClassic::SetCursorSet(
ui::CursorSetType cursor_set,
::wm::NativeCursorManagerDelegate* delegate) {
image_cursors_->SetCursorSet(cursor_set);
@@ -127,7 +135,7 @@ void AshNativeCursorManager::SetCursorSet(
->SetCursorSet(cursor_set);
}
-void AshNativeCursorManager::SetVisibility(
+void NativeCursorManagerAshClassic::SetVisibility(
bool visible,
::wm::NativeCursorManagerDelegate* delegate) {
delegate->CommitVisibility(visible);
@@ -143,7 +151,7 @@ void AshNativeCursorManager::SetVisibility(
NotifyCursorVisibilityChange(visible);
}
-void AshNativeCursorManager::SetMouseEventsEnabled(
+void NativeCursorManagerAshClassic::SetMouseEventsEnabled(
bool enabled,
::wm::NativeCursorManagerDelegate* delegate) {
delegate->CommitMouseEventsEnabled(enabled);
« no previous file with comments | « ash/wm/native_cursor_manager_ash_classic.h ('k') | ash/wm/native_cursor_manager_ash_interactive_uitest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698