OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #include "ui/native_theme/common_theme.h" | 5 #include "ui/native_theme/common_theme.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "base/memory/ptr_util.h" | 8 #include "base/memory/ptr_util.h" |
9 #include "third_party/skia/include/core/SkCanvas.h" | 9 #include "third_party/skia/include/core/SkCanvas.h" |
10 #include "ui/base/material_design/material_design_controller.h" | 10 #include "ui/base/material_design/material_design_controller.h" |
(...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
254 return kTableTextColor; | 254 return kTableTextColor; |
255 case NativeTheme::kColorId_TableSelectedText: | 255 case NativeTheme::kColorId_TableSelectedText: |
256 case NativeTheme::kColorId_TableSelectedTextUnfocused: | 256 case NativeTheme::kColorId_TableSelectedTextUnfocused: |
257 return kTableSelectedTextColor; | 257 return kTableSelectedTextColor; |
258 case NativeTheme::kColorId_TableSelectionBackgroundFocused: | 258 case NativeTheme::kColorId_TableSelectionBackgroundFocused: |
259 case NativeTheme::kColorId_TableSelectionBackgroundUnfocused: | 259 case NativeTheme::kColorId_TableSelectionBackgroundUnfocused: |
260 return kTableSelectionBackgroundColor; | 260 return kTableSelectionBackgroundColor; |
261 case NativeTheme::kColorId_TableGroupingIndicatorColor: | 261 case NativeTheme::kColorId_TableGroupingIndicatorColor: |
262 return kTableGroupingIndicatorColor; | 262 return kTableGroupingIndicatorColor; |
263 | 263 |
| 264 // Table Header |
| 265 case NativeTheme::kColorId_TableHeaderText: |
| 266 return base_theme->GetSystemColor( |
| 267 NativeTheme::kColorId_EnabledMenuItemForegroundColor); |
| 268 case NativeTheme::kColorId_TableHeaderBackground: |
| 269 return base_theme->GetSystemColor( |
| 270 NativeTheme::kColorId_MenuBackgroundColor); |
| 271 case NativeTheme::kColorId_TableHeaderSeparator: |
| 272 return base_theme->GetSystemColor( |
| 273 NativeTheme::kColorId_EnabledMenuButtonBorderColor); |
| 274 |
264 // FocusableBorder | 275 // FocusableBorder |
265 case NativeTheme::kColorId_FocusedBorderColor: | 276 case NativeTheme::kColorId_FocusedBorderColor: |
266 return gfx::kGoogleBlue500; | 277 return gfx::kGoogleBlue500; |
267 case NativeTheme::kColorId_UnfocusedBorderColor: | 278 case NativeTheme::kColorId_UnfocusedBorderColor: |
268 return SkColorSetA(SK_ColorBLACK, 0x66); | 279 return SkColorSetA(SK_ColorBLACK, 0x66); |
269 | 280 |
270 // Results Tables | 281 // Results Tables |
271 case NativeTheme::kColorId_ResultsTableNormalBackground: | 282 case NativeTheme::kColorId_ResultsTableNormalBackground: |
272 return kTextfieldDefaultBackground; | 283 return kTextfieldDefaultBackground; |
273 case NativeTheme::kColorId_ResultsTableHoveredBackground: | 284 case NativeTheme::kColorId_ResultsTableHoveredBackground: |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
350 } | 361 } |
351 if (menu_item.corner_radius > 0) { | 362 if (menu_item.corner_radius > 0) { |
352 const SkScalar radius = SkIntToScalar(menu_item.corner_radius); | 363 const SkScalar radius = SkIntToScalar(menu_item.corner_radius); |
353 canvas->drawRoundRect(gfx::RectToSkRect(rect), radius, radius, paint); | 364 canvas->drawRoundRect(gfx::RectToSkRect(rect), radius, radius, paint); |
354 return; | 365 return; |
355 } | 366 } |
356 canvas->drawRect(gfx::RectToSkRect(rect), paint); | 367 canvas->drawRect(gfx::RectToSkRect(rect), paint); |
357 } | 368 } |
358 | 369 |
359 } // namespace ui | 370 } // namespace ui |
OLD | NEW |