Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1314)

Side by Side Diff: chrome/browser/resources/bookmark_manager/js/bmm/bookmark_tree.js

Issue 10966025: Change bookmarkManager API from experimental to private. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: bookmarkManager->bookmarkManagerPrivate Created 8 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 5
6 cr.define('bmm', function() { 6 cr.define('bmm', function() {
7 const Tree = cr.ui.Tree; 7 const Tree = cr.ui.Tree;
8 const TreeItem = cr.ui.TreeItem; 8 const TreeItem = cr.ui.TreeItem;
9 9
10 var treeLookup = {}; 10 var treeLookup = {};
(...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after
258 var item = new BookmarkTreeItem(bookmarkNode); 258 var item = new BookmarkTreeItem(bookmarkNode);
259 parentTreeItem.add(item); 259 parentTreeItem.add(item);
260 var anyChildren = buildTreeItems(item, bookmarkNode.children); 260 var anyChildren = buildTreeItems(item, bookmarkNode.children);
261 item.expanded = anyChildren && expandedManager.get(bookmarkNode.id); 261 item.expanded = anyChildren && expandedManager.get(bookmarkNode.id);
262 } 262 }
263 } 263 }
264 return hasDirectories; 264 return hasDirectories;
265 } 265 }
266 266
267 var self = this; 267 var self = this;
268 chrome.experimental.bookmarkManager.getSubtree('', true, function(root) { 268 chrome.bookmarkManagerPrivate.getSubtree('', true, function(root) {
269 self.clear(); 269 self.clear();
270 buildTreeItems(self, root[0].children); 270 buildTreeItems(self, root[0].children);
271 cr.dispatchSimpleEvent(self, 'load'); 271 cr.dispatchSimpleEvent(self, 'load');
272 }); 272 });
273 }, 273 },
274 274
275 /** 275 /**
276 * Clears the tree. 276 * Clears the tree.
277 */ 277 */
278 clear: function() { 278 clear: function() {
(...skipping 20 matching lines...) Expand all
299 } 299 }
300 }; 300 };
301 301
302 return { 302 return {
303 BookmarkTree: BookmarkTree, 303 BookmarkTree: BookmarkTree,
304 BookmarkTreeItem: BookmarkTreeItem, 304 BookmarkTreeItem: BookmarkTreeItem,
305 treeLookup: treeLookup, 305 treeLookup: treeLookup,
306 tree: tree 306 tree: tree
307 }; 307 };
308 }); 308 });
OLDNEW
« no previous file with comments | « chrome/browser/resources/bookmark_manager/js/bmm.js ('k') | chrome/browser/resources/bookmark_manager/js/bmm_test.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698