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

Unified Diff: chrome/browser/android/vr_shell/vr_shell.cc

Issue 2647053002: Add initial VR interactive omnibox. (Closed)
Patch Set: 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
Index: chrome/browser/android/vr_shell/vr_shell.cc
diff --git a/chrome/browser/android/vr_shell/vr_shell.cc b/chrome/browser/android/vr_shell/vr_shell.cc
index a4c520d03e728c48ca7363ddab886cb614b9387c..4cb0fbbb55d4390b8bbfbfab9f41668c85714352 100644
--- a/chrome/browser/android/vr_shell/vr_shell.cc
+++ b/chrome/browser/android/vr_shell/vr_shell.cc
@@ -397,15 +397,26 @@ void VrShell::DoUiAction(const UiAction action,
case RELOAD:
controller.Reload(content::ReloadType::NORMAL, false);
break;
+ case LOAD_URL: {
+ std::string url_string;
+ CHECK(arguments->GetString("url", &url_string));
+ GURL url(url_string);
+ // TODO(cjgrant): Sanitize the URL and prefix, and pass the proper
+ // transition type down from the UI.
bshe 2017/01/23 16:24:37 nit: perhaps create a crbug to track this
cjgrant 2017/01/24 15:31:39 Done.
+ controller.LoadURL(url, content::Referrer(),
+ ui::PageTransition::PAGE_TRANSITION_AUTO_TOPLEVEL,
+ std::string(""));
+ break;
+ }
+ case OMNIBOX_CONTENT:
asimjour1 2017/01/23 18:25:59 nit: OMNIBOX_CONTENT doesn't sound like an action.
cjgrant 2017/01/24 15:31:39 I agree, but I'm not sure of the best way to addre
+ html_interface_->HandleOmniboxInput(*arguments);
+ break;
case KEY_EVENT: {
int char_value;
int modifiers;
-
CHECK(arguments->GetInteger("modifiers", &modifiers));
CHECK(arguments->GetInteger("charValue", &char_value));
-
ui_input_manager_->ProcessKeyboardEvent(char_value, modifiers);
-
break;
}
#if defined(ENABLE_VR_SHELL_UI_DEV)

Powered by Google App Engine
This is Rietveld 408576698