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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
|
// 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.
#ifndef UI_GFX_NATIVE_THEME_AURA_H_
#define UI_GFX_NATIVE_THEME_AURA_H_
#pragma once
#include <map>
#include "base/compiler_specific.h"
#include "ui/gfx/native_theme_base.h"
#include "ui/gfx/rect.h"
class SkBitmap;
namespace gfx {
// Aura implementation of native theme support.
class NativeThemeAura : public NativeThemeBase {
public:
static const NativeThemeAura* instance();
private:
NativeThemeAura();
virtual ~NativeThemeAura();
// NativeTheme overrides
virtual SkColor GetSystemColor(ColorId color_id) const OVERRIDE;
// NativeThemeBase overrides
virtual void PaintMenuPopupBackground(
SkCanvas* canvas,
State state,
const gfx::Rect& rect,
const MenuListExtraParams& menu_list) const OVERRIDE;
virtual void PaintScrollbarTrack(
SkCanvas* canvas,
Part part,
State state,
const ScrollbarTrackExtraParams& extra_params,
const gfx::Rect& rect) const OVERRIDE;
virtual void PaintArrowButton(
SkCanvas* canvas,
const gfx::Rect& rect,
Part direction,
State state) const OVERRIDE;
virtual void PaintScrollbarThumb(
SkCanvas* canvas,
Part part,
State state,
const gfx::Rect& rect) const OVERRIDE;
SkBitmap* GetHorizontalBitmapNamed(int resource_id) const;
// Cached images. Resource loader caches all retrieved bitmaps and keeps
// ownership of the pointers.
typedef std::map<int, SkBitmap*> SkImageMap;
mutable SkImageMap horizontal_bitmaps_;
DISALLOW_COPY_AND_ASSIGN(NativeThemeAura);
};
} // namespace gfx
#endif // UI_GFX_NATIVE_THEME_AURA_H_
|