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

Unified Diff: ui/keyboard/keyboard_controller.cc

Issue 2807833002: [views-mus] Prevent creating a native OzonePlatform in mus tests. (Closed)
Patch Set: sky comments Created 3 years, 8 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
Index: ui/keyboard/keyboard_controller.cc
diff --git a/ui/keyboard/keyboard_controller.cc b/ui/keyboard/keyboard_controller.cc
index e0912a72d1b8c9fdec50c2ded0d21086bd688b3e..d56eb1d74145744b71b24ee0c0c0e3be46340a3a 100644
--- a/ui/keyboard/keyboard_controller.cc
+++ b/ui/keyboard/keyboard_controller.cc
@@ -96,9 +96,10 @@ class KeyboardWindowDelegate : public aura::WindowDelegate {
void ToggleTouchEventLogging(bool enable) {
#if defined(OS_CHROMEOS)
#if defined(USE_OZONE)
- ui::OzonePlatform::GetInstance()
- ->GetInputController()
- ->SetTouchEventLoggingEnabled(enable);
+ ui::InputController* controller =
+ ui::OzonePlatform::GetInstance()->GetInputController();
+ if (controller)
+ controller->SetTouchEventLoggingEnabled(enable);
#elif defined(USE_X11)
if (!base::SysInfo::IsRunningOnChromeOS())
return;

Powered by Google App Engine
This is Rietveld 408576698