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

Unified Diff: third_party/polymer/components-chromium/core-dropdown/core-dropdown-base-extracted.js

Issue 1215543002: Remove Polymer 0.5. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix unit test Created 5 years, 6 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
Index: third_party/polymer/components-chromium/core-dropdown/core-dropdown-base-extracted.js
diff --git a/third_party/polymer/components-chromium/core-dropdown/core-dropdown-base-extracted.js b/third_party/polymer/components-chromium/core-dropdown/core-dropdown-base-extracted.js
deleted file mode 100644
index dd33d67aab58a07cec8521e6e141ebb292ba372b..0000000000000000000000000000000000000000
--- a/third_party/polymer/components-chromium/core-dropdown/core-dropdown-base-extracted.js
+++ /dev/null
@@ -1,89 +0,0 @@
-
-
- Polymer('core-dropdown-base',{
-
- publish: {
-
- /**
- * True if the menu is open.
- *
- * @attribute opened
- * @type boolean
- * @default false
- */
- opened: false
-
- },
-
- eventDelegates: {
- 'tap': 'toggleOverlay'
- },
-
- overlayListeners: {
- 'core-overlay-open': 'openAction'
- },
-
- get dropdown() {
- if (!this._dropdown) {
- this._dropdown = this.querySelector('.dropdown');
- for (var l in this.overlayListeners) {
- this.addElementListener(this._dropdown, l, this.overlayListeners[l]);
- }
- }
- return this._dropdown;
- },
-
- attached: function() {
- // find the dropdown on attach
- // FIXME: Support MO?
- this.dropdown;
- },
-
- addElementListener: function(node, event, methodName, capture) {
- var fn = this._makeBoundListener(methodName);
- if (node && fn) {
- Polymer.addEventListener(node, event, fn, capture);
- }
- },
-
- removeElementListener: function(node, event, methodName, capture) {
- var fn = this._makeBoundListener(methodName);
- if (node && fn) {
- Polymer.removeEventListener(node, event, fn, capture);
- }
- },
-
- _makeBoundListener: function(methodName) {
- var self = this, method = this[methodName];
- if (!method) {
- return;
- }
- var bound = '_bound' + methodName;
- if (!this[bound]) {
- this[bound] = function(e) {
- method.call(self, e);
- };
- }
- return this[bound];
- },
-
- openedChanged: function() {
- if (this.disabled) {
- return;
- }
- var dropdown = this.dropdown;
- if (dropdown) {
- dropdown.opened = this.opened;
- }
- },
-
- openAction: function(e) {
- this.opened = !!e.detail;
- },
-
- toggleOverlay: function() {
- this.opened = !this.opened;
- }
-
- });
-

Powered by Google App Engine
This is Rietveld 408576698