| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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/native_theme_mac.h" | 5 #include "ui/native_theme/native_theme_mac.h" |
| 6 | 6 |
| 7 #import <Cocoa/Cocoa.h> | 7 #import <Cocoa/Cocoa.h> |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 | 9 |
| 10 #include "base/mac/mac_util.h" | 10 #include "base/mac/mac_util.h" |
| (...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 175 switch (color_id) { | 175 switch (color_id) { |
| 176 case kColorId_WindowBackground: | 176 case kColorId_WindowBackground: |
| 177 return NSSystemColorToSkColor([NSColor windowBackgroundColor]); | 177 return NSSystemColorToSkColor([NSColor windowBackgroundColor]); |
| 178 case kColorId_DialogBackground: | 178 case kColorId_DialogBackground: |
| 179 return kDialogBackgroundColor; | 179 return kDialogBackgroundColor; |
| 180 case kColorId_BubbleBackground: | 180 case kColorId_BubbleBackground: |
| 181 return SK_ColorWHITE; | 181 return SK_ColorWHITE; |
| 182 | 182 |
| 183 case kColorId_FocusedBorderColor: | 183 case kColorId_FocusedBorderColor: |
| 184 return NSSystemColorToSkColor([NSColor keyboardFocusIndicatorColor]); | 184 return NSSystemColorToSkColor([NSColor keyboardFocusIndicatorColor]); |
| 185 case kColorId_FocusedMenuButtonBorderColor: | |
| 186 return NSSystemColorToSkColor([NSColor keyboardFocusIndicatorColor]); | |
| 187 case kColorId_UnfocusedBorderColor: | 185 case kColorId_UnfocusedBorderColor: |
| 188 return NSSystemColorToSkColor([NSColor controlColor]); | 186 return NSSystemColorToSkColor([NSColor controlColor]); |
| 189 | 187 |
| 190 // Buttons and labels. | 188 // Buttons and labels. |
| 191 case kColorId_HoverMenuButtonBorderColor: | |
| 192 return NSSystemColorToSkColor([NSColor controlBackgroundColor]); | |
| 193 case kColorId_ButtonEnabledColor: | 189 case kColorId_ButtonEnabledColor: |
| 194 case kColorId_EnabledMenuButtonBorderColor: | |
| 195 case kColorId_LabelEnabledColor: | 190 case kColorId_LabelEnabledColor: |
| 196 case kColorId_ProminentButtonColor: | 191 case kColorId_ProminentButtonColor: |
| 197 return NSSystemColorToSkColor([NSColor controlTextColor]); | 192 return NSSystemColorToSkColor([NSColor controlTextColor]); |
| 198 case kColorId_ButtonDisabledColor: | 193 case kColorId_ButtonDisabledColor: |
| 199 case kColorId_LabelDisabledColor: | 194 case kColorId_LabelDisabledColor: |
| 200 return NSSystemColorToSkColor([NSColor disabledControlTextColor]); | 195 return NSSystemColorToSkColor([NSColor disabledControlTextColor]); |
| 201 case kColorId_ButtonHoverColor: | 196 case kColorId_ButtonHoverColor: |
| 202 return NSSystemColorToSkColor([NSColor selectedControlTextColor]); | 197 return NSSystemColorToSkColor([NSColor selectedControlTextColor]); |
| 203 case kColorId_LabelTextSelectionColor: | 198 case kColorId_LabelTextSelectionColor: |
| 204 return NSSystemColorToSkColor([NSColor selectedTextColor]); | 199 return NSSystemColorToSkColor([NSColor selectedTextColor]); |
| (...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 436 canvas->drawDRRect(outer_shape, shape, flags); | 431 canvas->drawDRRect(outer_shape, shape, flags); |
| 437 } | 432 } |
| 438 | 433 |
| 439 NativeThemeMac::NativeThemeMac() { | 434 NativeThemeMac::NativeThemeMac() { |
| 440 } | 435 } |
| 441 | 436 |
| 442 NativeThemeMac::~NativeThemeMac() { | 437 NativeThemeMac::~NativeThemeMac() { |
| 443 } | 438 } |
| 444 | 439 |
| 445 } // namespace ui | 440 } // namespace ui |
| OLD | NEW |