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

Issue 7610014: [ntp4] Bookmarks page implementation, first-pass. (Closed)

Created:
9 years, 4 months ago by csilv
Modified:
9 years, 4 months ago
CC:
chromium-reviews, estade+watch_chromium.org
Visibility:
Public.

Description

[ntp4] Bookmarks page implementation, first-pass. This is an initial implementation of the bookmarks page for NTP4. This is a work in progress with the following known issues: * Editing is not supported (add, edit, delete, re-order). * The parent hierarchy currently doesn't scroll if it gets too long. * Changes to the bookmarks model is not currently observed. * The page navigation buttons on the page edges currently overlap the titles bar. * The vertical scrollbar currently renders over the titles bar. * Drag & drop is not currently supported. * Changes will be required for full Theme compatibility. BUG=92921 Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=96867

Patch Set 1 #

Patch Set 2 : '' #

Patch Set 3 : '' #

Patch Set 4 : '' #

Patch Set 5 : Rebase. #

Patch Set 6 : Code tweak for rebase. #

Total comments: 41

Patch Set 7 : '' #

Patch Set 8 : '' #

Total comments: 8

Patch Set 9 : '' #

Total comments: 11

Patch Set 10 : Final review tweaks, rebase. #

Total comments: 16
Unified diffs Side-by-side diffs Delta from patch set Stats (+511 lines, -48 lines) Patch
M chrome/browser/history/top_sites.cc View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/resources/ntp4/bookmarks_page.css View 1 2 3 4 5 6 7 8 9 1 chunk +141 lines, -6 lines 3 comments Download
M chrome/browser/resources/ntp4/bookmarks_page.js View 1 2 3 4 5 6 7 8 9 3 chunks +218 lines, -9 lines 13 comments Download
M chrome/browser/resources/ntp4/most_visited_page.js View 1 2 3 4 5 6 7 8 9 4 chunks +9 lines, -7 lines 0 comments Download
M chrome/browser/resources/ntp4/new_tab.html View 1 2 3 4 5 6 7 8 9 1 chunk +18 lines, -0 lines 0 comments Download
M chrome/browser/resources/ntp4/new_tab.js View 1 2 3 4 5 6 7 8 9 3 chunks +11 lines, -6 lines 0 comments Download
M chrome/browser/resources/ntp4/new_tab_theme.css View 1 2 3 4 5 6 7 8 9 1 chunk +7 lines, -0 lines 0 comments Download
M chrome/browser/resources/ntp4/tile_page.js View 1 2 3 4 5 6 7 8 9 1 chunk +7 lines, -0 lines 0 comments Download
M chrome/browser/ui/cocoa/browser_window_controller_private.mm View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/webui/ntp/app_launcher_handler.cc View 1 2 3 4 5 6 7 8 9 9 chunks +9 lines, -9 lines 0 comments Download
M chrome/browser/ui/webui/ntp/bookmarks_handler.h View 1 2 3 4 5 6 7 8 9 2 chunks +9 lines, -0 lines 0 comments Download
M chrome/browser/ui/webui/ntp/bookmarks_handler.cc View 1 2 3 4 5 6 7 8 9 1 chunk +57 lines, -0 lines 0 comments Download
M chrome/browser/ui/webui/ntp/favicon_webui_handler.h View 1 2 3 4 5 6 7 8 9 1 chunk +4 lines, -0 lines 0 comments Download
M chrome/browser/ui/webui/ntp/favicon_webui_handler.cc View 1 2 3 4 5 6 7 8 9 2 chunks +6 lines, -2 lines 0 comments Download
M chrome/browser/ui/webui/ntp/new_tab_page_handler.cc View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/webui/ntp/new_tab_ui.h View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/webui/ntp/new_tab_ui.cc View 1 2 3 4 5 6 7 8 9 4 chunks +5 lines, -3 lines 0 comments Download
M chrome/browser/ui/webui/ntp/ntp_resource_cache.cc View 1 2 3 4 5 6 7 8 9 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/common/pref_names.h View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -0 lines 0 comments Download
M chrome/common/pref_names.cc View 1 2 3 4 5 6 7 8 9 1 chunk +3 lines, -0 lines 0 comments Download

Messages

Total messages: 17 (0 generated)
csilv
+estade for review
9 years, 4 months ago (2011-08-12 00:10:09 UTC) #1
Evan Stade
http://codereview.chromium.org/7610014/diff/7016/chrome/browser/resources/ntp4/bookmarks_page.js File chrome/browser/resources/ntp4/bookmarks_page.js (right): http://codereview.chromium.org/7610014/diff/7016/chrome/browser/resources/ntp4/bookmarks_page.js#newcode9 chrome/browser/resources/ntp4/bookmarks_page.js:9: var tileID = 0; comment this http://codereview.chromium.org/7610014/diff/7016/chrome/browser/resources/ntp4/bookmarks_page.js#newcode32 chrome/browser/resources/ntp4/bookmarks_page.js:32: '<a ...
9 years, 4 months ago (2011-08-12 21:13:30 UTC) #2
arv (Not doing code reviews)
Nice. My main concern is that we will have to duplicate almost all of the ...
9 years, 4 months ago (2011-08-13 01:02:07 UTC) #3
csilv
http://codereview.chromium.org/7610014/diff/7016/chrome/browser/resources/ntp4/bookmarks_page.js File chrome/browser/resources/ntp4/bookmarks_page.js (right): http://codereview.chromium.org/7610014/diff/7016/chrome/browser/resources/ntp4/bookmarks_page.js#newcode9 chrome/browser/resources/ntp4/bookmarks_page.js:9: var tileID = 0; On 2011/08/12 21:13:30, Evan Stade ...
9 years, 4 months ago (2011-08-13 01:09:20 UTC) #4
csilv
http://codereview.chromium.org/7610014/diff/7016/chrome/browser/resources/ntp4/bookmarks_page.js File chrome/browser/resources/ntp4/bookmarks_page.js (right): http://codereview.chromium.org/7610014/diff/7016/chrome/browser/resources/ntp4/bookmarks_page.js#newcode9 chrome/browser/resources/ntp4/bookmarks_page.js:9: var tileID = 0; On 2011/08/13 01:02:07, arv wrote: ...
9 years, 4 months ago (2011-08-13 01:48:17 UTC) #5
csilv
evan, arv, Replied to all review comments, ptal at your convenience. Initiating trybot runs as ...
9 years, 4 months ago (2011-08-13 01:49:34 UTC) #6
csilv
On 2011/08/13 01:02:07, arv wrote: > My main concern is that we will have to ...
9 years, 4 months ago (2011-08-15 17:26:57 UTC) #7
arv (Not doing code reviews)
I'm still curious how you plan to tackle the issue where we will need to ...
9 years, 4 months ago (2011-08-15 17:46:30 UTC) #8
arv (Not doing code reviews)
I see that you responded to the code duplication question. LGTM once the naming nits ...
9 years, 4 months ago (2011-08-15 17:48:08 UTC) #9
csilv
http://codereview.chromium.org/7610014/diff/17003/chrome/browser/resources/ntp4/bookmarks_page.css File chrome/browser/resources/ntp4/bookmarks_page.css (right): http://codereview.chromium.org/7610014/diff/17003/chrome/browser/resources/ntp4/bookmarks_page.css#newcode99 chrome/browser/resources/ntp4/bookmarks_page.css:99: #bookmarks_title_wrapper { On 2011/08/15 17:46:30, arv wrote: > Use ...
9 years, 4 months ago (2011-08-15 18:24:28 UTC) #10
Evan Stade
lgtm http://codereview.chromium.org/7610014/diff/12018/chrome/browser/resources/ntp4/bookmarks_page.js File chrome/browser/resources/ntp4/bookmarks_page.js (right): http://codereview.chromium.org/7610014/diff/12018/chrome/browser/resources/ntp4/bookmarks_page.js#newcode178 chrome/browser/resources/ntp4/bookmarks_page.js:178: var titleWrapper = $('bookmarks-title-wrapper-template').cloneNode(true); if the title div ...
9 years, 4 months ago (2011-08-15 22:15:17 UTC) #11
Evan Stade
re: NTP as extension. We also want this so that extensions can modify the NTP ...
9 years, 4 months ago (2011-08-15 22:23:17 UTC) #12
csilv
http://codereview.chromium.org/7610014/diff/12018/chrome/browser/resources/ntp4/bookmarks_page.js File chrome/browser/resources/ntp4/bookmarks_page.js (right): http://codereview.chromium.org/7610014/diff/12018/chrome/browser/resources/ntp4/bookmarks_page.js#newcode178 chrome/browser/resources/ntp4/bookmarks_page.js:178: var titleWrapper = $('bookmarks-title-wrapper-template').cloneNode(true); On 2011/08/15 22:15:17, Evan Stade ...
9 years, 4 months ago (2011-08-15 22:50:13 UTC) #13
Sheridan Rawlins
Drive by review - mostly style nits, but a few questions/concerns. http://codereview.chromium.org/7610014/diff/12042/chrome/browser/resources/ntp4/bookmarks_page.js File chrome/browser/resources/ntp4/bookmarks_page.js (right): ...
9 years, 4 months ago (2011-08-16 05:50:27 UTC) #14
Evan Stade
http://codereview.chromium.org/7610014/diff/12042/chrome/browser/resources/ntp4/bookmarks_page.js File chrome/browser/resources/ntp4/bookmarks_page.js (right): http://codereview.chromium.org/7610014/diff/12042/chrome/browser/resources/ntp4/bookmarks_page.js#newcode190 chrome/browser/resources/ntp4/bookmarks_page.js:190: for (var i = items.length - 1; i > ...
9 years, 4 months ago (2011-08-16 06:05:38 UTC) #15
Sheridan Rawlins
http://codereview.chromium.org/7610014/diff/12042/chrome/browser/resources/ntp4/bookmarks_page.js File chrome/browser/resources/ntp4/bookmarks_page.js (right): http://codereview.chromium.org/7610014/diff/12042/chrome/browser/resources/ntp4/bookmarks_page.js#newcode190 chrome/browser/resources/ntp4/bookmarks_page.js:190: for (var i = items.length - 1; i > ...
9 years, 4 months ago (2011-08-16 06:39:13 UTC) #16
arv (Not doing code reviews)
9 years, 4 months ago (2011-08-16 19:36:55 UTC) #17
http://codereview.chromium.org/7610014/diff/12042/chrome/browser/resources/nt...
File chrome/browser/resources/ntp4/bookmarks_page.css (right):

http://codereview.chromium.org/7610014/diff/12042/chrome/browser/resources/nt...
chrome/browser/resources/ntp4/bookmarks_page.css:122: margin-right: 0;
-webkit-margin-end?

http://codereview.chromium.org/7610014/diff/12042/chrome/browser/resources/nt...
chrome/browser/resources/ntp4/bookmarks_page.css:123: padding-right: 10px;
-webkit-padding-end?

http://codereview.chromium.org/7610014/diff/12042/chrome/browser/resources/nt...
chrome/browser/resources/ntp4/bookmarks_page.css:128: left: 0;
rtl?

http://codereview.chromium.org/7610014/diff/12042/chrome/browser/resources/nt...
File chrome/browser/resources/ntp4/bookmarks_page.js (right):

http://codereview.chromium.org/7610014/diff/12042/chrome/browser/resources/nt...
chrome/browser/resources/ntp4/bookmarks_page.js:34: initialize: function() {
On 2011/08/16 05:50:28, Sheridan Rawlins wrote:
> nit: JSDoc (@inheritDoc?)

HTMLDivElement does not have initialize so this should not be @inheritDoc.

http://codereview.chromium.org/7610014/diff/12042/chrome/browser/resources/nt...
chrome/browser/resources/ntp4/bookmarks_page.js:131:
this.addEventListener('click', this.handleClick_);
On 2011/08/16 05:50:28, Sheridan Rawlins wrote:
> Will this work, or does it need to be "bound"?  It looks like the method
relies
> on |this| - will |this| be set properly without .bind() here?

It will work since addEventListener is called on this and the callbacks will use
that as the receiver.

http://codereview.chromium.org/7610014/diff/12042/chrome/browser/resources/nt...
chrome/browser/resources/ntp4/bookmarks_page.js:190: for (var i = items.length -
1; i > 0; i--) {
On 2011/08/16 06:39:13, Sheridan Rawlins wrote:
> I would have thought that getting in the habit of preinc/dec was preferred. 
> Thanks for the correction and reference.
> 
> On 2011/08/16 06:05:38, Evan Stade wrote:
> > On 2011/08/16 05:50:28, Sheridan Rawlins wrote:
> > > nit: --i
> > 
> > why? I don't see any mention of post vs pre increment on either the internal
> js
> > style guide or the external chrome web development guide but the google C++
> > style guide says "For simple scalar (non-object) values there is no reason
to
> > prefer one form and we allow either"
> > 
> > http://google-styleguide.googlecode.com/svn/trunk/cppguide.xml
> 

All the Google JS uses post inc/dec for consistency.

Powered by Google App Engine
This is Rietveld 408576698