blob: b36c91477392fdfade804e61067592e777ad05e2 [file] [log] [blame]
[email protected]990e6222012-11-16 13:31:181// 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
3// found in the LICENSE file.
4
5#include "ui/native_theme/native_theme.h"
6
[email protected]a673f352012-11-20 00:52:297#include "base/command_line.h"
8#include "ui/base/ui_base_switches.h"
[email protected]990e6222012-11-16 13:31:189
[email protected]a673f352012-11-20 00:52:2910namespace ui {
[email protected]990e6222012-11-16 13:31:1811
12void NativeTheme::SetScrollbarColors(unsigned inactive_color,
13 unsigned active_color,
14 unsigned track_color) {
15 thumb_inactive_color_ = inactive_color;
16 thumb_active_color_ = active_color;
17 track_color_ = track_color;
18}
19
20// NativeTheme::instance() is implemented in the platform specific source files,
21// such as native_theme_win.cc or native_theme_linux.cc
22
[email protected]a673f352012-11-20 00:52:2923// static
24bool NativeTheme::IsNewMenuStyleEnabled() {
25 static bool enable_new_menu_style =
26 CommandLine::ForCurrentProcess()->HasSwitch(
27 switches::kEnableNewMenuStyle);
28 return enable_new_menu_style;
29}
30
31NativeTheme::NativeTheme()
32 : thumb_inactive_color_(0xeaeaea),
33 thumb_active_color_(0xf4f4f4),
34 track_color_(0xd3d3d3) {
35}
36
[email protected]7f98def2012-12-10 22:04:1737NativeTheme::~NativeTheme() {}
38
[email protected]990e6222012-11-16 13:31:1839} // namespace ui