| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef UI_NATIVE_THEME_COMMON_THEME_H_ | 5 #ifndef UI_NATIVE_THEME_COMMON_THEME_H_ |
| 6 #define UI_NATIVE_THEME_COMMON_THEME_H_ | 6 #define UI_NATIVE_THEME_COMMON_THEME_H_ |
| 7 | 7 |
| 8 #include "base/memory/scoped_ptr.h" | 8 #include <memory> |
| 9 |
| 9 #include "ui/native_theme/native_theme.h" | 10 #include "ui/native_theme/native_theme.h" |
| 10 | 11 |
| 11 class SkCanvas; | 12 class SkCanvas; |
| 12 | 13 |
| 13 namespace gfx { | 14 namespace gfx { |
| 14 class Canvas; | 15 class Canvas; |
| 15 } | 16 } |
| 16 | 17 |
| 17 namespace ui { | 18 namespace ui { |
| 18 | 19 |
| 19 // Drawing code that is common for all platforms. | 20 // Drawing code that is common for all platforms. |
| 20 | 21 |
| 21 // Returns the color to use on Aura for |color_id|. For a few colors that are | 22 // Returns the color to use on Aura for |color_id|. For a few colors that are |
| 22 // theme-specific, |base_theme| must be non-null; consult the code to see which | 23 // theme-specific, |base_theme| must be non-null; consult the code to see which |
| 23 // color IDs fall into this category. | 24 // color IDs fall into this category. |
| 24 SkColor NATIVE_THEME_EXPORT GetAuraColor(NativeTheme::ColorId color_id, | 25 SkColor NATIVE_THEME_EXPORT GetAuraColor(NativeTheme::ColorId color_id, |
| 25 const NativeTheme* base_theme); | 26 const NativeTheme* base_theme); |
| 26 | 27 |
| 27 void NATIVE_THEME_EXPORT CommonThemePaintMenuItemBackground( | 28 void NATIVE_THEME_EXPORT CommonThemePaintMenuItemBackground( |
| 28 const NativeTheme* theme, | 29 const NativeTheme* theme, |
| 29 SkCanvas* canvas, | 30 SkCanvas* canvas, |
| 30 NativeTheme::State state, | 31 NativeTheme::State state, |
| 31 const gfx::Rect& rect, | 32 const gfx::Rect& rect, |
| 32 const NativeTheme::MenuItemExtraParams& menu_item); | 33 const NativeTheme::MenuItemExtraParams& menu_item); |
| 33 | 34 |
| 34 // Creates a gfx::Canvas wrapping an SkCanvas. | 35 // Creates a gfx::Canvas wrapping an SkCanvas. |
| 35 scoped_ptr<gfx::Canvas> NATIVE_THEME_EXPORT CommonThemeCreateCanvas( | 36 std::unique_ptr<gfx::Canvas> NATIVE_THEME_EXPORT |
| 36 SkCanvas* sk_canvas); | 37 CommonThemeCreateCanvas(SkCanvas* sk_canvas); |
| 37 | 38 |
| 38 } // namespace ui | 39 } // namespace ui |
| 39 | 40 |
| 40 #endif // UI_NATIVE_THEME_COMMON_THEME_H_ | 41 #endif // UI_NATIVE_THEME_COMMON_THEME_H_ |
| OLD | NEW |