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

Unified Diff: chrome/browser/android/vr_shell/ui_interface.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/ui_interface.cc
diff --git a/chrome/browser/android/vr_shell/ui_interface.cc b/chrome/browser/android/vr_shell/ui_interface.cc
index 6d021b5bf2f876a48614d679880901cc6fa95b7b..78d3e5d83ebd1dfd5f2cac8097a31feef299ff5b 100644
--- a/chrome/browser/android/vr_shell/ui_interface.cc
+++ b/chrome/browser/android/vr_shell/ui_interface.cc
@@ -4,6 +4,7 @@
#include "chrome/browser/android/vr_shell/ui_interface.h"
+#include "chrome/browser/android/vr_shell/vr_omnibox.h"
#include "chrome/browser/ui/webui/vr_shell/vr_shell_ui_message_handler.h"
#include "url/gurl.h"
@@ -12,6 +13,8 @@ namespace vr_shell {
UiInterface::UiInterface(Mode initial_mode, bool fullscreen) {
SetMode(initial_mode);
SetFullscreen(fullscreen);
+
+ omnibox_.reset(new VrOmnibox(this));
}
UiInterface::~UiInterface() {}
@@ -31,6 +34,16 @@ void UiInterface::SetFullscreen(bool enabled) {
FlushModeState();
}
+void UiInterface::HandleOmniboxInput(const base::DictionaryValue& input) {
+ omnibox_->HandleInput(input);
+}
+
+void UiInterface::SetOmniboxSuggestions(
+ std::unique_ptr<base::Value> suggestions) {
+ updates_.Set("suggestions", std::move(suggestions));
+ FlushUpdates();
+}
+
void UiInterface::FlushModeState() {
updates_.SetInteger("mode", static_cast<int>(mode_));
updates_.SetBoolean("menuMode", menu_mode_);

Powered by Google App Engine
This is Rietveld 408576698