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

Unified Diff: ui/keyboard/resources/elements/kb-altkey.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
Index: ui/keyboard/resources/elements/kb-altkey.js
diff --git a/ui/keyboard/resources/elements/kb-altkey.js b/ui/keyboard/resources/elements/kb-altkey.js
deleted file mode 100644
index ee70a5e1ada042d6cf26b64a83eca8de42bd40b3..0000000000000000000000000000000000000000
--- a/ui/keyboard/resources/elements/kb-altkey.js
+++ /dev/null
@@ -1,52 +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.
-
-/**
- * Filter out mouse/touch movements internal to this node. When moving
- * inside a node, the event should be filter out.
- * @param {Node} node The accent key node which receives event.
- * @param {event} event A pointer move event.
- * @return {boolean} True if event is external to node.
- */
- function isRelevantEvent(node, event) {
- return !(node.compareDocumentPosition(event.relatedTarget)
- & Node.DOCUMENT_POSITION_CONTAINED_BY);
-};
-Polymer('kb-altkey', {
- over: function(event) {
- if (isRelevantEvent(this, event)) {
- // Dragging over an accent key is equivalent to pressing on the accent
- // key.
- this.fire('key-down', {});
- }
- },
-
- out: function(event) {
- if (isRelevantEvent(this, event)) {
- this.classList.remove('active');
- }
- },
-
- up: function(event) {
- var detail = {
- char: this.charValue
- };
- this.fire('key-up', detail);
- },
-
- // TODO(bshe): kb-altkey should extend from kb-key-base.
- autoRelease: function() {
- },
-
- /**
- * Character value associated with the key. Typically, the value is a
- * single character, but may be multi-character in cases like a ".com"
- * button.
- * @return {string}
- */
- get charValue() {
- return this.char || this.textContent;
- }
-});
-
« no previous file with comments | « ui/keyboard/resources/elements/kb-altkey.html ('k') | ui/keyboard/resources/elements/kb-altkey-container.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698