summaryrefslogtreecommitdiffstats
path: root/chrome/browser/views/location_bar_view.h
diff options
context:
space:
mode:
authorpkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-09-04 19:58:29 +0000
committerpkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-09-04 19:58:29 +0000
commiteab649b121dace28275e04d6d66e09cd0b7705dc (patch)
treedd1e01ed8eddd2a7231fe97c7a9dec4cd86482fe /chrome/browser/views/location_bar_view.h
parent6fee4dfc66709548f053aeb6e1e4f10482e514da (diff)
downloadchromium_src-eab649b121dace28275e04d6d66e09cd0b7705dc.zip
chromium_src-eab649b121dace28275e04d6d66e09cd0b7705dc.tar.gz
chromium_src-eab649b121dace28275e04d6d66e09cd0b7705dc.tar.bz2
Use system themes where possible in Omnibox edit and dropdown; in other cases, provide a pair of colors and use whichever contrasts more with the relevant background color, to maintain readability.
BUG=92,18367 TEST=Use the omnibox on various non-default and high-contrast system themes. Observe that everything is always readable. Review URL: http://codereview.chromium.org/200009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25494 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/views/location_bar_view.h')
-rw-r--r--chrome/browser/views/location_bar_view.h16
1 files changed, 15 insertions, 1 deletions
diff --git a/chrome/browser/views/location_bar_view.h b/chrome/browser/views/location_bar_view.h
index dcc00da..919821f 100644
--- a/chrome/browser/views/location_bar_view.h
+++ b/chrome/browser/views/location_bar_view.h
@@ -56,6 +56,17 @@ class LocationBarView : public LocationBar,
virtual void OnInputInProgress(bool in_progress) = 0;
};
+ enum ColorKind {
+ BACKGROUND = 0,
+ TEXT,
+ SELECTED_TEXT,
+ DEEMPHASIZED_TEXT,
+ SECURITY_TEXT,
+ SECURITY_INFO_BUBBLE_TEXT,
+ SCHEME_STRIKEOUT,
+ NUM_KINDS
+ };
+
LocationBarView(Profile* profile,
CommandUpdater* command_updater,
ToolbarModel* model,
@@ -70,6 +81,10 @@ class LocationBarView : public LocationBar,
// only be called when the receiving instance is attached to a view container.
bool IsInitialized() const;
+ // Returns the appropriate color for the desired kind, based on the user's
+ // system theme.
+ static SkColor GetColor(bool is_secure, ColorKind kind);
+
// Updates the location bar. We also reset the bar's permanent text and
// security style, and, if |tab_for_state_restoring| is non-NULL, also restore
// saved state that the tab holds.
@@ -140,7 +155,6 @@ class LocationBarView : public LocationBar,
virtual int PageActionVisibleCount();
static const int kVertMargin;
- static const SkColor kBackgroundColorByLevel[];
protected:
void Focus();