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

Issue 222613005: views: Fix linux omnibox colors by refactoring omnibox_result_view.cc. (Closed)

Created:
6 years, 8 months ago by Elliot Glaysher
Modified:
6 years, 8 months ago
Reviewers:
msw, sky
CC:
chromium-reviews, tfarina, James Su
Visibility:
Public.

Description

views: Fix linux omnibox colors by refactoring omnibox_result_view.cc. Previously, colors in the omnibox were handled by checking if the result of GetNativeTheme() was NativeThemeAura::instance(). However, this meant in practice that there was an assumption that the native theme could only be NativeThemeWin or NativeThemeAura. This assumption meant that we did different things regarding omnibox colors on Win, Aura and Linux Aura/GTK. This patch adds color constants for the various colors used in the omnibox. It then separates the existing initialization code into NativeThemeWin and NativeThemeAura, as appropriate. Finally, it adds a NativeThemeGtk2, which matches the current GTK port. BUG=318484 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=261875

Patch Set 1 #

Patch Set 2 : Fix windows compile #

Patch Set 3 : Fix indentation on the table. #

Total comments: 12

Patch Set 4 : msw nits #

Patch Set 5 : Move table out of method so arraysize() works. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+299 lines, -74 lines) Patch
M chrome/browser/ui/libgtk2ui/native_theme_gtk2.cc View 1 2 3 3 chunks +125 lines, -1 line 0 comments Download
M chrome/browser/ui/libgtk2ui/skia_utils_gtk2.h View 1 chunk +10 lines, -0 lines 0 comments Download
M chrome/browser/ui/libgtk2ui/skia_utils_gtk2.cc View 1 chunk +0 lines, -2 lines 0 comments Download
M chrome/browser/ui/views/omnibox/omnibox_result_view.h View 1 chunk +0 lines, -4 lines 0 comments Download
M chrome/browser/ui/views/omnibox/omnibox_result_view.cc View 1 2 3 4 4 chunks +48 lines, -67 lines 0 comments Download
M ui/native_theme/fallback_theme.cc View 1 2 3 2 chunks +56 lines, -0 lines 0 comments Download
M ui/native_theme/native_theme.h View 1 chunk +16 lines, -0 lines 0 comments Download
M ui/native_theme/native_theme_win.cc View 1 2 3 1 chunk +44 lines, -0 lines 0 comments Download

Messages

Total messages: 11 (0 generated)
Elliot Glaysher
https://codereview.chromium.org/222613005/diff/40001/chrome/browser/ui/views/omnibox/omnibox_result_view.cc File chrome/browser/ui/views/omnibox/omnibox_result_view.cc (left): https://codereview.chromium.org/222613005/diff/40001/chrome/browser/ui/views/omnibox/omnibox_result_view.cc#oldcode147 chrome/browser/ui/views/omnibox/omnibox_result_view.cc:147: static SkColor colors[NUM_STATES][NUM_KINDS]; It's wrong that the colors here ...
6 years, 8 months ago (2014-04-03 18:14:58 UTC) #1
msw
https://codereview.chromium.org/222613005/diff/40001/chrome/browser/ui/views/omnibox/omnibox_result_view.cc File chrome/browser/ui/views/omnibox/omnibox_result_view.cc (right): https://codereview.chromium.org/222613005/diff/40001/chrome/browser/ui/views/omnibox/omnibox_result_view.cc#newcode137 chrome/browser/ui/views/omnibox/omnibox_result_view.cc:137: { NORMAL, BACKGROUND, NativeTheme::kColorId_ResultsTableNormalBackground }, nit: swapping the order ...
6 years, 8 months ago (2014-04-03 18:53:52 UTC) #2
Elliot Glaysher
https://codereview.chromium.org/222613005/diff/40001/chrome/browser/ui/views/omnibox/omnibox_result_view.cc File chrome/browser/ui/views/omnibox/omnibox_result_view.cc (right): https://codereview.chromium.org/222613005/diff/40001/chrome/browser/ui/views/omnibox/omnibox_result_view.cc#newcode137 chrome/browser/ui/views/omnibox/omnibox_result_view.cc:137: { NORMAL, BACKGROUND, NativeTheme::kColorId_ResultsTableNormalBackground }, On 2014/04/03 18:53:53, msw ...
6 years, 8 months ago (2014-04-03 20:25:27 UTC) #3
msw
https://codereview.chromium.org/222613005/diff/40001/chrome/browser/ui/views/omnibox/omnibox_result_view.cc File chrome/browser/ui/views/omnibox/omnibox_result_view.cc (right): https://codereview.chromium.org/222613005/diff/40001/chrome/browser/ui/views/omnibox/omnibox_result_view.cc#newcode137 chrome/browser/ui/views/omnibox/omnibox_result_view.cc:137: { NORMAL, BACKGROUND, NativeTheme::kColorId_ResultsTableNormalBackground }, On 2014/04/03 20:25:27, Elliot ...
6 years, 8 months ago (2014-04-03 20:30:24 UTC) #4
sky
https://codereview.chromium.org/222613005/diff/40001/ui/native_theme/native_theme.h File ui/native_theme/native_theme.h (right): https://codereview.chromium.org/222613005/diff/40001/ui/native_theme/native_theme.h#newcode284 ui/native_theme/native_theme.h:284: // Results Tables, such as the chrome omnibox. On ...
6 years, 8 months ago (2014-04-03 21:37:39 UTC) #5
sky
On 2014/04/03 21:37:39, sky wrote: > https://codereview.chromium.org/222613005/diff/40001/ui/native_theme/native_theme.h > File ui/native_theme/native_theme.h (right): > > https://codereview.chromium.org/222613005/diff/40001/ui/native_theme/native_theme.h#newcode284 > ...
6 years, 8 months ago (2014-04-03 21:38:41 UTC) #6
Elliot Glaysher
sky: could I get a review/lgtm?
6 years, 8 months ago (2014-04-03 22:39:41 UTC) #7
sky
As long as this results in the same colors, LGTM
6 years, 8 months ago (2014-04-04 14:14:28 UTC) #8
Elliot Glaysher
The CQ bit was checked by erg@chromium.org
6 years, 8 months ago (2014-04-04 18:04:26 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/erg@chromium.org/222613005/70001
6 years, 8 months ago (2014-04-04 18:04:40 UTC) #10
commit-bot: I haz the power
6 years, 8 months ago (2014-04-04 21:11:39 UTC) #11
Message was sent while issue was closed.
Change committed as 261875

Powered by Google App Engine
This is Rietveld 408576698