| 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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 43 break; | 43 break; |
| 44 case NativeTheme::kColorId_FocusedMenuItemBackgroundColor: | 44 case NativeTheme::kColorId_FocusedMenuItemBackgroundColor: |
| 45 *color = kMenuHighlightBackgroundColor; | 45 *color = kMenuHighlightBackgroundColor; |
| 46 break; | 46 break; |
| 47 case NativeTheme::kColorId_EnabledMenuItemForegroundColor: | 47 case NativeTheme::kColorId_EnabledMenuItemForegroundColor: |
| 48 *color = kEnabledMenuItemForegroundColor; | 48 *color = kEnabledMenuItemForegroundColor; |
| 49 break; | 49 break; |
| 50 case NativeTheme::kColorId_DisabledMenuItemForegroundColor: | 50 case NativeTheme::kColorId_DisabledMenuItemForegroundColor: |
| 51 *color = kDisabledMenuItemForegroundColor; | 51 *color = kDisabledMenuItemForegroundColor; |
| 52 break; | 52 break; |
| 53 case NativeTheme::kColorId_TextButtonDisabledColor: |
| 54 *color = kDisabledMenuItemForegroundColor; |
| 55 break; |
| 53 default: | 56 default: |
| 54 return false; | 57 return false; |
| 55 } | 58 } |
| 56 return true; | 59 return true; |
| 57 } | 60 } |
| 58 | 61 |
| 59 gfx::Size CommonThemeGetPartSize(NativeTheme::Part part, | 62 gfx::Size CommonThemeGetPartSize(NativeTheme::Part part, |
| 60 NativeTheme::State state, | 63 NativeTheme::State state, |
| 61 const NativeTheme::ExtraParams& extra) { | 64 const NativeTheme::ExtraParams& extra) { |
| 62 gfx::Size size; | 65 gfx::Size size; |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 111 paint.setColor(kMenuHighlightBackgroundColor); | 114 paint.setColor(kMenuHighlightBackgroundColor); |
| 112 break; | 115 break; |
| 113 default: | 116 default: |
| 114 NOTREACHED() << "Invalid state " << state; | 117 NOTREACHED() << "Invalid state " << state; |
| 115 break; | 118 break; |
| 116 } | 119 } |
| 117 canvas->drawRect(gfx::RectToSkRect(rect), paint); | 120 canvas->drawRect(gfx::RectToSkRect(rect), paint); |
| 118 } | 121 } |
| 119 | 122 |
| 120 } // namespace ui | 123 } // namespace ui |
| OLD | NEW |