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

Unified Diff: chrome/browser/extensions/api/input/input.cc

Issue 202993002: Fix "unreachable code" warnings (MSVC warning 4702) in chrome/browser/. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 6 years, 9 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: chrome/browser/extensions/api/input/input.cc
===================================================================
--- chrome/browser/extensions/api/input/input.cc (revision 256983)
+++ chrome/browser/extensions/api/input/input.cc (working copy)
@@ -37,9 +37,10 @@
EXTENSION_FUNCTION_VALIDATE(args_->GetString(0, &text));
return keyboard::InsertText(text, ash::Shell::GetPrimaryRootWindow());
-#endif
+#else
error_ = kNotYetImplementedError;
return false;
+#endif
}
bool VirtualKeyboardPrivateMoveCursorFunction::RunImpl() {
@@ -59,9 +60,10 @@
swipe_direction,
modifier_flags,
ash::Shell::GetPrimaryRootWindow()->GetHost()->dispatcher());
-#endif
+#else
error_ = kNotYetImplementedError;
return false;
+#endif
}
bool VirtualKeyboardPrivateSendKeyEventFunction::RunImpl() {
@@ -90,9 +92,10 @@
key_name,
modifiers,
ash::Shell::GetPrimaryRootWindow()->GetHost()->dispatcher());
-#endif
+#else
error_ = kNotYetImplementedError;
return false;
+#endif
}
bool VirtualKeyboardPrivateHideKeyboardFunction::RunImpl() {
@@ -109,9 +112,10 @@
keyboard::KeyboardController::HIDE_REASON_MANUAL);
return true;
-#endif
+#else
error_ = kNotYetImplementedError;
return false;
+#endif
}
bool VirtualKeyboardPrivateLockKeyboardFunction::RunImpl() {
@@ -119,13 +123,12 @@
#if defined(USE_ASH)
bool lock;
EXTENSION_FUNCTION_VALIDATE(args_->GetBoolean(0, &lock));
-
ash::Shell::GetInstance()->keyboard_controller()->set_lock_keyboard(lock);
-
return true;
-#endif
+#else
error_ = kNotYetImplementedError;
return false;
+#endif
}
bool VirtualKeyboardPrivateKeyboardLoadedFunction::RunImpl() {
@@ -132,13 +135,12 @@
DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::UI));
#if defined(USE_ASH)
keyboard::MarkKeyboardLoadFinished();
-
base::UserMetricsAction("VirtualKeyboardLoaded");
-
return true;
-#endif
+#else
error_ = kNotYetImplementedError;
return false;
+#endif
}
bool VirtualKeyboardPrivateGetKeyboardConfigFunction::RunImpl() {
@@ -149,9 +151,10 @@
results->SetBoolean("a11ymode", keyboard::GetAccessibilityKeyboardEnabled());
SetResult(results);
return true;
-#endif
+#else
error_ = kNotYetImplementedError;
return false;
+#endif
}
InputAPI::InputAPI(content::BrowserContext* context) {}

Powered by Google App Engine
This is Rietveld 408576698