summaryrefslogtreecommitdiffstats
path: root/ui/native_theme/native_theme_mac.mm
blob: c3152a8d14582fcd4275d808283e813769e68e6c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
// Copyright (c) 2013 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/native_theme/native_theme_mac.h"

#include "base/basictypes.h"
#include "ui/native_theme/common_theme.h"

namespace {

const SkColor kInvalidColorIdColor = SkColorSetRGB(255, 0, 128);
const SkColor kDialogBackgroundColor = SkColorSetRGB(251, 251, 251);

}  // namespace

namespace ui {

// static
NativeTheme* NativeTheme::instance() {
  return NativeThemeMac::instance();
}

// static
NativeThemeMac* NativeThemeMac::instance() {
  CR_DEFINE_STATIC_LOCAL(NativeThemeMac, s_native_theme, ());
  return &s_native_theme;
}

SkColor NativeThemeMac::GetSystemColor(ColorId color_id) const {
  SkColor color;
  if (CommonThemeGetSystemColor(color_id, &color))
    return color;

  switch (color_id) {
    case kColorId_DialogBackground:
      return kDialogBackgroundColor;
    default:
      NOTREACHED() << "Invalid color_id: " << color_id;
  }

  return kInvalidColorIdColor;
}

NativeThemeMac::NativeThemeMac() {
}

NativeThemeMac::~NativeThemeMac() {
}

}  // namespace ui