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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
129 }); | 130 }); |
130 }.bind(this)); | 131 }.bind(this)); |
131 }, | 132 }, |
132 | 133 |
133 /** @private */ | 134 /** @private */ |
134 closedFoldersStateChanged_: function() { | 135 closedFoldersStateChanged_: function() { |
135 window.localStorage[LOCAL_STORAGE_CLOSED_FOLDERS_KEY] = | 136 window.localStorage[LOCAL_STORAGE_CLOSED_FOLDERS_KEY] = |
136 JSON.stringify(Array.from(this.closedFoldersState_)); | 137 JSON.stringify(Array.from(this.closedFoldersState_)); |
137 }, | 138 }, |
138 }); | 139 }); |
OLD | NEW |