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

Unified Diff: ash/wm/ash_native_cursor_manager.cc

Issue 2618143002: cros: Remove some OS platform ifdefs from ash (Closed)
Patch Set: rebase Created 3 years, 11 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/utility/screenshot_controller_unittest.cc ('k') | ash/wm/immersive_fullscreen_controller_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/wm/ash_native_cursor_manager.cc
diff --git a/ash/wm/ash_native_cursor_manager.cc b/ash/wm/ash_native_cursor_manager.cc
index 3ab68949ae54694ca3cf05bd71fc85bbc27998b2..d79bd5d0af84cb54b780dc2404d4d776b3b381f5 100644
--- a/ash/wm/ash_native_cursor_manager.cc
+++ b/ash/wm/ash_native_cursor_manager.cc
@@ -24,12 +24,11 @@ void SetCursorOnAllRootWindows(gfx::NativeCursor cursor) {
for (aura::Window::Windows::iterator iter = root_windows.begin();
iter != root_windows.end(); ++iter)
(*iter)->GetHost()->SetCursor(cursor);
-#if defined(OS_CHROMEOS)
+
Shell::GetInstance()
->window_tree_host_manager()
->cursor_window_controller()
->SetCursor(cursor);
-#endif
}
void NotifyCursorVisibilityChange(bool visible) {
@@ -38,12 +37,11 @@ void NotifyCursorVisibilityChange(bool visible) {
for (aura::Window::Windows::iterator iter = root_windows.begin();
iter != root_windows.end(); ++iter)
(*iter)->GetHost()->OnCursorVisibilityChanged(visible);
-#if defined(OS_CHROMEOS)
+
Shell::GetInstance()
->window_tree_host_manager()
->cursor_window_controller()
->SetVisibility(visible);
-#endif
}
void NotifyMouseEventsEnableStateChange(bool enabled) {
@@ -79,22 +77,17 @@ void AshNativeCursorManager::SetDisplay(
->display_manager()
->GetDisplayInfo(display.id())
.device_scale_factor();
-#if defined(OS_CHROMEOS)
// And use the nearest resource scale factor.
const float cursor_scale =
ui::GetScaleForScaleFactor(ui::GetSupportedScaleFactor(original_scale));
-#else
- // TODO(oshima): crbug.com/143619
- const float cursor_scale = original_scale;
-#endif
+
if (image_cursors_->SetDisplay(display, cursor_scale))
SetCursor(delegate->GetCursor(), delegate);
-#if defined(OS_CHROMEOS)
+
Shell::GetInstance()
->window_tree_host_manager()
->cursor_window_controller()
->SetDisplay(display);
-#endif
}
void AshNativeCursorManager::SetCursor(
@@ -131,12 +124,10 @@ void AshNativeCursorManager::SetCursorSet(
if (delegate->IsCursorVisible())
SetCursor(delegate->GetCursor(), delegate);
-#if defined(OS_CHROMEOS)
Shell::GetInstance()
->window_tree_host_manager()
->cursor_window_controller()
->SetCursorSet(cursor_set);
-#endif
}
void AshNativeCursorManager::SetVisibility(
« no previous file with comments | « ash/utility/screenshot_controller_unittest.cc ('k') | ash/wm/immersive_fullscreen_controller_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698