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

Issue 203034: Theme support for the extension shelf (Closed)

Created:
11 years, 3 months ago by Finnur
Modified:
9 years, 6 months ago
CC:
chromium-reviews_googlegroups.com, pam+watch_chromium.org, Ben Goodger (Google)
Visibility:
Public.

Description

ExtensionShelf now uses the BookmarkExtensionBackground, just like the BookmarkBarView. Changed the WebKit API to add an optional |id| parameter to the insertStyleText, which is needed to be able to replace style sheets that have been previously added. Added an interface that both BookmarkBarView and ExtensionShelf implement. This new interface tells us whether we are located at the top or at the bottom and whether we are detached from the frame or not. Factored out some of the duplicate painting-related code to a namespace of its own. Not happy with the name (welcome suggestions). Moved the check for whether extensions are on top to new class and now cache the value for the lifetime of the process. Toolstrip text color values are no longer hard-coded but use the color specified in the theme. Decreased the timeouts for showing and hiding the toolstrip handle. Replaced the pressed background image and the hover background image for the toolstrip to match what the bookmark bar uses. Known issues: Some themes expose the fact that: - The background for the extension shelf when in detached mode (and located on the bottom) does not seamlessly blend in with background of new tab page. Still works surprisingly well when it breaks, though. - Didn't spend much time theming the shelf handle (just used the solid color from the theme). BUG=18452, 21272, 21273 TEST=Install a theme for Chrome and make sure everything looks correct and is updated on a theme change. Also make sure painting problems in bugs 21272 and 21273 are fixed. Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=26178

Patch Set 1 #

Patch Set 2 : '' #

Total comments: 18

Patch Set 3 : '' #

Total comments: 7

Patch Set 4 : '' #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+664 lines, -489 lines) Patch
M chrome/browser/browser_resources.grd View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/extensions/extension_host.h View 1 chunk +3 lines, -0 lines 0 comments Download
M chrome/browser/extensions/extension_host.cc View 1 2 3 chunks +46 lines, -19 lines 0 comments Download
M chrome/browser/renderer_host/render_view_host.h View 1 chunk +4 lines, -2 lines 0 comments Download
M chrome/browser/renderer_host/render_view_host.cc View 4 chunks +8 lines, -6 lines 0 comments Download
MM chrome/browser/resources/extensions_toolstrip.css View 3 chunks +4 lines, -6 lines 0 comments Download
M chrome/browser/views/bookmark_bar_view.h View 1 2 5 chunks +11 lines, -10 lines 0 comments Download
M chrome/browser/views/bookmark_bar_view.cc View 1 2 6 chunks +15 lines, -28 lines 0 comments Download
A chrome/browser/views/detachable_toolbar_view.h View 1 2 1 chunk +98 lines, -0 lines 0 comments Download
A chrome/browser/views/detachable_toolbar_view.cc View 1 2 1 chunk +262 lines, -0 lines 0 comments Download
M chrome/browser/views/extensions/extension_shelf.h View 1 2 7 chunks +26 lines, -15 lines 0 comments Download
M chrome/browser/views/extensions/extension_shelf.cc View 1 2 18 chunks +104 lines, -149 lines 2 comments Download
M chrome/browser/views/frame/browser_view.h View 1 chunk +0 lines, -3 lines 0 comments Download
M chrome/browser/views/frame/browser_view.cc View 1 2 9 chunks +38 lines, -235 lines 0 comments Download
M chrome/chrome.gyp View 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/common/render_messages_internal.h View 1 chunk +3 lines, -2 lines 0 comments Download
M chrome/renderer/render_view.h View 2 chunks +7 lines, -3 lines 0 comments Download
M chrome/renderer/render_view.cc View 2 chunks +6 lines, -4 lines 0 comments Download
M chrome/renderer/user_script_slave.cc View 1 chunk +1 line, -1 line 0 comments Download
M webkit/api/public/WebFrame.h View 3 1 chunk +5 lines, -2 lines 0 comments Download
M webkit/glue/webframe_impl.h View 3 1 chunk +2 lines, -1 line 0 comments Download
M webkit/glue/webframe_impl.cc View 1 2 3 2 chunks +18 lines, -2 lines 0 comments Download

Messages

Total messages: 9 (0 generated)
Finnur
11 years, 3 months ago (2009-09-11 19:36:08 UTC) #1
Erik does not do reviews
http://codereview.chromium.org/203034/diff/2005/2012 File chrome/browser/resources/extensions_toolstrip.css (right): http://codereview.chromium.org/203034/diff/2005/2012#newcode89 Line 89: -webkit-border-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAaCAYAAACHD21cAAAAAXNSR0IArs4c6QAAAAZiS0dEAPYA+QD9Ry7YfAAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9kJChUuJy+ouI4AAAFXSURBVDjL7dSxTsJQFIDh/95SmqpEYjASAgPGGI26wGv4BMbBVUZewBQfRBxAZ0cXG2d8AANoFEJgAGOAkqK31wEGJ23cTPiTs53vjEcAYj5RYAmwgAjQYlYG+AR8wAOmgAaQwLLjlHL1RrM4HI0rKtA1z1c1z1c1FejacDSu1BvNouOUcsAyIA3AcpzS7mmhcJxKpQ4Nw0yoQM9OAirQSCOSiMfjB3t7+6ux2ErHdd2BANbqjeZJNps9UsFs8adeX56rO9tbZQlYyWQyH4RAAIn1jTxgScCwbXsz0L8jANu2NwEjArSnn9okZEIIE2hL/tgCLuB/guloRHyEBVrrDyAtATWZTJ7CwvmukoDf7XYfpAgHe73uA+BLwKtWKu7bYHD/Gxr0+/fXV1UX8AwgcN2791hspZPJZIZm1Iqappn4DjzPe2y3W7eX5Yubc+fsEfDFXx/yF0HjkTNryckZAAAAAElFTkSuQmCC) 6 round round; when I looked at ...
11 years, 3 months ago (2009-09-11 20:44:16 UTC) #2
Finnur
Updated. Please take another look. http://codereview.chromium.org/203034/diff/2005/2012 File chrome/browser/resources/extensions_toolstrip.css (right): http://codereview.chromium.org/203034/diff/2005/2012#newcode89 Line 89: -webkit-border-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAaCAYAAACHD21cAAAAAXNSR0IArs4c6QAAAAZiS0dEAPYA+QD9Ry7YfAAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9kJChUuJy+ouI4AAAFXSURBVDjL7dSxTsJQFIDh/95SmqpEYjASAgPGGI26wGv4BMbBVUZewBQfRBxAZ0cXG2d8AANoFEJgAGOAkqK31wEGJ23cTPiTs53vjEcAYj5RYAmwgAjQYlYG+AR8wAOmgAaQwLLjlHL1RrM4HI0rKtA1z1c1z1c1FejacDSu1BvNouOUcsAyIA3AcpzS7mmhcJxKpQ4Nw0yoQM9OAirQSCOSiMfjB3t7+6ux2ErHdd2BANbqjeZJNps9UsFs8adeX56rO9tbZQlYyWQyH4RAAIn1jTxgScCwbXsz0L8jANu2NwEjArSnn9okZEIIE2hL/tgCLuB/guloRHyEBVrrDyAtATWZTJ7CwvmukoDf7XYfpAgHe73uA+BLwKtWKu7bYHD/Gxr0+/fXV1UX8AwgcN2791hspZPJZIZm1Iqappn4DjzPe2y3W7eX5Yubc+fsEfDFXx/yF0HjkTNryckZAAAAAElFTkSuQmCC) 6 round ...
11 years, 3 months ago (2009-09-14 17:35:02 UTC) #3
Erik does not do reviews
LGTM - Thanks for making the id change. Definitely an improvement.
11 years, 3 months ago (2009-09-14 17:52:22 UTC) #4
darin (slow to review)
http://codereview.chromium.org/203034/diff/30/4015 File webkit/api/public/WebFrame.h (right): http://codereview.chromium.org/203034/diff/30/4015#newcode221 Line 221: virtual bool insertStyleText(const WebString& css, css -> styleText ...
11 years, 3 months ago (2009-09-14 17:52:41 UTC) #5
Finnur
Thanks for quick turnarounds! Updated CL. I think I have addressed all comments by Darin. ...
11 years, 3 months ago (2009-09-14 18:09:27 UTC) #6
darin (slow to review)
webkit/* changes LGTM
11 years, 3 months ago (2009-09-14 23:31:39 UTC) #7
Aaron Boodman
ExtensionVeiw changes lgtm http://codereview.chromium.org/203034/diff/7001/7004 File chrome/browser/views/extensions/extension_shelf.cc (right): http://codereview.chromium.org/203034/diff/7001/7004#newcode880 Line 880: if (!background_needs_repaint_ && background_for_detached_ == ...
11 years, 3 months ago (2009-09-17 19:42:38 UTC) #8
Finnur
11 years, 3 months ago (2009-09-17 22:23:07 UTC) #9
http://codereview.chromium.org/203034/diff/7001/7004
File chrome/browser/views/extensions/extension_shelf.cc (right):

http://codereview.chromium.org/203034/diff/7001/7004#newcode880
Line 880: if (!background_needs_repaint_ && background_for_detached_ ==
detached)
Yeah, in my upcoming changelist this flag (background_for_detached_) is no
longer there.

On 2009/09/17 19:42:38, Aaron Boodman wrote:
> Seems like you could consolidate these two cases by listening for the detach
> command and resetting the background_needs_repaint_ flag there.

Powered by Google App Engine
This is Rietveld 408576698