From 69be2dee4150d0773335874cf711be0b5fa97623 Mon Sep 17 00:00:00 2001 From: Benjamin Lerman Date: Thu, 22 Jan 2015 10:19:09 +0100 Subject: [PATCH] Adding keyboard service. This allows to show the soft keyboard on Android. Also updated platform_viewport_android to dispatch key events. R=abarth@chromium.org BUG=449002 Review URL: https://codereview.chromium.org/856063002 --- engine/core/BUILD.gn | 1 + framework/sky-input.sky | 14 +++++++++++++- viewer/document_view.cc | 2 ++ 3 files changed, 16 insertions(+), 1 deletion(-) diff --git a/engine/core/BUILD.gn b/engine/core/BUILD.gn index afb5dfe038d..54a92a669a6 100644 --- a/engine/core/BUILD.gn +++ b/engine/core/BUILD.gn @@ -23,6 +23,7 @@ source_set("libraries") { "//mojo/public/cpp/system", "//mojo/public/cpp/utility", "//mojo/public/interfaces/application", + "//mojo/services/keyboard/public/interfaces", "//mojo/services/navigation/public/interfaces", "//mojo/services/view_manager/public/cpp", "//skia", diff --git a/framework/sky-input.sky b/framework/sky-input.sky index 9ad21fb988a..9ebbaedbf60 100644 --- a/framework/sky-input.sky +++ b/framework/sky-input.sky @@ -3,7 +3,9 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. --> + + diff --git a/viewer/document_view.cc b/viewer/document_view.cc index cf48567326b..8125379b263 100644 --- a/viewer/document_view.cc +++ b/viewer/document_view.cc @@ -126,6 +126,8 @@ void DocumentView::OnEmbed( // TODO(abarth): We should ask the view whether it is focused instead of // assuming that we're focused. web_view_->setFocus(true); + // Needed on android, as the window does not get the focus otherwise. + root_->SetFocus(); root_->AddObserver(this); }