| 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 "grit/ui_resources.h" | 8 #include "grit/ui_resources.h" |
| 9 #include "third_party/skia/include/core/SkCanvas.h" | 9 #include "third_party/skia/include/core/SkCanvas.h" |
| 10 #include "ui/base/resource/resource_bundle.h" | 10 #include "ui/base/resource/resource_bundle.h" |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 63 break; | 63 break; |
| 64 case NativeTheme::kColorId_HoverMenuItemBackgroundColor: | 64 case NativeTheme::kColorId_HoverMenuItemBackgroundColor: |
| 65 *color = kHoverMenuItemBackgroundColor; | 65 *color = kHoverMenuItemBackgroundColor; |
| 66 break; | 66 break; |
| 67 case NativeTheme::kColorId_EnabledMenuItemForegroundColor: | 67 case NativeTheme::kColorId_EnabledMenuItemForegroundColor: |
| 68 *color = kEnabledMenuItemForegroundColor; | 68 *color = kEnabledMenuItemForegroundColor; |
| 69 break; | 69 break; |
| 70 case NativeTheme::kColorId_DisabledMenuItemForegroundColor: | 70 case NativeTheme::kColorId_DisabledMenuItemForegroundColor: |
| 71 *color = kDisabledMenuItemForegroundColor; | 71 *color = kDisabledMenuItemForegroundColor; |
| 72 break; | 72 break; |
| 73 case NativeTheme::kColorId_BoldedDisabledMenuItemForegroundColor: |
| 74 *color = SK_ColorBLACK; |
| 75 break; |
| 73 case NativeTheme::kColorId_SelectedMenuItemForegroundColor: | 76 case NativeTheme::kColorId_SelectedMenuItemForegroundColor: |
| 74 *color = SK_ColorWHITE; | 77 *color = SK_ColorWHITE; |
| 75 break; | 78 break; |
| 76 case NativeTheme::kColorId_ButtonDisabledColor: | 79 case NativeTheme::kColorId_ButtonDisabledColor: |
| 77 *color = kDisabledMenuItemForegroundColor; | 80 *color = kDisabledMenuItemForegroundColor; |
| 78 break; | 81 break; |
| 79 default: | 82 default: |
| 80 return false; | 83 return false; |
| 81 } | 84 } |
| 82 | 85 |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 158 paint.setColor(color); | 161 paint.setColor(color); |
| 159 break; | 162 break; |
| 160 default: | 163 default: |
| 161 NOTREACHED() << "Invalid state " << state; | 164 NOTREACHED() << "Invalid state " << state; |
| 162 break; | 165 break; |
| 163 } | 166 } |
| 164 canvas->drawRect(gfx::RectToSkRect(rect), paint); | 167 canvas->drawRect(gfx::RectToSkRect(rect), paint); |
| 165 } | 168 } |
| 166 | 169 |
| 167 } // namespace ui | 170 } // namespace ui |
| OLD | NEW |