Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(82)

Side by Side Diff: ui/native_theme/common_theme.h

Issue 1868363002: Replace scoped_ptr with std::unique_ptr in //ui (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@scopedptrcc
Patch Set: scopedptrui: rebase-make_scoped_ptr Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « ui/mojo/init/ui_init.h ('k') | ui/native_theme/common_theme.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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_
OLDNEW
« no previous file with comments | « ui/mojo/init/ui_init.h ('k') | ui/native_theme/common_theme.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698