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

Unified Diff: ui/keyboard/resources/keyboard_mojo.js

Issue 980353002: Remove unused keyboard_mojo.js (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/keyboard/resources/keyboard_mojo.js
diff --git a/ui/keyboard/resources/keyboard_mojo.js b/ui/keyboard/resources/keyboard_mojo.js
deleted file mode 100644
index 1ec9e5dc35b8c8ea76344522d6a69f080009744d..0000000000000000000000000000000000000000
--- a/ui/keyboard/resources/keyboard_mojo.js
+++ /dev/null
@@ -1,85 +0,0 @@
-// Copyright 2014 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-var connection;
-var mojo_api;
-var input_focused_event;
-
-if (!chrome.virtualKeyboardPrivate) {
- define('main', [
- 'mojo/public/js/connection',
- 'ui/keyboard/webui/keyboard.mojom',
- 'content/public/renderer/service_provider',
- ], function(connector, keyboard, serviceProvider) {
- 'use strict';
- function TextInputTypeObserverImpl(kbd) {
- console.log('Creating TextInputTypeObserverImpl');
- this.keyboard_ = kbd;
- mojo_api = this;
- mojo_api.setTextInputTypeObserver(
- connection.bindImpl(this, keyboard.TextInputTypeObserver));
- }
-
- TextInputTypeObserverImpl.prototype = Object.create(
- keyboard.KeyboardAPI.stubClass.prototype);
-
- TextInputTypeObserverImpl.prototype.onTextInputTypeChanged =
- function(input_type) {
- console.log('Text input changed: ' + input_type);
- input_focused_event.forEach(function(listener) {
- listener({type: input_type});
- });
- };
-
- return function() {
- const KBDApi = keyboard.KeyboardUIHandlerMojo;
- new TextInputObserverImpl(connection.bindHandleToProxy(
- serviceProvider.connectToService(KBDApi.name),
- KBDApi));
- };
- });
-
- chrome.virtualKeyboardPrivate = {};
- chrome.virtualKeyboardPrivate.sendKeyEvent = function(event) {
- if (!mojo_api)
- return;
- console.log('sending key event: ' + event.type);
- mojo_api.keyboard_.sendKeyEvent(event.type,
- event.charValue,
- event.keyCode,
- event.keyName,
- event.modifiers);
- };
- chrome.virtualKeyboardPrivate.hideKeyboard = function() {
- if (!mojo_api)
- return;
- mojo_api.keyboard_.hideKeyboard();
- };
- chrome.virtualKeyboardPrivate.moveCursor = function() {};
- chrome.virtualKeyboardPrivate.lockKeyboard = function() {};
- chrome.virtualKeyboardPrivate.keyboardLoaded = function() {};
- chrome.virtualKeyboardPrivate.getKeyboardConfig = function(callback) {
- callback({
- layout: 'qwerty',
- a11ymode: false,
- experimental: false,
- features: []
- });
- };
-
- function BrowserEvent() {
- this.listeners_ = [];
- };
-
- BrowserEvent.prototype.addListener = function(callback) {
- this.listeners_.push(callback);
- };
-
- BrowserEvent.prototype.forEach = function(callback) {
- for (var i = 0; i < this.listeners_.length; ++i)
- callback(this.listeners_[i]);
- };
-
- input_focused_event = new BrowserEvent;
- chrome.virtualKeyboardPrivate.onTextInputBoxFocused = input_focused_event;
-}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698