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

Unified Diff: chrome/browser/ui/views/location_bar/location_bar_view.cc

Issue 11421204: Use native theme colors for textfields; etc. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Nix cursor color; adjust textfield functions; add read-only theme colors. Created 8 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/views/location_bar/location_bar_view.cc
diff --git a/chrome/browser/ui/views/location_bar/location_bar_view.cc b/chrome/browser/ui/views/location_bar/location_bar_view.cc
index 3a3c56242912321467630f46248f638eaa92c0f5..332e977dd05bee06de27288c0ac4a4998ff9490a 100644
--- a/chrome/browser/ui/views/location_bar/location_bar_view.cc
+++ b/chrome/browser/ui/views/location_bar/location_bar_view.cc
@@ -118,12 +118,6 @@ const int kDesktopScriptBadgeEdgeItemPadding = kDesktopScriptBadgeItemPadding;
const int kTouchItemPadding = 8;
const int kTouchEdgeItemPadding = kTouchItemPadding;
-#if defined(OS_CHROMEOS)
msw 2012/12/04 18:40:07 Varun: Is this still needed? It's purpose isn't ex
varunjain 2012/12/04 23:05:31 This was done because we want the omnibox to have
msw 2012/12/05 02:09:56 I in-lined the CrOS case into GetColor, as explain
-const SkColor kOmniboxBackgroundColor = SkColorSetARGB(0, 255, 255, 255);
-#else
-const SkColor kOmniboxBackgroundColor = SkColorSetARGB(255, 255, 255, 255);
-#endif
-
} // namespace
// static
@@ -325,26 +319,19 @@ bool LocationBarView::IsInitialized() const {
SkColor LocationBarView::GetColor(ToolbarModel::SecurityLevel security_level,
ColorKind kind) const {
-#if defined(OS_WIN)
- if (GetNativeTheme() == ui::NativeThemeWin::instance()) {
- switch (kind) {
- case BACKGROUND:
- return color_utils::GetSysSkColor(COLOR_WINDOW);
- case TEXT:
- return color_utils::GetSysSkColor(COLOR_WINDOWTEXT);
- case SELECTED_TEXT:
- return color_utils::GetSysSkColor(COLOR_HIGHLIGHTTEXT);
- default:
- // Other cases are handled below.
- break;
- }
- }
-#endif
+ const ui::NativeTheme* native_theme = GetNativeTheme();
switch (kind) {
- // TODO(beng): source from theme provider.
- case BACKGROUND: return kOmniboxBackgroundColor;
- case TEXT: return SK_ColorBLACK;
- case SELECTED_TEXT: return SK_ColorWHITE;
+ case BACKGROUND:
+ return native_theme->GetSystemColor(
+ ui::NativeTheme::kColorId_TextfieldDefaultBackground);
+
+ case TEXT:
+ return native_theme->GetSystemColor(
+ ui::NativeTheme::kColorId_TextfieldDefaultColor);
+
+ case SELECTED_TEXT:
+ return native_theme->GetSystemColor(
+ ui::NativeTheme::kColorId_TextfieldSelectionColor);
case DEEMPHASIZED_TEXT:
return color_utils::AlphaBlend(

Powered by Google App Engine
This is Rietveld 408576698