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

Unified Diff: ash/host/ash_window_tree_host_x11.cc

Issue 2689143002: ash: Remove OS_CHROMEOS ifdefs from accelerator files (Closed)
Patch Set: rebase Created 3 years, 10 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/host/ash_window_tree_host_x11.h ('k') | ash/host/ash_window_tree_host_x11_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/host/ash_window_tree_host_x11.cc
diff --git a/ash/host/ash_window_tree_host_x11.cc b/ash/host/ash_window_tree_host_x11.cc
index e4bf38400b4ebdf9b6faa2b17cdddc750f7abb3a..6010b03c8bedce963b1bca96eea05a206aecc868 100644
--- a/ash/host/ash_window_tree_host_x11.cc
+++ b/ash/host/ash_window_tree_host_x11.cc
@@ -147,9 +147,7 @@ void AshWindowTreeHostX11::UpdateRootWindowSizeInPixels(
}
void AshWindowTreeHostX11::OnCursorVisibilityChangedNative(bool show) {
-#if defined(OS_CHROMEOS)
SetCrOSTapPaused(!show);
-#endif
}
void AshWindowTreeHostX11::OnWindowInitialized(aura::Window* window) {}
@@ -158,11 +156,9 @@ void AshWindowTreeHostX11::OnHostInitialized(aura::WindowTreeHost* host) {
if (host != AsWindowTreeHost())
return;
-#if defined(OS_CHROMEOS)
// We have to enable Tap-to-click by default because the cursor is set to
// visible in Shell::InitRootWindowController.
SetCrOSTapPaused(false);
-#endif
}
void AshWindowTreeHostX11::OnConfigureNotify() {
@@ -186,7 +182,6 @@ bool AshWindowTreeHostX11::CanDispatchEvent(const ui::PlatformEvent& event) {
case ui::ET_TOUCH_PRESSED:
case ui::ET_TOUCH_CANCELLED:
case ui::ET_TOUCH_RELEASED: {
-#if defined(OS_CHROMEOS)
XIDeviceEvent* xiev = static_cast<XIDeviceEvent*>(xev->xcookie.data);
int64_t touch_display_id =
ui::DeviceDataManager::GetInstance()->GetTargetDisplayForTouchDevice(
@@ -205,13 +200,13 @@ bool AshWindowTreeHostX11::CanDispatchEvent(const ui::PlatformEvent& event) {
display::Display display = screen->GetDisplayNearestWindow(window());
return touch_display_id == display.id();
}
-#endif // defined(OS_CHROMEOS)
return true;
}
default:
return true;
}
}
+
void AshWindowTreeHostX11::TranslateAndDispatchLocatedEvent(
ui::LocatedEvent* event) {
TranslateLocatedEvent(event);
@@ -228,7 +223,6 @@ ui::EventDispatchDetails AshWindowTreeHostX11::DispatchKeyEventPostIME(
return details;
}
-#if defined(OS_CHROMEOS)
void AshWindowTreeHostX11::SetCrOSTapPaused(bool state) {
if (!ui::IsXInput2Available())
return;
@@ -256,6 +250,5 @@ void AshWindowTreeHostX11::SetCrOSTapPaused(bool state) {
}
}
}
-#endif // defined(OS_CHROMEOS)
} // namespace ash
« no previous file with comments | « ash/host/ash_window_tree_host_x11.h ('k') | ash/host/ash_window_tree_host_x11_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698