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

Issue 1492423003: Rejigger ThemeService: move exposure of ThemeProvider interface to a (Closed)

Created:
5 years ago by Evan Stade
Modified:
5 years ago
CC:
chromium-reviews, dbeam+watch-ntp_chromium.org, donnd+watch_chromium.org, melevin+watch_chromium.org, samarth+watch_chromium.org, dhollowa+watch_chromium.org, dougw+watch_chromium.org, dzhioev+watch_chromium.org, achuith+watch_chromium.org, noyau+watch_chromium.org, jfweitz+watch_chromium.org, David Black, davemoore+watch_chromium.org, oshima+watch_chromium.org, tfarina, kmadhusu+watch_chromium.org, skanuj+watch_chromium.org, Jered, pedrosimonetti+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Rejigger ThemeService: move exposure of ThemeProvider interface to a separate class. ThemeService provides a static way to get a ThemeProvider from a profile. This allows different ThemeProviders for different profiles (i.e. otr + original), while the majority of ThemeService remains per original profile. As a bonus, UsingSystemTheme is moved from ThemeProvider to ThemeService, where it seems more natural. It's still part of ThemeProvider on OSX, but only because updating OSX will require more effort (and more care). One new incognito color is implemented (for MD mode): COLOR_TOOLBAR. This is ironically not yet visible on the toolbar, but you can see it on the DL shelf. BUG=501377, 568388 Committed: https://crrev.com/68691b28a76845494f3b51d02e24844a69833032 Cr-Commit-Position: refs/heads/master@{#364812}

Patch Set 1 #

Patch Set 2 : add a test #

Total comments: 41

Patch Set 3 : respond to comments #

Total comments: 8

Patch Set 4 : some changes #

Patch Set 5 : fix typos #

Patch Set 6 : no enum #

Total comments: 1

Patch Set 7 : filed bug and comment #

Total comments: 6

Patch Set 8 : pko nits #

Patch Set 9 : fix mac? #

Patch Set 10 : fix mac? #

Patch Set 11 : mac bandaid #

Patch Set 12 : m #

Patch Set 13 : fixes? #

Total comments: 7

Patch Set 14 : fix that unittest #

Unified diffs Side-by-side diffs Delta from patch set Stats (+585 lines, -579 lines) Patch
M chrome/browser/chromeos/login/ui/simple_web_view_dialog.cc View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/search/instant_service.h View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/search/instant_service.cc View 1 2 3 4 5 6 chunks +25 lines, -30 lines 0 comments Download
M chrome/browser/search/local_ntp_source.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/browser/themes/theme_properties.h View 1 2 3 4 5 1 chunk +4 lines, -0 lines 0 comments Download
M chrome/browser/themes/theme_properties.cc View 1 2 3 4 5 3 chunks +10 lines, -2 lines 0 comments Download
M chrome/browser/themes/theme_service.h View 1 2 3 4 5 6 7 7 chunks +70 lines, -27 lines 0 comments Download
M chrome/browser/themes/theme_service.cc View 1 2 3 4 5 8 chunks +212 lines, -157 lines 0 comments Download
M chrome/browser/themes/theme_service_browsertest.cc View 1 3 chunks +10 lines, -6 lines 0 comments Download
M chrome/browser/themes/theme_service_mac.mm View 1 2 3 4 5 6 7 8 9 10 2 chunks +26 lines, -1 line 0 comments Download
M chrome/browser/themes/theme_service_unittest.cc View 1 4 chunks +31 lines, -2 lines 0 comments Download
M chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller.mm View 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/browser/ui/cocoa/bookmarks/bookmark_bar_folder_controller.mm View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/browser/ui/cocoa/bookmarks/bookmark_bar_toolbar_view.h View 2 chunks +3 lines, -3 lines 0 comments Download
M chrome/browser/ui/cocoa/bookmarks/bookmark_bar_toolbar_view.mm View 1 2 3 4 5 6 7 8 9 10 3 chunks +4 lines, -4 lines 0 comments Download
M chrome/browser/ui/cocoa/bookmarks/bookmark_bar_toolbar_view_unittest.mm View 1 2 3 4 5 6 7 8 9 4 chunks +4 lines, -4 lines 0 comments Download
M chrome/browser/ui/cocoa/bookmarks/bookmark_button.h View 2 chunks +3 lines, -3 lines 0 comments Download
M chrome/browser/ui/cocoa/browser_window_controller.mm View 1 2 3 4 5 6 7 8 9 10 1 chunk +4 lines, -1 line 0 comments Download
M chrome/browser/ui/cocoa/gradient_button_cell.mm View 1 2 3 4 5 6 7 8 1 chunk +2 lines, -3 lines 0 comments Download
M chrome/browser/ui/cocoa/styled_text_field_cell.mm View 1 2 3 4 5 6 7 8 2 chunks +2 lines, -4 lines 0 comments Download
M chrome/browser/ui/cocoa/tab_contents/tab_contents_controller.mm View 1 2 3 4 5 6 7 8 1 chunk +1 line, -2 lines 0 comments Download
M chrome/browser/ui/cocoa/tabs/tab_strip_controller.mm View 1 2 3 4 5 6 7 8 9 10 2 chunks +2 lines, -3 lines 0 comments Download
M chrome/browser/ui/cocoa/tabs/tab_view.mm View 1 2 3 4 5 6 7 8 2 chunks +2 lines, -3 lines 0 comments Download
M chrome/browser/ui/search/search_ui.h View 1 chunk +3 lines, -3 lines 0 comments Download
M chrome/browser/ui/search/search_ui.cc View 1 2 3 1 chunk +14 lines, -10 lines 0 comments Download
M chrome/browser/ui/toolbar/app_menu_icon_painter_unittest.cc View 3 chunks +13 lines, -12 lines 0 comments Download
M chrome/browser/ui/views/frame/browser_desktop_window_tree_host_win.cc View 2 chunks +11 lines, -17 lines 0 comments Download
M chrome/browser/ui/views/frame/browser_desktop_window_tree_host_x11.cc View 2 chunks +23 lines, -17 lines 0 comments Download
M chrome/browser/ui/views/frame/browser_frame.h View 1 2 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/views/frame/browser_frame.cc View 1 2 1 chunk +3 lines, -2 lines 0 comments Download
M chrome/browser/ui/views/frame/browser_view.cc View 1 2 3 4 5 6 7 8 4 chunks +6 lines, -9 lines 0 comments Download
M chrome/browser/ui/views/toolbar/back_button.h View 1 chunk +3 lines, -1 line 0 comments Download
M chrome/browser/ui/views/toolbar/back_button.cc View 1 chunk +3 lines, -3 lines 0 comments Download
M chrome/browser/ui/views/toolbar/home_button.cc View 1 chunk +2 lines, -6 lines 0 comments Download
M chrome/browser/ui/views/toolbar/reload_button.h View 1 2 3 4 5 6 7 8 9 10 11 12 3 chunks +6 lines, -5 lines 0 comments Download
M chrome/browser/ui/views/toolbar/reload_button.cc View 2 chunks +3 lines, -4 lines 0 comments Download
M chrome/browser/ui/views/toolbar/reload_button_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 4 chunks +6 lines, -7 lines 0 comments Download
M chrome/browser/ui/views/toolbar/toolbar_action_view.h View 1 2 3 4 5 4 chunks +0 lines, -10 lines 0 comments Download
M chrome/browser/ui/views/toolbar/toolbar_action_view.cc View 1 2 3 4 5 4 chunks +2 lines, -20 lines 0 comments Download
M chrome/browser/ui/views/toolbar/toolbar_button.h View 3 chunks +8 lines, -1 line 0 comments Download
M chrome/browser/ui/views/toolbar/toolbar_button.cc View 1 2 3 4 5 3 chunks +7 lines, -3 lines 0 comments Download
D chrome/browser/ui/views/toolbar/toolbar_button_test.cc View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +0 lines, -132 lines 0 comments Download
M chrome/browser/ui/views/toolbar/toolbar_view.cc View 1 2 3 4 5 3 chunks +8 lines, -5 lines 0 comments Download
M chrome/browser/ui/webui/ntp/ntp_resource_cache.cc View 1 2 3 4 5 6 8 chunks +21 lines, -18 lines 0 comments Download
M chrome/browser/ui/webui/theme_handler.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/browser/ui/webui/theme_source.cc View 2 chunks +6 lines, -7 lines 0 comments Download
M chrome/chrome_tests.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +0 lines, -8 lines 0 comments Download
M chrome/test/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +0 lines, -4 lines 0 comments Download
M ui/base/default_theme_provider.h View 2 chunks +1 line, -1 line 0 comments Download
M ui/base/default_theme_provider.cc View 1 chunk +0 lines, -4 lines 0 comments Download
M ui/base/default_theme_provider_mac.mm View 1 chunk +4 lines, -0 lines 0 comments Download
M ui/base/theme_provider.h View 1 2 2 chunks +6 lines, -4 lines 0 comments Download

Messages

Total messages: 54 (19 generated)
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1492423003/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1492423003/20001
5 years ago (2015-12-04 01:19:49 UTC) #2
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: mac_chromium_compile_dbg_ng on tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_compile_dbg_ng/builds/131573) mac_chromium_gn_rel on ...
5 years ago (2015-12-04 01:40:19 UTC) #4
Evan Stade
(oops, forgot to add reviewers)
5 years ago (2015-12-04 16:07:11 UTC) #6
pkotwicz
Generally looks good. Thank you for making this change. You probably want to wait for ...
5 years ago (2015-12-04 23:16:50 UTC) #7
Evan Stade
> You probably want to wait for pkasting@ to agree that the general design's good ...
5 years ago (2015-12-07 19:05:12 UTC) #8
Peter Kasting
General approach seems OK. https://codereview.chromium.org/1492423003/diff/20001/chrome/browser/themes/theme_properties.h File chrome/browser/themes/theme_properties.h (right): https://codereview.chromium.org/1492423003/diff/20001/chrome/browser/themes/theme_properties.h#newcode134 chrome/browser/themes/theme_properties.h:134: static int PropertyToIncognitoProperty(int id); If ...
5 years ago (2015-12-08 22:52:58 UTC) #9
Evan Stade
https://codereview.chromium.org/1492423003/diff/20001/chrome/browser/themes/theme_properties.h File chrome/browser/themes/theme_properties.h (right): https://codereview.chromium.org/1492423003/diff/20001/chrome/browser/themes/theme_properties.h#newcode129 chrome/browser/themes/theme_properties.h:129: enum IncognitoThemeProperty { On 2015/12/04 23:16:49, pkotwicz wrote: > ...
5 years ago (2015-12-09 00:57:11 UTC) #10
Peter Kasting
It seems vaguely unfortunate that a lot of places seem to have to get the ...
5 years ago (2015-12-09 01:32:00 UTC) #11
Evan Stade
https://codereview.chromium.org/1492423003/diff/40001/chrome/browser/themes/theme_properties.h File chrome/browser/themes/theme_properties.h (right): https://codereview.chromium.org/1492423003/diff/40001/chrome/browser/themes/theme_properties.h#newcode135 chrome/browser/themes/theme_properties.h:135: static int PropertyToIncognitoProperty(int id); On 2015/12/09 01:31:59, Peter Kasting ...
5 years ago (2015-12-09 01:57:06 UTC) #12
pkotwicz
https://codereview.chromium.org/1492423003/diff/20001/chrome/browser/ui/webui/ntp/ntp_resource_cache.cc File chrome/browser/ui/webui/ntp/ntp_resource_cache.cc (right): https://codereview.chromium.org/1492423003/diff/20001/chrome/browser/ui/webui/ntp/ntp_resource_cache.cc#newcode342 chrome/browser/ui/webui/ntp/ntp_resource_cache.cc:342: ThemeService::GetThemeProviderForProfile(profile_); This class fetches colors as well using the ...
5 years ago (2015-12-09 02:08:29 UTC) #14
Evan Stade
https://codereview.chromium.org/1492423003/diff/20001/chrome/browser/ui/webui/ntp/ntp_resource_cache.cc File chrome/browser/ui/webui/ntp/ntp_resource_cache.cc (right): https://codereview.chromium.org/1492423003/diff/20001/chrome/browser/ui/webui/ntp/ntp_resource_cache.cc#newcode342 chrome/browser/ui/webui/ntp/ntp_resource_cache.cc:342: ThemeService::GetThemeProviderForProfile(profile_); On 2015/12/09 02:08:29, pkotwicz wrote: > This class ...
5 years ago (2015-12-09 23:38:40 UTC) #15
Evan Stade
https://codereview.chromium.org/1492423003/diff/100001/chrome/browser/themes/theme_properties.h File chrome/browser/themes/theme_properties.h (right): https://codereview.chromium.org/1492423003/diff/100001/chrome/browser/themes/theme_properties.h#newcode159 chrome/browser/themes/theme_properties.h:159: static SkColor GetDefaultColor(int id, bool otr); check it out, ...
5 years ago (2015-12-10 00:28:21 UTC) #16
Peter Kasting
On 2015/12/10 00:28:21, Evan Stade wrote: > https://codereview.chromium.org/1492423003/diff/100001/chrome/browser/themes/theme_properties.h > File chrome/browser/themes/theme_properties.h (right): > > https://codereview.chromium.org/1492423003/diff/100001/chrome/browser/themes/theme_properties.h#newcode159 ...
5 years ago (2015-12-10 00:38:27 UTC) #17
pkotwicz
https://codereview.chromium.org/1492423003/diff/20001/chrome/browser/ui/webui/ntp/ntp_resource_cache.cc File chrome/browser/ui/webui/ntp/ntp_resource_cache.cc (right): https://codereview.chromium.org/1492423003/diff/20001/chrome/browser/ui/webui/ntp/ntp_resource_cache.cc#newcode342 chrome/browser/ui/webui/ntp/ntp_resource_cache.cc:342: ThemeService::GetThemeProviderForProfile(profile_); I am asking you to fix this right ...
5 years ago (2015-12-10 01:02:02 UTC) #18
Evan Stade
https://codereview.chromium.org/1492423003/diff/20001/chrome/browser/ui/webui/ntp/ntp_resource_cache.cc File chrome/browser/ui/webui/ntp/ntp_resource_cache.cc (right): https://codereview.chromium.org/1492423003/diff/20001/chrome/browser/ui/webui/ntp/ntp_resource_cache.cc#newcode342 chrome/browser/ui/webui/ntp/ntp_resource_cache.cc:342: ThemeService::GetThemeProviderForProfile(profile_); On 2015/12/10 01:02:02, pkotwicz wrote: > I am ...
5 years ago (2015-12-10 01:31:17 UTC) #19
Evan Stade
> > I don't understand the urgency. There are no special colors for OTR in ...
5 years ago (2015-12-10 02:04:44 UTC) #21
pkotwicz
LGTM. Thank you for bearing with me https://codereview.chromium.org/1492423003/diff/120001/chrome/browser/themes/theme_service.h File chrome/browser/themes/theme_service.h (right): https://codereview.chromium.org/1492423003/diff/120001/chrome/browser/themes/theme_service.h#newcode125 chrome/browser/themes/theme_service.h:125: static const ...
5 years ago (2015-12-10 17:20:12 UTC) #22
Evan Stade
+thakis for chrome/browser/chromeos/login/ui/simple_web_view_dialog.cc chrome/browser/search/* ui/base/* https://codereview.chromium.org/1492423003/diff/120001/chrome/browser/themes/theme_service.h File chrome/browser/themes/theme_service.h (right): https://codereview.chromium.org/1492423003/diff/120001/chrome/browser/themes/theme_service.h#newcode125 chrome/browser/themes/theme_service.h:125: static const ui::ThemeProvider& GetThemeProviderForProfile(Profile* ...
5 years ago (2015-12-10 18:10:54 UTC) #24
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1492423003/140001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1492423003/140001
5 years ago (2015-12-10 18:12:07 UTC) #26
Nico
rs-lgtm
5 years ago (2015-12-10 18:14:09 UTC) #27
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: mac_chromium_compile_dbg_ng on tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_compile_dbg_ng/builds/134800) mac_chromium_rel_ng on ...
5 years ago (2015-12-10 18:30:08 UTC) #29
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1492423003/160001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1492423003/160001
5 years ago (2015-12-10 18:59:43 UTC) #31
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: mac_chromium_gn_rel on tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_gn_rel/builds/41722)
5 years ago (2015-12-10 19:20:15 UTC) #33
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1492423003/200001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1492423003/200001
5 years ago (2015-12-10 21:16:27 UTC) #35
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: mac_chromium_gn_rel on tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_gn_rel/builds/41817)
5 years ago (2015-12-10 21:49:27 UTC) #37
Evan Stade
+groby, can you review the cocoa files? Had to make some changes since last review ...
5 years ago (2015-12-10 23:27:07 UTC) #39
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1492423003/240001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1492423003/240001
5 years ago (2015-12-10 23:27:56 UTC) #41
Peter Kasting
LGTM
5 years ago (2015-12-10 23:54:10 UTC) #42
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: linux_chromium_asan_rel_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_asan_rel_ng/builds/91182) linux_chromium_rel_ng on ...
5 years ago (2015-12-11 00:28:44 UTC) #44
groby-ooo-7-16
https://codereview.chromium.org/1492423003/diff/240001/chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller.mm File chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller.mm (right): https://codereview.chromium.org/1492423003/diff/240001/chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller.mm#newcode2459 chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller.mm:2459: - (Profile*)profile { Do we need this method at ...
5 years ago (2015-12-11 02:32:01 UTC) #45
groby-ooo-7-16
Talked offline - can't remove profile just yet. (Some places rely on the protocol only, ...
5 years ago (2015-12-11 19:30:06 UTC) #46
Evan Stade
https://codereview.chromium.org/1492423003/diff/240001/chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller.mm File chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller.mm (right): https://codereview.chromium.org/1492423003/diff/240001/chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller.mm#newcode2459 chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller.mm:2459: - (Profile*)profile { On 2015/12/11 02:32:00, groby wrote: > ...
5 years ago (2015-12-11 19:36:58 UTC) #49
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1492423003/260001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1492423003/260001
5 years ago (2015-12-11 19:37:53 UTC) #50
commit-bot: I haz the power
Committed patchset #14 (id:260001)
5 years ago (2015-12-11 21:50:57 UTC) #52
commit-bot: I haz the power
5 years ago (2015-12-11 21:52:24 UTC) #54
Message was sent while issue was closed.
Patchset 14 (id:??) landed as
https://crrev.com/68691b28a76845494f3b51d02e24844a69833032
Cr-Commit-Position: refs/heads/master@{#364812}

Powered by Google App Engine
This is Rietveld 408576698