| 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 198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 209 return kTextfieldDefaultColor; | 209 return kTextfieldDefaultColor; |
| 210 case NativeTheme::kColorId_TextfieldDefaultBackground: | 210 case NativeTheme::kColorId_TextfieldDefaultBackground: |
| 211 return kTextfieldDefaultBackground; | 211 return kTextfieldDefaultBackground; |
| 212 case NativeTheme::kColorId_TextfieldReadOnlyColor: | 212 case NativeTheme::kColorId_TextfieldReadOnlyColor: |
| 213 return kTextfieldReadOnlyColor; | 213 return kTextfieldReadOnlyColor; |
| 214 case NativeTheme::kColorId_TextfieldReadOnlyBackground: | 214 case NativeTheme::kColorId_TextfieldReadOnlyBackground: |
| 215 return kTextfieldReadOnlyBackground; | 215 return kTextfieldReadOnlyBackground; |
| 216 case NativeTheme::kColorId_TextfieldSelectionColor: | 216 case NativeTheme::kColorId_TextfieldSelectionColor: |
| 217 return kTextSelectionColor; | 217 return kTextSelectionColor; |
| 218 case NativeTheme::kColorId_TextfieldSelectionBackgroundFocused: | 218 case NativeTheme::kColorId_TextfieldSelectionBackgroundFocused: |
| 219 // Fallthrough intended. |
| 220 case NativeTheme::kColorId_TextfieldSelectionBackgroundUnfocused: |
| 219 return kTextSelectionBackgroundFocused; | 221 return kTextSelectionBackgroundFocused; |
| 220 | 222 |
| 221 // Tooltip | 223 // Tooltip |
| 222 case NativeTheme::kColorId_TooltipBackground: | 224 case NativeTheme::kColorId_TooltipBackground: |
| 223 return kTooltipBackground; | 225 return kTooltipBackground; |
| 224 case NativeTheme::kColorId_TooltipText: | 226 case NativeTheme::kColorId_TooltipText: |
| 225 return kTooltipTextColor; | 227 return kTooltipTextColor; |
| 226 | 228 |
| 227 // Tree | 229 // Tree |
| 228 case NativeTheme::kColorId_TreeBackground: | 230 case NativeTheme::kColorId_TreeBackground: |
| (...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 341 } | 343 } |
| 342 if (menu_item.corner_radius > 0) { | 344 if (menu_item.corner_radius > 0) { |
| 343 const SkScalar radius = SkIntToScalar(menu_item.corner_radius); | 345 const SkScalar radius = SkIntToScalar(menu_item.corner_radius); |
| 344 canvas->drawRoundRect(gfx::RectToSkRect(rect), radius, radius, paint); | 346 canvas->drawRoundRect(gfx::RectToSkRect(rect), radius, radius, paint); |
| 345 return; | 347 return; |
| 346 } | 348 } |
| 347 canvas->drawRect(gfx::RectToSkRect(rect), paint); | 349 canvas->drawRect(gfx::RectToSkRect(rect), paint); |
| 348 } | 350 } |
| 349 | 351 |
| 350 } // namespace ui | 352 } // namespace ui |
| OLD | NEW |