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