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

Unified Diff: chrome/browser/resources/ntp4/page_list_view.js

Issue 8760003: [ntp4] Remove bookmarks page implementation and resources. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: update page_list_view.js Created 9 years, 1 month 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/resources/ntp4/page_list_view.js
===================================================================
--- chrome/browser/resources/ntp4/page_list_view.js (revision 112258)
+++ chrome/browser/resources/ntp4/page_list_view.js (working copy)
@@ -65,12 +65,6 @@
mostVisitedPage: undefined,
/**
- * The Bookmarks page.
- * @type {!Element|undefined}
- */
- bookmarksPage: undefined,
-
- /**
* The 'dots-list' element.
* @type {!Element|undefined}
*/
@@ -189,7 +183,7 @@
},
/**
- * Appends a tile page (for bookmarks or most visited).
+ * Appends a tile page.
*
* @param {TilePage} page The page element.
* @param {string} title The title of the tile page.
@@ -200,24 +194,16 @@
* the page list.
*/
appendTilePage: function(page, title, titleIsEditable, opt_refNode) {
- // If no opt_refNode given, use bookmarksPage (if any).
- if (!opt_refNode)
- opt_refNode = this.bookmarksPage;
-
// When opt_refNode is falsey, insertBefore acts just like appendChild.
this.pageList.insertBefore(page, opt_refNode);
- // Remember special MostVisitedPage and BookmarksPage.
+ // Remember special MostVisitedPage.
if (typeof ntp4.MostVisitedPage != 'undefined' &&
page instanceof ntp4.MostVisitedPage) {
assert(this.tilePages.length == 1,
'MostVisitedPage should be added as first tile page');
this.mostVisitedPage = page;
}
- if (typeof ntp4.BookmarksPage != 'undefined' &&
- page instanceof ntp4.BookmarksPage) {
- this.bookmarksPage = page;
- }
// If we're appending an AppsPage and it's a temporary page, animate it.
var animate = page instanceof ntp4.AppsPage &&
@@ -380,14 +366,10 @@
$(data.apps[i].id).appData = data.apps[i];
}
- // Set the App dot names. Skip the first and last dots (Most Visited and
- // Bookmarks).
+ // Set the App dot names. Skip the first dot (Most Visited).
var dots = this.dotList.getElementsByClassName('dot');
- // TODO(csilv): Remove this calcluation if/when we remove the flag for
- // for the bookmarks page.
var start = this.mostVisitedPage ? 1 : 0;
- var length = this.bookmarksPage ? dots.length - 1 : dots.length;
- for (var i = start; i < length; ++i) {
+ for (var i = start; i < dots.length; ++i) {
dots[i].displayTitle = data.appPageNames[i - start] || '';
}
},
@@ -407,10 +389,6 @@
this.appsPages[Math.min(this.shownPageIndex,
this.appsPages.length - 1)]);
break;
- case templateData['bookmarks_page_id']:
- if (this.bookmarksPage)
- this.cardSlider.selectCardByValue(this.bookmarksPage);
- break;
case templateData['most_visited_page_id']:
if (this.mostVisitedPage)
this.cardSlider.selectCardByValue(this.mostVisitedPage);
@@ -536,9 +514,6 @@
} else if (page.classList.contains('most-visited-page')) {
this.shownPage = templateData['most_visited_page_id'];
this.shownPageIndex = 0;
- } else if (page.classList.contains('bookmarks-page')) {
- this.shownPage = templateData['bookmarks_page_id'];
- this.shownPageIndex = 0;
} else {
console.error('unknown page selected');
}
« no previous file with comments | « chrome/browser/resources/ntp4/new_tab.js ('k') | chrome/browser/ui/cocoa/browser_window_controller_private.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698