Roll src/third_party/WebKit 06cb9e9:a978ee5 (svn 202558:202559)
[chromium-blink-merge.git] / ui / native_theme / common_theme.h
blob3253eb813f3de62cadf6b1f7098c0dc8e94290c5
1 // 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.
5 #ifndef UI_NATIVE_THEME_COMMON_THEME_H_
6 #define UI_NATIVE_THEME_COMMON_THEME_H_
8 #include "base/memory/scoped_ptr.h"
9 #include "ui/native_theme/native_theme.h"
11 class SkCanvas;
13 namespace gfx {
14 class Canvas;
17 namespace ui {
19 // Drawing code that is common for all platforms.
21 // Returns true and |color| if |color_id| is found, or false otherwise.
22 bool NATIVE_THEME_EXPORT CommonThemeGetSystemColor(
23 NativeTheme::ColorId color_id,
24 SkColor* color);
26 gfx::Size NATIVE_THEME_EXPORT CommonThemeGetPartSize(
27 NativeTheme::Part part,
28 NativeTheme::State state,
29 const NativeTheme::ExtraParams& extra);
31 void NATIVE_THEME_EXPORT CommonThemePaintComboboxArrow(
32 SkCanvas* canvas,
33 const gfx::Rect& rect);
35 void NATIVE_THEME_EXPORT
36 CommonThemePaintMenuSeparator(SkCanvas* canvas, const gfx::Rect& rect);
38 void NATIVE_THEME_EXPORT CommonThemePaintMenuGutter(SkCanvas* canvas,
39 const gfx::Rect& rect);
41 void NATIVE_THEME_EXPORT CommonThemePaintMenuBackground(SkCanvas* canvas,
42 const gfx::Rect& rect);
44 void NATIVE_THEME_EXPORT CommonThemePaintMenuItemBackground(
45 SkCanvas* canvas,
46 NativeTheme::State state,
47 const gfx::Rect& rect);
49 // Creates a gfx::Canvas wrapping an SkCanvas.
50 scoped_ptr<gfx::Canvas> NATIVE_THEME_EXPORT CommonThemeCreateCanvas(
51 SkCanvas* sk_canvas);
53 } // namespace ui
55 #endif // UI_NATIVE_THEME_COMMON_THEME_H_