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

Unified Diff: ui/keyboard/resources/elements/kb-key.js

Issue 730573002: Remove dead code for system VK. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 1 month 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 | « ui/keyboard/resources/elements/kb-key.html ('k') | ui/keyboard/resources/elements/kb-key-base.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/keyboard/resources/elements/kb-key.js
diff --git a/ui/keyboard/resources/elements/kb-key.js b/ui/keyboard/resources/elements/kb-key.js
deleted file mode 100644
index 17ff1ae317acb3dbb026e4aaf8e08bef136a6af5..0000000000000000000000000000000000000000
--- a/ui/keyboard/resources/elements/kb-key.js
+++ /dev/null
@@ -1,114 +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.
-
-Polymer('kb-key', {
- /**
- * The background image to display on this key. Does not display an
- * image if this is the empty string.
- * @type {string}
- */
- image: "",
-
- /**
- * The background image size to use if an image is specified. The size
- * is provided as a string, for example, "50%".
- * @type {string}
- */
- imageSize: "",
-
- /**
- * Key codes have been deprecated in DOM3 key events, but are required
- * for legacy web content. The key codes depend on the position of the
- * key on the keyboard and is independent of which modifier keys (shift,
- * alt, ...) are active.
- * @type {number|undefined}
- */
- keyCode: undefined,
-
- /**
- * Name of the key as defined in the DOM3 specification for key events.
- * Like the keyCode, the keyName is independent of the state of the
- * modifier keys.
- * @type {string|undefined}
- */
- keyName: undefined,
-
- /**
- * Whether the shift key is pressed when producing the key value.
- * @type {boolean}
- */
- shiftModifier: false,
-
- /**
- * The sound to play when this key is pressed.
- * @type {Sound}
- */
- sound: Sound.DEFAULT,
-
- /**
- * Whether the key can be stretched to accomodate pixel rounding errors.
- */
- stretch: false,
-
- /**
- * Weighting to use for layout in order to properly size the key.
- * Keys with a high weighting are wider than normal keys.
- * @type {number}
- */
- weight: DEFAULT_KEY_WEIGHT,
-
- /**
- * Called when the image attribute changes. This is used to set the
- * background image of the key.
- * TODO(rsadam): Remove when polymer {{}} syntax regression is fixed.
- */
- imageChanged: function() {
- if (!this.image) {
- this.$.key.style.backgroundImage = "none";
- } else {
- // If no extension provided, default to svg.
- var image =
- this.image.split('.').length > 1 ? this.image : this.image + ".svg";
- this.$.key.style.backgroundImage =
- "url(images/" + image + ")";
- }
- },
-
- /**
- * Returns a subset of the key attributes.
- * @param {string} caller The id of the function that called
- * populateDetails.
- * @return {Object} Mapping of attributes for the key element.
- */
- populateDetails: function(caller) {
- var details = this.super([caller]);
- details.keyCode = this.keyCode;
- details.keyName = this.keyName;
- details.shiftModifier = this.shiftModifier;
- details.sound = this.sound;
- return details;
- },
-});
-;
-
-Polymer('kb-abc-key', {
- populateDetails: function(caller) {
- var detail = this.super([caller]);
- switch (caller) {
- case ('down'):
- detail.relegateToShift = true;
- break;
- default:
- break;
- }
- return detail;
- }
-});
-;
-
-Polymer('kb-hide-keyboard-key', {
- up: function(event) {
- hideKeyboard();
- },
-});
« no previous file with comments | « ui/keyboard/resources/elements/kb-key.html ('k') | ui/keyboard/resources/elements/kb-key-base.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698