| Index: ui/gfx/native_theme_aura.cc
|
| diff --git a/ui/gfx/native_theme_aura.cc b/ui/gfx/native_theme_aura.cc
|
| index 230088807661fb0d3455aee4b8f03068654f6484..9690def92aef49985d172c87b0c6f93944c7d03c 100644
|
| --- a/ui/gfx/native_theme_aura.cc
|
| +++ b/ui/gfx/native_theme_aura.cc
|
| @@ -1,10 +1,11 @@
|
| -// Copyright (c) 2011 The Chromium Authors. All rights reserved.
|
| +// Copyright (c) 2012 The Chromium Authors. All rights reserved.
|
| // Use of this source code is governed by a BSD-style license that can be
|
| // found in the LICENSE file.
|
|
|
| #include "ui/gfx/native_theme_aura.h"
|
|
|
| #include "base/basictypes.h"
|
| +#include "base/logging.h"
|
| #include "grit/gfx_resources.h"
|
| #include "ui/base/resource/resource_bundle.h"
|
| #include "ui/gfx/size.h"
|
| @@ -12,7 +13,26 @@
|
|
|
| namespace {
|
|
|
| -const SkColor kMenuBackgroundColor = SkColorSetRGB(0xed, 0xed, 0xed);
|
| +const SkColor kMenuBackgroundColor = SkColorSetRGB(0xED, 0xED, 0xED);
|
| +
|
| +// Theme colors returned by GetSystemColor().
|
| +const SkColor kInvalidColorIdColor = SkColorSetRGB(255, 0, 128);
|
| +// Dialogs:
|
| +const SkColor kDialogBackgroundColor = SK_ColorWHITE;
|
| +// FocusableBorder:
|
| +const SkColor kFocusedBorderColor = SkColorSetRGB(0x4D, 0x90, 0xFE);
|
| +const SkColor kUnfocusedBorderColor = SkColorSetRGB(0xD9, 0xD9, 0xD9);
|
| +// TextButton:
|
| +const SkColor kTextButtonBackgroundColor = SkColorSetRGB(0xDE, 0xDE, 0xDE);
|
| +const SkColor kTextButtonEnabledColor = SkColorSetRGB(0x44, 0x44, 0x44);
|
| +const SkColor kTextButtonDisabledColor = SkColorSetRGB(0x99, 0x99, 0x99);
|
| +const SkColor kTextButtonHighlightColor = SkColorSetRGB(0, 0, 0);
|
| +const SkColor kTextButtonHoverColor = kTextButtonEnabledColor;
|
| +// MenuItem:
|
| +const SkColor kEnabledMenuItemForegroundColor = SK_ColorBLACK;
|
| +const SkColor kDisabledMenuItemForegroundColor =
|
| + SkColorSetRGB(0x80, 0x80, 0x80);
|
| +const SkColor kFocusedMenuItemBackgroundColor = SkColorSetRGB(0xDC, 0xE4, 0xFA);
|
|
|
| } // namespace
|
|
|
| @@ -35,6 +55,49 @@ NativeThemeAura::NativeThemeAura() {
|
| NativeThemeAura::~NativeThemeAura() {
|
| }
|
|
|
| +SkColor NativeThemeAura::GetSystemColor(ColorId color_id) const {
|
| + // This implementation returns hardcoded colors.
|
| + switch (color_id) {
|
| +
|
| + // Dialogs
|
| + case kColorId_DialogBackground:
|
| + return kDialogBackgroundColor;
|
| +
|
| + // FocusableBorder
|
| + case kColorId_FocusedBorderColor:
|
| + return kFocusedBorderColor;
|
| + case kColorId_UnfocusedBorderColor:
|
| + return kUnfocusedBorderColor;
|
| +
|
| + // TextButton
|
| + case kColorId_TextButtonBackgroundColor:
|
| + return kTextButtonBackgroundColor;
|
| + case kColorId_TextButtonEnabledColor:
|
| + return kTextButtonEnabledColor;
|
| + case kColorId_TextButtonDisabledColor:
|
| + return kTextButtonDisabledColor;
|
| + case kColorId_TextButtonHighlightColor:
|
| + return kTextButtonHighlightColor;
|
| + case kColorId_TextButtonHoverColor:
|
| + return kTextButtonHoverColor;
|
| +
|
| + // MenuItem
|
| + case kColorId_EnabledMenuItemForegroundColor:
|
| + return kEnabledMenuItemForegroundColor;
|
| + case kColorId_DisabledMenuItemForegroundColor:
|
| + return kDisabledMenuItemForegroundColor;
|
| + case kColorId_FocusedMenuItemBackgroundColor:
|
| + return kFocusedMenuItemBackgroundColor;
|
| +
|
| + default:
|
| + NOTREACHED() << "Invalid color_id: " << color_id;
|
| + break;
|
| + }
|
| +
|
| + // Return InvalidColor
|
| + return kInvalidColorIdColor;
|
| +}
|
| +
|
| void NativeThemeAura::PaintMenuPopupBackground(
|
| SkCanvas* canvas,
|
| State state,
|
|
|