| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 function PromiseResolver() { | 4 function PromiseResolver() { |
| 5 this.resolve_; | 5 this.resolve_; |
| 6 this.reject_; | 6 this.reject_; |
| 7 this.promise_ = new Promise(function(resolve, reject) { | 7 this.promise_ = new Promise(function(resolve, reject) { |
| 8 this.resolve_ = resolve; | 8 this.resolve_ = resolve; |
| 9 this.reject_ = reject; | 9 this.reject_ = reject; |
| 10 }.bind(this)); | 10 }.bind(this)); |
| (...skipping 8524 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8535 Polymer({ | 8535 Polymer({ |
| 8536 is: 'iron-selector', | 8536 is: 'iron-selector', |
| 8537 behaviors: [ Polymer.IronMultiSelectableBehavior ] | 8537 behaviors: [ Polymer.IronMultiSelectableBehavior ] |
| 8538 }); | 8538 }); |
| 8539 | 8539 |
| 8540 // Copyright 2016 The Chromium Authors. All rights reserved. | 8540 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 8541 // Use of this source code is governed by a BSD-style license that can be | 8541 // Use of this source code is governed by a BSD-style license that can be |
| 8542 // found in the LICENSE file. | 8542 // found in the LICENSE file. |
| 8543 Polymer({ | 8543 Polymer({ |
| 8544 is: 'history-side-bar', | 8544 is: 'history-side-bar', |
| 8545 behaviors: [ Polymer.IronA11yKeysBehavior ], |
| 8545 properties: { | 8546 properties: { |
| 8546 selectedPage: { | 8547 selectedPage: { |
| 8547 type: String, | 8548 type: String, |
| 8548 notify: true | 8549 notify: true |
| 8549 }, | 8550 }, |
| 8550 route: Object, | 8551 route: Object, |
| 8551 showFooter: Boolean, | 8552 showFooter: Boolean, |
| 8552 drawer: { | 8553 drawer: { |
| 8553 type: Boolean, | 8554 type: Boolean, |
| 8554 reflectToAttribute: true | 8555 reflectToAttribute: true |
| 8555 } | 8556 } |
| 8556 }, | 8557 }, |
| 8558 keyBindings: { |
| 8559 'space:keydown': 'onSpacePressed_' |
| 8560 }, |
| 8561 onSpacePressed_: function(e) { |
| 8562 e.detail.keyboardEvent.path[0].click(); |
| 8563 }, |
| 8557 onSelectorActivate_: function() { | 8564 onSelectorActivate_: function() { |
| 8558 this.fire('history-close-drawer'); | 8565 this.fire('history-close-drawer'); |
| 8559 }, | 8566 }, |
| 8560 onClearBrowsingDataTap_: function(e) { | 8567 onClearBrowsingDataTap_: function(e) { |
| 8561 var browserService = md_history.BrowserService.getInstance(); | 8568 var browserService = md_history.BrowserService.getInstance(); |
| 8562 browserService.recordAction('InitClearBrowsingData'); | 8569 browserService.recordAction('InitClearBrowsingData'); |
| 8563 browserService.openClearBrowsingData(); | 8570 browserService.openClearBrowsingData(); |
| 8564 e.preventDefault(); | 8571 e.preventDefault(); |
| 8565 }, | 8572 }, |
| 8566 getQueryString_: function(route) { | 8573 getQueryString_: function(route) { |
| (...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8758 | 8765 |
| 8759 case HistoryRange.MONTH: | 8766 case HistoryRange.MONTH: |
| 8760 histogramValue = HistoryPageViewHistogram.GROUPED_MONTH; | 8767 histogramValue = HistoryPageViewHistogram.GROUPED_MONTH; |
| 8761 break; | 8768 break; |
| 8762 } | 8769 } |
| 8763 break; | 8770 break; |
| 8764 } | 8771 } |
| 8765 md_history.BrowserService.getInstance().recordHistogram('History.HistoryPage
View', histogramValue, HistoryPageViewHistogram.END); | 8772 md_history.BrowserService.getInstance().recordHistogram('History.HistoryPage
View', histogramValue, HistoryPageViewHistogram.END); |
| 8766 } | 8773 } |
| 8767 }); | 8774 }); |
| OLD | NEW |