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

Issue 7065052: Improve large tab strip by leveraging touch icons when present (Closed)

Created:
9 years, 6 months ago by Emmanuel Saint-loubert-Bié
Modified:
9 years, 6 months ago
Reviewers:
brettw
CC:
chromium-reviews, sky
Visibility:
Public.

Description

Improve large tab strip by leveraging touch icons when present. BUG=none TEST=TemplateURLParserTest.TestDictionary, TestMSDN, TestWikipedia (as per sadrul) Note: testing with mobile user-agent will also yield better results: --user-agent=iPhone or similar mobile Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=89512

Patch Set 1 #

Patch Set 2 : Blank line removed #

Patch Set 3 : Partially reverting CL before change to tabstrip #

Patch Set 4 : Implementation of a local icon cache (not final) #

Patch Set 5 : Implementation of a local touch icon cache (not final) #

Patch Set 6 : Fixed scaling up #

Patch Set 7 : removed extra line #

Total comments: 31

Patch Set 8 : Applied most of comments #

Patch Set 9 : Fixed URL to ignore fragment and changed item handling #

Total comments: 4

Patch Set 10 : Reworked caching approach #

Patch Set 11 : ' #

Patch Set 12 : ' #

Total comments: 41

Patch Set 13 : Updated per review comments #

Patch Set 14 : Added one more check on outstanding requests #

Total comments: 2

Patch Set 15 : Renaming as per tfarina #

Total comments: 6

Patch Set 16 : Applied comments from sky #

Total comments: 23

Patch Set 17 : Applied changes from brettw #

Patch Set 18 : resynced tree #

Patch Set 19 : Remerged tree #

Patch Set 20 : Resynced (again) #

Unified diffs Side-by-side diffs Delta from patch set Stats (+327 lines, -80 lines) Patch
M chrome/browser/ui/touch/tabs/tab_strip_factory.cc View 1 2 3 1 chunk +4 lines, -4 lines 0 comments Download
M chrome/browser/ui/touch/tabs/touch_tab.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 3 chunks +14 lines, -0 lines 0 comments Download
M chrome/browser/ui/touch/tabs/touch_tab.cc View 1 2 3 4 5 6 7 8 9 10 11 12 5 chunks +14 lines, -41 lines 0 comments Download
M chrome/browser/ui/touch/tabs/touch_tab_strip.h View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +3 lines, -0 lines 0 comments Download
M chrome/browser/ui/touch/tabs/touch_tab_strip.cc View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +5 lines, -0 lines 0 comments Download
A chrome/browser/ui/touch/tabs/touch_tab_strip_controller.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +46 lines, -0 lines 0 comments Download
A chrome/browser/ui/touch/tabs/touch_tab_strip_controller.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +171 lines, -0 lines 0 comments Download
M chrome/browser/ui/views/tabs/browser_tab_strip_controller.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 2 chunks +19 lines, -7 lines 0 comments Download
M chrome/browser/ui/views/tabs/browser_tab_strip_controller.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 5 chunks +28 lines, -23 lines 0 comments Download
M chrome/chrome_browser.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/common/chrome_constants.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 1 chunk +4 lines, -0 lines 0 comments Download
M content/browser/cancelable_request.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 3 chunks +17 lines, -1 line 0 comments Download
M ui/gfx/favicon_size.h View 1 2 3 8 9 10 11 12 1 chunk +0 lines, -4 lines 0 comments Download

Messages

Total messages: 21 (0 generated)
Emmanuel Saint-loubert-Bié
Hi Scott, Before doing a detailed review, what do you think of this approach, based ...
9 years, 6 months ago (2011-06-03 02:39:01 UTC) #1
sky
The touch icons are significantly larger then favicons 129x129, vs 16x16. At that size we ...
9 years, 6 months ago (2011-06-03 15:48:30 UTC) #2
Peter Mayo
Please re-enable the test for this, once it is working. See http://codereview.chromium.org/7112013/
9 years, 6 months ago (2011-06-06 23:10:32 UTC) #3
Emmanuel Saint-loubert-Bié
Hi Scott, This is not finished, there are a few things I need to address ...
9 years, 6 months ago (2011-06-08 22:41:21 UTC) #4
sky
Yes, this is along the lines of what I was suggesting. -Scott
9 years, 6 months ago (2011-06-08 22:48:21 UTC) #5
Emmanuel Saint-loubert-Bié
Hi Scott, OK I have done some more testing and it seems to be doing ...
9 years, 6 months ago (2011-06-09 00:00:23 UTC) #6
sky
http://codereview.chromium.org/7065052/diff/7009/chrome/browser/ui/touch/tabs/touch_tab.cc File chrome/browser/ui/touch/tabs/touch_tab.cc (right): http://codereview.chromium.org/7065052/diff/7009/chrome/browser/ui/touch/tabs/touch_tab.cc#newcode32 chrome/browser/ui/touch/tabs/touch_tab.cc:32: void calc_touch_icon_target_size(int* width, int* height) { This should really ...
9 years, 6 months ago (2011-06-09 16:53:00 UTC) #7
Emmanuel Saint-loubert-Bié
http://codereview.chromium.org/7065052/diff/7009/chrome/browser/ui/touch/tabs/touch_tab.cc File chrome/browser/ui/touch/tabs/touch_tab.cc (right): http://codereview.chromium.org/7065052/diff/7009/chrome/browser/ui/touch/tabs/touch_tab.cc#newcode32 chrome/browser/ui/touch/tabs/touch_tab.cc:32: void calc_touch_icon_target_size(int* width, int* height) { Yes of course, ...
9 years, 6 months ago (2011-06-10 02:21:45 UTC) #8
Emmanuel Saint-loubert-Bié
> Finally I now use GURL::GetWithEmptyPath() for the comparison this should ignore > the fragment ...
9 years, 6 months ago (2011-06-10 02:22:26 UTC) #9
sky
The down side of the approach you've gone with is you never remove icons from ...
9 years, 6 months ago (2011-06-10 15:38:17 UTC) #10
Emmanuel Saint-loubert-Bié
Hi Scott, Yes you are right this is a definite downside to the current approach. ...
9 years, 6 months ago (2011-06-10 16:09:09 UTC) #11
Emmanuel Saint-loubert-Bié
Hi Scott, This new implementation no longer cache the touch icons as before. Instead those ...
9 years, 6 months ago (2011-06-15 23:49:30 UTC) #12
sky
Yes, this is getting much closer. -Scott http://codereview.chromium.org/7065052/diff/14002/chrome/browser/ui/touch/tabs/touch_tab.cc File chrome/browser/ui/touch/tabs/touch_tab.cc (right): http://codereview.chromium.org/7065052/diff/14002/chrome/browser/ui/touch/tabs/touch_tab.cc#newcode218 chrome/browser/ui/touch/tabs/touch_tab.cc:218: && data().favicon.height() ...
9 years, 6 months ago (2011-06-16 15:43:41 UTC) #13
tfarina
http://codereview.chromium.org/7065052/diff/14002/chrome/browser/ui/touch/tabs/touch_tab_strip_controller.cc File chrome/browser/ui/touch/tabs/touch_tab_strip_controller.cc (right): http://codereview.chromium.org/7065052/diff/14002/chrome/browser/ui/touch/tabs/touch_tab_strip_controller.cc#newcode20 chrome/browser/ui/touch/tabs/touch_tab_strip_controller.cc:20: static void calc_touch_icon_target_size(int* width, int* height) { Also wrap ...
9 years, 6 months ago (2011-06-16 15:52:44 UTC) #14
Emmanuel Saint-loubert-Bié
Hi Scott, I applied all the review comments. Thanks, -- Emmanuel http://codereview.chromium.org/7065052/diff/14002/chrome/browser/ui/touch/tabs/touch_tab.cc File chrome/browser/ui/touch/tabs/touch_tab.cc (right): ...
9 years, 6 months ago (2011-06-17 00:01:44 UTC) #15
tfarina
http://codereview.chromium.org/7065052/diff/20002/chrome/browser/ui/touch/tabs/touch_tab_strip_controller.cc File chrome/browser/ui/touch/tabs/touch_tab_strip_controller.cc (right): http://codereview.chromium.org/7065052/diff/20002/chrome/browser/ui/touch/tabs/touch_tab_strip_controller.cc#newcode35 chrome/browser/ui/touch/tabs/touch_tab_strip_controller.cc:35: GURL GurlWithoutFragment(const GURL& gurl) { would you rename this ...
9 years, 6 months ago (2011-06-17 00:06:40 UTC) #16
Emmanuel Saint-loubert-Bié
9 years, 6 months ago (2011-06-17 00:14:09 UTC) #17
sky
The tabstrip changes LGTM. You'll want Brett to review the changes to cancelablerequest. -Scott http://codereview.chromium.org/7065052/diff/23003/chrome/browser/ui/touch/tabs/touch_tab.h ...
9 years, 6 months ago (2011-06-17 15:34:55 UTC) #18
Emmanuel Saint-loubert-Bié
Hi Brett, I got an LGTM from Scott foe everything except for content/browser/cancelable_request.h which we ...
9 years, 6 months ago (2011-06-17 16:11:23 UTC) #19
brettw
http://codereview.chromium.org/7065052/diff/28002/chrome/browser/ui/touch/tabs/touch_tab_strip_controller.cc File chrome/browser/ui/touch/tabs/touch_tab_strip_controller.cc (right): http://codereview.chromium.org/7065052/diff/28002/chrome/browser/ui/touch/tabs/touch_tab_strip_controller.cc#newcode45 chrome/browser/ui/touch/tabs/touch_tab_strip_controller.cc:45: } // namespace Two spaces before end-of-line comments. http://codereview.chromium.org/7065052/diff/28002/chrome/browser/ui/touch/tabs/touch_tab_strip_controller.cc#newcode72 ...
9 years, 6 months ago (2011-06-17 16:20:49 UTC) #20
Emmanuel Saint-loubert-Bié
9 years, 6 months ago (2011-06-17 16:52:44 UTC) #21
Applied all comments.

http://codereview.chromium.org/7065052/diff/28002/chrome/browser/ui/touch/tab...
File chrome/browser/ui/touch/tabs/touch_tab_strip_controller.cc (right):

http://codereview.chromium.org/7065052/diff/28002/chrome/browser/ui/touch/tab...
chrome/browser/ui/touch/tabs/touch_tab_strip_controller.cc:45: } // namespace
On 2011/06/17 16:20:49, brettw wrote:
> Two spaces before end-of-line comments.

Done.

http://codereview.chromium.org/7065052/diff/28002/chrome/browser/ui/touch/tab...
chrome/browser/ui/touch/tabs/touch_tab_strip_controller.cc:72: // reset touch
icon if the url are different
On 2011/06/17 16:20:49, brettw wrote:
> Comments should have a capital and a period.

Done.

http://codereview.chromium.org/7065052/diff/28002/chrome/browser/ui/touch/tab...
chrome/browser/ui/touch/tabs/touch_tab_strip_controller.cc:105:
data->favicon.height() == kFaviconSize)
On 2011/06/17 16:20:49, brettw wrote:
> Need {} for this

Done.

http://codereview.chromium.org/7065052/diff/28002/chrome/browser/ui/touch/tab...
File chrome/browser/ui/touch/tabs/touch_tab_strip_controller.h (right):

http://codereview.chromium.org/7065052/diff/28002/chrome/browser/ui/touch/tab...
chrome/browser/ui/touch/tabs/touch_tab_strip_controller.h:16: // Subclassing
BrowserTabStripController to provide touch specific behavior.
On 2011/06/17 16:20:49, brettw wrote:
> This comment seems like it just says the same thing the actual declaration
does.
> Can you write something a little more useful?

Done.

http://codereview.chromium.org/7065052/diff/28002/chrome/browser/ui/touch/tab...
chrome/browser/ui/touch/tabs/touch_tab_strip_controller.h:17: class
TouchTabStripController: public BrowserTabStripController {
On 2011/06/17 16:20:49, brettw wrote:
> Space before colon.

Done.

http://codereview.chromium.org/7065052/diff/28002/chrome/browser/ui/touch/tab...
chrome/browser/ui/touch/tabs/touch_tab_strip_controller.h:41: // Our consumer
for touch icon requests
On 2011/06/17 16:20:49, brettw wrote:
> Make sure your comments end with periods.

Done.

http://codereview.chromium.org/7065052/diff/28002/chrome/browser/ui/views/tab...
File chrome/browser/ui/views/tabs/browser_tab_strip_controller.cc (right):

http://codereview.chromium.org/7065052/diff/28002/chrome/browser/ui/views/tab...
chrome/browser/ui/views/tabs/browser_tab_strip_controller.cc:415: for (int i =
0; i < tabstrip_->tab_count(); ++i) {
I did not write that code. I just moved it because I noticed it was in the wrong
place in the file, but ok I will fix :-)

http://codereview.chromium.org/7065052/diff/28002/content/browser/cancelable_...
File content/browser/cancelable_request.h (right):

http://codereview.chromium.org/7065052/diff/28002/content/browser/cancelable_...
content/browser/cancelable_request.h:250: // Cancels all requests outstanding
matching the client data
On 2011/06/17 16:20:49, brettw wrote:
> Needs period.

Done.

http://codereview.chromium.org/7065052/diff/28002/content/browser/cancelable_...
content/browser/cancelable_request.h:347: bool
CancelableRequestConsumerTSimple<T>::HasPendingRequestsForClientData(
On 2011/06/17 16:20:49, brettw wrote:
> Do we really need this function? In your single call site that uses it, it
would
> be better to remove. You're doing a brute-force search to find if there are
any
> requests, and then another brute-force search to remove them all. Why not just
> skip the first one?

Done.

http://codereview.chromium.org/7065052/diff/28002/content/browser/cancelable_...
content/browser/cancelable_request.h:351: if (i->second == client_data) {
On 2011/06/17 16:20:49, brettw wrote:
> No {} for single-line conditionals.

Done.

http://codereview.chromium.org/7065052/diff/28002/content/browser/cancelable_...
content/browser/cancelable_request.h:383: i != copied_requests.end(); ++i)
OK but this is a cut-and-paste from above :-) Which I will fix.

Powered by Google App Engine
This is Rietveld 408576698