| 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 | 4 |
| 5 Polymer({ | 5 Polymer({ |
| 6 is: 'bookmarks-app', | 6 is: 'bookmarks-app', |
| 7 | 7 |
| 8 behaviors: [ | 8 behaviors: [ |
| 9 bookmarks.MouseFocusBehavior, | 9 bookmarks.MouseFocusBehavior, |
| 10 bookmarks.StoreClient, | 10 bookmarks.StoreClient, |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 70 | 70 |
| 71 this.initializeSplitter_(); | 71 this.initializeSplitter_(); |
| 72 | 72 |
| 73 this.dndManager_ = new bookmarks.DNDManager(); | 73 this.dndManager_ = new bookmarks.DNDManager(); |
| 74 this.dndManager_.init(); | 74 this.dndManager_.init(); |
| 75 }, | 75 }, |
| 76 | 76 |
| 77 detached: function() { | 77 detached: function() { |
| 78 window.removeEventListener('resize', this.boundUpdateSidebarWidth_); | 78 window.removeEventListener('resize', this.boundUpdateSidebarWidth_); |
| 79 this.dndManager_.destroy(); | 79 this.dndManager_.destroy(); |
| 80 bookmarks.ApiListener.destroy(); |
| 80 }, | 81 }, |
| 81 | 82 |
| 82 /** | 83 /** |
| 83 * Set up the splitter and set the initial width from localStorage. | 84 * Set up the splitter and set the initial width from localStorage. |
| 84 * @private | 85 * @private |
| 85 */ | 86 */ |
| 86 initializeSplitter_: function() { | 87 initializeSplitter_: function() { |
| 87 var splitter = this.$.splitter; | 88 var splitter = this.$.splitter; |
| 88 cr.ui.Splitter.decorate(splitter); | 89 cr.ui.Splitter.decorate(splitter); |
| 89 var splitterTarget = this.$.sidebar; | 90 var splitterTarget = this.$.sidebar; |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 124 this.dispatch(bookmarks.actions.setSearchResults(ids)); | 125 this.dispatch(bookmarks.actions.setSearchResults(ids)); |
| 125 }.bind(this)); | 126 }.bind(this)); |
| 126 }, | 127 }, |
| 127 | 128 |
| 128 /** @private */ | 129 /** @private */ |
| 129 closedFoldersStateChanged_: function() { | 130 closedFoldersStateChanged_: function() { |
| 130 window.localStorage[LOCAL_STORAGE_CLOSED_FOLDERS_KEY] = | 131 window.localStorage[LOCAL_STORAGE_CLOSED_FOLDERS_KEY] = |
| 131 JSON.stringify(Array.from(this.closedFoldersState_)); | 132 JSON.stringify(Array.from(this.closedFoldersState_)); |
| 132 }, | 133 }, |
| 133 }); | 134 }); |
| OLD | NEW |