Commit 9b42603e authored by sadrul@chromium.org's avatar sadrul@chromium.org

athena: Provide a temporary onTextInputBoxFocused.addListener implementation.

The virtual keyboard bindings will be provided by mojo soon. Until then, this is
a temporary hack to provide an implementation for the missing API. The virtual
keyboard shows up in athena with this last change.

BUG=380215
R=bshe@chromium.org, oshima@chromium.org

Review URL: https://codereview.chromium.org/348823003

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@278841 0039d316-1c4b-4281-b951-d872f2087c98
parent 862611f3
...@@ -106,6 +106,17 @@ class VKBindings : public gin::Wrappable<VKBindings> { ...@@ -106,6 +106,17 @@ class VKBindings : public gin::Wrappable<VKBindings> {
return; return;
chrome->Set(gin::StringToSymbol(isolate, "virtualKeyboardPrivate"), chrome->Set(gin::StringToSymbol(isolate, "virtualKeyboardPrivate"),
controller.ToV8()); controller.ToV8());
const std::string kInputBoxFocusedEvent =
"chrome.virtualKeyboardPrivate.onTextInputBoxFocused = {};"
"chrome.virtualKeyboardPrivate.onTextInputBoxFocused.addListener = "
" function(callback) { "
" window.setTimeout(function() {"
" callback({type: 'text'});"
" }, 100);"
" };";
render_view->GetMainRenderFrame()->ExecuteJavaScript(
base::UTF8ToUTF16(kInputBoxFocusedEvent));
} }
private: private:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment