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

Issue 56175: Integrates a custom JumpList of Windows 7.... (Closed)

Created:
11 years, 8 months ago by Hironori Bono
Modified:
9 years, 7 months ago
CC:
chromium-reviews_googlegroups.com
Visibility:
Public.

Description

Integrates a custom JumpList of Windows 7 into Chromium. This change adds an option "--enable-custom-jumplist" that uses the ICustomDestinationList interface to add "Most Visited" pages, "Recently Closed" pages, and "Tasks" to the JumpList of Chromium. This change registers the CustomJumpList class into an observer of TabRestoreService so it can update the JumpList when a user adds/removes a tab. This change stores icon files used by a custom JumpList under "$(User Data Dir)/JumpListIcons" so Taskbar can show JumpList icons even when Chromium is not running. BUG=8037 TEST=Right-click the taskbar icon of Chromium on Windows 7. Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=21522

Patch Set 1 #

Patch Set 2 : '' #

Patch Set 3 : '' #

Patch Set 4 : '' #

Patch Set 5 : '' #

Patch Set 6 : '' #

Patch Set 7 : '' #

Patch Set 8 : '' #

Patch Set 9 : '' #

Patch Set 10 : '' #

Patch Set 11 : '' #

Patch Set 12 : '' #

Patch Set 13 : '' #

Patch Set 14 : '' #

Patch Set 15 : '' #

Patch Set 16 : '' #

Patch Set 17 : '' #

Patch Set 18 : '' #

Total comments: 6

Patch Set 19 : '' #

Patch Set 20 : '' #

Total comments: 12

Patch Set 21 : '' #

Total comments: 6

Patch Set 22 : '' #

Patch Set 23 : '' #

Patch Set 24 : '' #

Unified diffs Side-by-side diffs Delta from patch set Stats (+951 lines, -0 lines) Patch
A chrome/browser/jumplist.h View 1 chunk +186 lines, -0 lines 0 comments Download
A chrome/browser/jumplist.cc View 1 chunk +736 lines, -0 lines 0 comments Download
M chrome/browser/views/frame/browser_view.h View 21 22 3 chunks +9 lines, -0 lines 0 comments Download
M chrome/browser/views/frame/browser_view.cc View 21 22 23 2 chunks +10 lines, -0 lines 0 comments Download
M chrome/chrome.gyp View 15 16 17 18 19 20 21 22 23 2 chunks +3 lines, -0 lines 0 comments Download
M chrome/common/chrome_constants.h View 17 18 19 20 21 22 1 chunk +1 line, -0 lines 0 comments Download
M chrome/common/chrome_constants.cc View 17 18 19 20 21 22 1 chunk +1 line, -0 lines 0 comments Download
M chrome/common/chrome_switches.h View 17 18 19 20 21 22 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/common/chrome_switches.cc View 17 18 19 20 21 22 1 chunk +3 lines, -0 lines 0 comments Download

Messages

Total messages: 9 (0 generated)
Hironori Bono
11 years, 5 months ago (2009-07-13 10:28:07 UTC) #1
Glen Murphy
LG, some questions: http://codereview.chromium.org/56175/diff/14061/14066 File chrome/browser/custom_jumplist_win.cc (right): http://codereview.chromium.org/56175/diff/14061/14066#newcode38 Line 38: // TODO(hbono): to be deleted ...
11 years, 5 months ago (2009-07-15 22:32:51 UTC) #2
Hironori Bono
Thank you for your review and comments. As noted in my reply, I noticed this ...
11 years, 5 months ago (2009-07-17 09:09:08 UTC) #3
cpu_(ooo_6.6-7.5)
My bigger question is that it seems we are doing file IO in the UI ...
11 years, 5 months ago (2009-07-20 22:02:52 UTC) #4
Ben Goodger (Google)
http://codereview.chromium.org/56175/diff/15047/15054 File chrome/browser/custom_jumplist_win.h (right): http://codereview.chromium.org/56175/diff/15047/15054#newcode92 Line 92: class CustomJumpList : public TabRestoreService::Observer { I would ...
11 years, 5 months ago (2009-07-20 22:08:43 UTC) #5
Hironori Bono
Thank you for your comments and sorry for my slow update. I have applied your ...
11 years, 5 months ago (2009-07-22 06:01:43 UTC) #6
Ben Goodger (Google)
LGTM if Carlos is happy with the windowsy bits. Just a few minor nit comments. ...
11 years, 5 months ago (2009-07-22 06:07:57 UTC) #7
cpu_(ooo_6.6-7.5)
LGTM with one comment. http://codereview.chromium.org/56175/diff/15065/15067 File chrome/browser/jumplist_win.cc (right): http://codereview.chromium.org/56175/diff/15065/15067#newcode727 Line 727: most_visited_pages_, note that the ...
11 years, 5 months ago (2009-07-22 21:12:22 UTC) #8
Hironori Bono
11 years, 5 months ago (2009-07-24 13:01:09 UTC) #9
Thank you so much for your reviews and comments. They are definitely helpful for
me to improve this change.
I have finally submitted this change as r21522.

http://codereview.chromium.org/56175/diff/15065/15067
File chrome/browser/jumplist_win.cc (right):

http://codereview.chromium.org/56175/diff/15065/15067#newcode727
Line 727: most_visited_pages_,
On 2009/07/22 21:12:22, cpu wrote:
> note that the Jumplist object can be destroyed before the task gets into the
> Run() method. Make sure that the two last parameters are properly recounted
(as
> they seem to be) and their subobjects are as well (I am not sure), so that the
> task does not refer freed objects. 

Done. Thank you for your suggestion.
As far as I tested on my local PC (i.e. deleted this JumpList object in this
function), it seems ShellLinkItem objects (which inherits from ref_counted<T>)
in these listed are properly recounted.

By the way, I noticed most part of this JumpList class was platform-independent
since I moved platform-dependent code into this JumpListUpdateTask. That is, we
may write unit-tests for this JumpList class when we write a mock task, such as
MockJumpListUpdateTask, which does not do anything in its Run() method. I'm
implementing its prototype to prove this idea.

http://codereview.chromium.org/56175/diff/15065/15068
File chrome/browser/jumplist_win.h (right):

http://codereview.chromium.org/56175/diff/15065/15068#newcode186
Line 186: #endif  // CHROME_BROWSER_JUMPLIST_WIN_H_
On 2009/07/22 06:08:00, Ben Goodger wrote:
> nit: no need for _WIN in the file name or in these #defines... jump-lists are
> inherently windows specific.

Done. Thank you.

http://codereview.chromium.org/56175/diff/15065/15069
File chrome/browser/views/frame/browser_view.cc (right):

http://codereview.chromium.org/56175/diff/15065/15069#newcode1492
Line 1492: }
On 2009/07/22 06:08:00, Ben Goodger wrote:
> nit: You don't need all the NULL checks unless you have reason to believe
> something is NULL for a valid reason. This is simpler:
> 
> if (JumpList::Enabled()) {
>   jumplist_.reset(new JumpList);
>   jumplist_->AddObserver(browser_->profile());
> }
> 

Done. Thank you for your suggestion.

Powered by Google App Engine
This is Rietveld 408576698