OLD | NEW |
1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 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-edit-dialog', | 6 is: 'bookmarks-edit-dialog', |
7 | 7 |
8 properties: { | 8 properties: { |
9 /** @private */ | 9 /** @private */ |
10 isFolder_: Boolean, | 10 isFolder_: Boolean, |
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
120 if (!this.validateUrl_()) | 120 if (!this.validateUrl_()) |
121 return; | 121 return; |
122 | 122 |
123 edit['url'] = this.urlValue_; | 123 edit['url'] = this.urlValue_; |
124 } | 124 } |
125 | 125 |
126 if (this.isEdit_) { | 126 if (this.isEdit_) { |
127 chrome.bookmarks.update(this.editItem_.id, edit); | 127 chrome.bookmarks.update(this.editItem_.id, edit); |
128 } else { | 128 } else { |
129 edit['parentId'] = this.parentId_; | 129 edit['parentId'] = this.parentId_; |
130 chrome.bookmarks.create(edit); | 130 bookmarks.ApiListener.trackUpdatedItems(); |
| 131 chrome.bookmarks.create( |
| 132 edit, bookmarks.ApiListener.highlightUpdatedItems); |
131 } | 133 } |
132 this.$.dialog.close(); | 134 this.$.dialog.close(); |
133 }, | 135 }, |
134 | 136 |
135 /** @private */ | 137 /** @private */ |
136 onCancelButtonTap_: function() { | 138 onCancelButtonTap_: function() { |
137 this.$.dialog.cancel(); | 139 this.$.dialog.cancel(); |
138 }, | 140 }, |
139 }); | 141 }); |
OLD | NEW |