| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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 assert(condition, opt_message) { | 4 function assert(condition, opt_message) { |
| 5 if (!condition) { | 5 if (!condition) { |
| 6 var message = 'Assertion failed'; | 6 var message = 'Assertion failed'; |
| 7 if (opt_message) message = message + ': ' + opt_message; | 7 if (opt_message) message = message + ': ' + opt_message; |
| 8 var error = new Error(message); | 8 var error = new Error(message); |
| 9 var global = function() { | 9 var global = function() { |
| 10 return this; | 10 return this; |
| (...skipping 6552 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6563 this.showingSearch = !this.showingSearch; | 6563 this.showingSearch = !this.showingSearch; |
| 6564 } | 6564 } |
| 6565 }); | 6565 }); |
| 6566 | 6566 |
| 6567 // Copyright 2015 The Chromium Authors. All rights reserved. | 6567 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 6568 // Use of this source code is governed by a BSD-style license that can be | 6568 // Use of this source code is governed by a BSD-style license that can be |
| 6569 // found in the LICENSE file. | 6569 // found in the LICENSE file. |
| 6570 cr.define('downloads', function() { | 6570 cr.define('downloads', function() { |
| 6571 var Toolbar = Polymer({ | 6571 var Toolbar = Polymer({ |
| 6572 is: 'downloads-toolbar', | 6572 is: 'downloads-toolbar', |
| 6573 attached: function() { | |
| 6574 this.overflowAlign_ = isRTL() ? 'left' : 'right'; | |
| 6575 }, | |
| 6576 properties: { | 6573 properties: { |
| 6577 downloadsShowing: { | 6574 downloadsShowing: { |
| 6578 reflectToAttribute: true, | 6575 reflectToAttribute: true, |
| 6579 type: Boolean, | 6576 type: Boolean, |
| 6580 value: false, | 6577 value: false, |
| 6581 observer: 'downloadsShowingChanged_' | 6578 observer: 'downloadsShowingChanged_' |
| 6582 }, | |
| 6583 overflowAlign_: { | |
| 6584 type: String, | |
| 6585 value: 'right' | |
| 6586 } | 6579 } |
| 6587 }, | 6580 }, |
| 6588 listeners: { | 6581 listeners: { |
| 6589 'paper-dropdown-close': 'onPaperDropdownClose_', | 6582 'paper-dropdown-close': 'onPaperDropdownClose_', |
| 6590 'paper-dropdown-open': 'onPaperDropdownOpen_' | 6583 'paper-dropdown-open': 'onPaperDropdownOpen_' |
| 6591 }, | 6584 }, |
| 6592 canUndo: function() { | 6585 canUndo: function() { |
| 6593 return this.$['search-input'] != this.shadowRoot.activeElement; | 6586 return this.$['search-input'] != this.shadowRoot.activeElement; |
| 6594 }, | 6587 }, |
| 6595 canClearAll: function() { | 6588 canClearAll: function() { |
| (...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6756 }; | 6749 }; |
| 6757 return { | 6750 return { |
| 6758 Manager: Manager | 6751 Manager: Manager |
| 6759 }; | 6752 }; |
| 6760 }); | 6753 }); |
| 6761 | 6754 |
| 6762 // Copyright 2015 The Chromium Authors. All rights reserved. | 6755 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 6763 // Use of this source code is governed by a BSD-style license that can be | 6756 // Use of this source code is governed by a BSD-style license that can be |
| 6764 // found in the LICENSE file. | 6757 // found in the LICENSE file. |
| 6765 window.addEventListener('load', downloads.Manager.onLoad); | 6758 window.addEventListener('load', downloads.Manager.onLoad); |
| OLD | NEW |