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

Issue 19471005: Add custom default theme support and create a managed user default theme. (Closed)

Created:
7 years, 5 months ago by Adrian Kuegel
Modified:
7 years, 5 months ago
CC:
chromium-reviews, pam+watch_chromium.org
Visibility:
Public.

Description

Add custom default theme support and create a managed user default theme. Add a new interface called CustomThemeProvider. The ThemeService will have a CustomThemeProvider to access the theme assets. One subclass of the CustomThemeProvider is the BrowserThemePack, which is used to install themes represented as extensions. Other subclasses can be custom default themes, like the Linux X11 native theme, or the Managed User Theme. BUG=241377, 251225 TEST=unit_tests Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=213866

Patch Set 1 #

Patch Set 2 : Fix bugs. #

Total comments: 23

Patch Set 3 : Address review comments. #

Total comments: 38

Patch Set 4 : Address review comments and add tests. #

Total comments: 22

Patch Set 5 : Address nits and add another test. #

Total comments: 6

Patch Set 6 : Run new test only on Linux. #

Patch Set 7 : Address nits. #

Patch Set 8 : Define color constant for label background. #

Total comments: 14

Patch Set 9 : Address review comments. #

Patch Set 10 : Don't call NotifyThemeChanged if not ready. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+461 lines, -207 lines) Patch
A chrome/browser/managed_mode/managed_user_theme.h View 1 2 3 4 5 6 7 8 1 chunk +31 lines, -0 lines 0 comments Download
A chrome/browser/managed_mode/managed_user_theme.cc View 1 2 3 4 5 6 7 1 chunk +61 lines, -0 lines 0 comments Download
M chrome/browser/themes/browser_theme_pack.h View 1 2 3 4 5 6 5 chunks +18 lines, -31 lines 0 comments Download
M chrome/browser/themes/browser_theme_pack.cc View 1 2 3 4 chunks +18 lines, -16 lines 0 comments Download
M chrome/browser/themes/browser_theme_pack_unittest.cc View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
A chrome/browser/themes/custom_theme_supplier.h View 1 2 3 4 5 6 7 8 1 chunk +82 lines, -0 lines 0 comments Download
A chrome/browser/themes/custom_theme_supplier.cc View 1 2 3 4 1 chunk +44 lines, -0 lines 0 comments Download
M chrome/browser/themes/theme_properties.h View 1 chunk +0 lines, -2 lines 0 comments Download
M chrome/browser/themes/theme_properties.cc View 2 chunks +0 lines, -7 lines 0 comments Download
M chrome/browser/themes/theme_service.h View 1 2 3 4 5 6 7 8 6 chunks +26 lines, -3 lines 0 comments Download
M chrome/browser/themes/theme_service.cc View 1 2 3 4 5 6 7 8 9 17 chunks +74 lines, -51 lines 0 comments Download
M chrome/browser/themes/theme_service_aurax11.h View 1 2 3 4 5 6 7 8 1 chunk +3 lines, -19 lines 0 comments Download
M chrome/browser/themes/theme_service_aurax11.cc View 1 2 3 4 5 6 7 8 1 chunk +50 lines, -48 lines 0 comments Download
M chrome/browser/themes/theme_service_mac.mm View 1 2 3 chunks +4 lines, -4 lines 0 comments Download
M chrome/browser/themes/theme_service_unittest.cc View 1 2 3 4 5 6 7 8 3 chunks +36 lines, -2 lines 0 comments Download
M chrome/browser/ui/gtk/gtk_theme_service.h View 1 2 3 4 5 6 7 8 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/ui/gtk/gtk_theme_service.cc View 1 2 3 4 5 6 7 8 6 chunks +8 lines, -24 lines 0 comments Download
M chrome/chrome_browser.gypi View 1 2 3 4 5 6 7 8 9 2 chunks +4 lines, -0 lines 0 comments Download

Messages

Total messages: 20 (0 generated)
Adrian Kuegel
Peter, can you please review this CL? Compared to your suggestion I did the following ...
7 years, 5 months ago (2013-07-18 16:50:42 UTC) #1
pkotwicz
Sorry I could not get through the entire CL today. I will continue my review ...
7 years, 5 months ago (2013-07-19 05:54:13 UTC) #2
pkotwicz
On 2013/07/18 16:50:42, Adrian Kuegel wrote: > Peter, can you please review this CL? > ...
7 years, 5 months ago (2013-07-19 05:54:44 UTC) #3
Adrian Kuegel
Thanks for the review. I tried to fix the things you mentioned. https://codereview.chromium.org/19471005/diff/16001/chrome/browser/themes/custom_theme_provider.h File chrome/browser/themes/custom_theme_provider.h ...
7 years, 5 months ago (2013-07-19 13:54:39 UTC) #4
pkotwicz
Looks really good. Mostly nits https://codereview.chromium.org/19471005/diff/16001/chrome/browser/themes/theme_service.cc File chrome/browser/themes/theme_service.cc (right): https://codereview.chromium.org/19471005/diff/16001/chrome/browser/themes/theme_service.cc#newcode318 chrome/browser/themes/theme_service.cc:318: RemoveUnusedThemes(); Putting the check ...
7 years, 5 months ago (2013-07-19 18:33:20 UTC) #5
Adrian Kuegel
Hi Peter, I have now also added a small unit test which tests that the ...
7 years, 5 months ago (2013-07-22 12:58:08 UTC) #6
pkotwicz
LGTM with nits https://codereview.chromium.org/19471005/diff/43001/chrome/browser/managed_mode/managed_user_theme.h File chrome/browser/managed_mode/managed_user_theme.h (right): https://codereview.chromium.org/19471005/diff/43001/chrome/browser/managed_mode/managed_user_theme.h#newcode18 chrome/browser/managed_mode/managed_user_theme.h:18: // Overridden from CustomThemeProvider: Nit: CustomThemeSupplier ...
7 years, 5 months ago (2013-07-22 20:17:28 UTC) #7
Adrian Kuegel
https://codereview.chromium.org/19471005/diff/43001/chrome/browser/managed_mode/managed_user_theme.h File chrome/browser/managed_mode/managed_user_theme.h (right): https://codereview.chromium.org/19471005/diff/43001/chrome/browser/managed_mode/managed_user_theme.h#newcode18 chrome/browser/managed_mode/managed_user_theme.h:18: // Overridden from CustomThemeProvider: On 2013/07/22 20:17:28, pkotwicz wrote: ...
7 years, 5 months ago (2013-07-23 08:13:29 UTC) #8
Adrian Kuegel
Pam, can I please get your approval for managed_user_theme.* ? Elliot, can I please get ...
7 years, 5 months ago (2013-07-23 08:15:29 UTC) #9
Pam (message me for reviews)
https://codereview.chromium.org/19471005/diff/60001/chrome/browser/managed_mode/managed_user_theme.cc File chrome/browser/managed_mode/managed_user_theme.cc (right): https://codereview.chromium.org/19471005/diff/60001/chrome/browser/managed_mode/managed_user_theme.cc#newcode24 chrome/browser/managed_mode/managed_user_theme.cc:24: if (id == ThemeProperties::COLOR_FRAME) { How about a switch ...
7 years, 5 months ago (2013-07-23 10:14:17 UTC) #10
Adrian Kuegel
https://codereview.chromium.org/19471005/diff/60001/chrome/browser/managed_mode/managed_user_theme.cc File chrome/browser/managed_mode/managed_user_theme.cc (right): https://codereview.chromium.org/19471005/diff/60001/chrome/browser/managed_mode/managed_user_theme.cc#newcode24 chrome/browser/managed_mode/managed_user_theme.cc:24: if (id == ThemeProperties::COLOR_FRAME) { On 2013/07/23 10:14:17, Pam ...
7 years, 5 months ago (2013-07-23 10:26:36 UTC) #11
Pam (message me for reviews)
managed_mode LGTM
7 years, 5 months ago (2013-07-23 11:59:57 UTC) #12
Elliot Glaysher
https://codereview.chromium.org/19471005/diff/79001/chrome/browser/managed_mode/managed_user_theme.h File chrome/browser/managed_mode/managed_user_theme.h (right): https://codereview.chromium.org/19471005/diff/79001/chrome/browser/managed_mode/managed_user_theme.h#newcode14 chrome/browser/managed_mode/managed_user_theme.h:14: class ManagedUserTheme : public CustomThemeSupplier { Add class comment. ...
7 years, 5 months ago (2013-07-23 19:57:31 UTC) #13
pkotwicz
https://codereview.chromium.org/19471005/diff/79001/chrome/browser/ui/gtk/gtk_theme_service.cc File chrome/browser/ui/gtk/gtk_theme_service.cc (right): https://codereview.chromium.org/19471005/diff/79001/chrome/browser/ui/gtk/gtk_theme_service.cc#newcode301 chrome/browser/ui/gtk/gtk_theme_service.cc:301: use_gtk_ = profile->GetPrefs()->GetBoolean(prefs::kUsesSystemTheme); Leave |use_gtk_| as false. ThemeService::SetManagedUserTheme() does ...
7 years, 5 months ago (2013-07-23 20:59:52 UTC) #14
Adrian Kuegel
https://codereview.chromium.org/19471005/diff/79001/chrome/browser/managed_mode/managed_user_theme.h File chrome/browser/managed_mode/managed_user_theme.h (right): https://codereview.chromium.org/19471005/diff/79001/chrome/browser/managed_mode/managed_user_theme.h#newcode14 chrome/browser/managed_mode/managed_user_theme.h:14: class ManagedUserTheme : public CustomThemeSupplier { On 2013/07/23 19:57:31, ...
7 years, 5 months ago (2013-07-24 12:31:35 UTC) #15
Elliot Glaysher
lgtm
7 years, 5 months ago (2013-07-25 19:04:25 UTC) #16
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/akuegel@chromium.org/19471005/103001
7 years, 5 months ago (2013-07-26 08:03:07 UTC) #17
commit-bot: I haz the power
Retried try job too often on linux_rel for step(s) unit_tests http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=linux_rel&number=152598
7 years, 5 months ago (2013-07-26 10:10:36 UTC) #18
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/akuegel@chromium.org/19471005/143001
7 years, 5 months ago (2013-07-26 10:30:54 UTC) #19
commit-bot: I haz the power
7 years, 5 months ago (2013-07-26 12:41:13 UTC) #20
Message was sent while issue was closed.
Change committed as 213866

Powered by Google App Engine
This is Rietveld 408576698