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 3// found in the LICENSE file. 4 5#include "ui/native_theme/native_theme_mac.h" 6 7#include "base/basictypes.h" 8#include "ui/native_theme/common_theme.h" 9 10namespace { 11 12const SkColor kInvalidColorIdColor = SkColorSetRGB(255, 0, 128); 13const SkColor kDialogBackgroundColor = SkColorSetRGB(251, 251, 251); 14 15} // namespace 16 17namespace ui { 18 19// static 20NativeTheme* NativeTheme::instance() { 21 return NativeThemeMac::instance(); 22} 23 24// static 25NativeThemeMac* NativeThemeMac::instance() { 26 CR_DEFINE_STATIC_LOCAL(NativeThemeMac, s_native_theme, ()); 27 return &s_native_theme; 28} 29 30SkColor NativeThemeMac::GetSystemColor(ColorId color_id) const { 31 SkColor color; 32 if (CommonThemeGetSystemColor(color_id, &color)) 33 return color; 34 35 switch (color_id) { 36 case kColorId_DialogBackground: 37 return kDialogBackgroundColor; 38 default: 39 NOTREACHED() << "Invalid color_id: " << color_id; 40 } 41 42 return kInvalidColorIdColor; 43} 44 45NativeThemeMac::NativeThemeMac() { 46} 47 48NativeThemeMac::~NativeThemeMac() { 49} 50 51} // namespace ui 52