OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 // For WinDDK ATL compatibility, these ATL headers must come first. | 5 // For WinDDK ATL compatibility, these ATL headers must come first. |
6 #include "build/build_config.h" | 6 #include "build/build_config.h" |
7 #if defined(OS_WIN) | 7 #if defined(OS_WIN) |
8 #include <atlbase.h> // NOLINT | 8 #include <atlbase.h> // NOLINT |
9 #include <atlwin.h> // NOLINT | 9 #include <atlwin.h> // NOLINT |
10 #endif | 10 #endif |
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
132 SkColor AutocompleteResultView::GetColor(ResultViewState state, | 132 SkColor AutocompleteResultView::GetColor(ResultViewState state, |
133 ColorKind kind) { | 133 ColorKind kind) { |
134 static bool initialized = false; | 134 static bool initialized = false; |
135 static SkColor colors[NUM_STATES][NUM_KINDS]; | 135 static SkColor colors[NUM_STATES][NUM_KINDS]; |
136 if (!initialized) { | 136 if (!initialized) { |
137 #if defined(OS_WIN) | 137 #if defined(OS_WIN) |
138 colors[NORMAL][BACKGROUND] = color_utils::GetSysSkColor(COLOR_WINDOW); | 138 colors[NORMAL][BACKGROUND] = color_utils::GetSysSkColor(COLOR_WINDOW); |
139 colors[SELECTED][BACKGROUND] = color_utils::GetSysSkColor(COLOR_HIGHLIGHT); | 139 colors[SELECTED][BACKGROUND] = color_utils::GetSysSkColor(COLOR_HIGHLIGHT); |
140 colors[NORMAL][TEXT] = color_utils::GetSysSkColor(COLOR_WINDOWTEXT); | 140 colors[NORMAL][TEXT] = color_utils::GetSysSkColor(COLOR_WINDOWTEXT); |
141 colors[SELECTED][TEXT] = color_utils::GetSysSkColor(COLOR_HIGHLIGHTTEXT); | 141 colors[SELECTED][TEXT] = color_utils::GetSysSkColor(COLOR_HIGHLIGHTTEXT); |
| 142 #elif defined(USE_AURA) |
| 143 // TODO(beng): source from theme provider. |
| 144 colors[NORMAL][BACKGROUND] = SK_ColorWHITE; |
| 145 colors[SELECTED][BACKGROUND] = SK_ColorBLUE; |
| 146 colors[NORMAL][TEXT] = SK_ColorBLACK; |
| 147 colors[SELECTED][TEXT] = SK_ColorWHITE; |
142 #elif defined(TOOLKIT_USES_GTK) | 148 #elif defined(TOOLKIT_USES_GTK) |
143 GdkColor bg_color, selected_bg_color, text_color, selected_text_color; | 149 GdkColor bg_color, selected_bg_color, text_color, selected_text_color; |
144 gtk_util::GetTextColors( | 150 gtk_util::GetTextColors( |
145 &bg_color, &selected_bg_color, &text_color, &selected_text_color); | 151 &bg_color, &selected_bg_color, &text_color, &selected_text_color); |
146 colors[NORMAL][BACKGROUND] = gfx::GdkColorToSkColor(bg_color); | 152 colors[NORMAL][BACKGROUND] = gfx::GdkColorToSkColor(bg_color); |
147 colors[SELECTED][BACKGROUND] = gfx::GdkColorToSkColor(selected_bg_color); | 153 colors[SELECTED][BACKGROUND] = gfx::GdkColorToSkColor(selected_bg_color); |
148 colors[NORMAL][TEXT] = gfx::GdkColorToSkColor(text_color); | 154 colors[NORMAL][TEXT] = gfx::GdkColorToSkColor(text_color); |
149 colors[SELECTED][TEXT] = gfx::GdkColorToSkColor(selected_text_color); | 155 colors[SELECTED][TEXT] = gfx::GdkColorToSkColor(selected_text_color); |
150 #else | 156 #else |
151 // TODO(beng): source from theme provider. | 157 // TODO(beng): source from theme provider. |
(...skipping 368 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
520 | 526 |
521 // Paint the icon. | 527 // Paint the icon. |
522 canvas->DrawBitmapInt(*GetIcon(), GetMirroredXForRect(icon_bounds_), | 528 canvas->DrawBitmapInt(*GetIcon(), GetMirroredXForRect(icon_bounds_), |
523 icon_bounds_.y()); | 529 icon_bounds_.y()); |
524 | 530 |
525 // Paint the text. | 531 // Paint the text. |
526 int x = GetMirroredXForRect(text_bounds_); | 532 int x = GetMirroredXForRect(text_bounds_); |
527 mirroring_context_->Initialize(x, text_bounds_.width()); | 533 mirroring_context_->Initialize(x, text_bounds_.width()); |
528 PaintMatch(canvas, match_, x); | 534 PaintMatch(canvas, match_, x); |
529 } | 535 } |
OLD | NEW |