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

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

Issue 2640983002: Rename paint data structures (Closed)
Patch Set: DrawingDisplayItem Created 3 years, 10 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/native_theme/native_theme_base.cc ('k') | ui/native_theme/native_theme_mac.mm » ('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) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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_NATIVE_THEME_MAC_H_ 5 #ifndef UI_NATIVE_THEME_NATIVE_THEME_MAC_H_
6 #define UI_NATIVE_THEME_NATIVE_THEME_MAC_H_ 6 #define UI_NATIVE_THEME_NATIVE_THEME_MAC_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "ui/native_theme/native_theme_base.h" 9 #include "ui/native_theme/native_theme_base.h"
10 #include "ui/native_theme/native_theme_export.h" 10 #include "ui/native_theme/native_theme_export.h"
(...skipping 19 matching lines...) Expand all
30 // Adjusts an SkColor based on the current system control tint. For example, 30 // Adjusts an SkColor based on the current system control tint. For example,
31 // if the current tint is "graphite", this function maps the provided value to 31 // if the current tint is "graphite", this function maps the provided value to
32 // an appropriate gray. 32 // an appropriate gray.
33 static SkColor ApplySystemControlTint(SkColor color); 33 static SkColor ApplySystemControlTint(SkColor color);
34 34
35 // Overridden from NativeTheme: 35 // Overridden from NativeTheme:
36 SkColor GetSystemColor(ColorId color_id) const override; 36 SkColor GetSystemColor(ColorId color_id) const override;
37 37
38 // Overridden from NativeThemeBase: 38 // Overridden from NativeThemeBase:
39 void PaintMenuPopupBackground( 39 void PaintMenuPopupBackground(
40 SkCanvas* canvas, 40 cc::PaintCanvas* canvas,
41 const gfx::Size& size, 41 const gfx::Size& size,
42 const MenuBackgroundExtraParams& menu_background) const override; 42 const MenuBackgroundExtraParams& menu_background) const override;
43 void PaintMenuItemBackground( 43 void PaintMenuItemBackground(
44 SkCanvas* canvas, 44 cc::PaintCanvas* canvas,
45 State state, 45 State state,
46 const gfx::Rect& rect, 46 const gfx::Rect& rect,
47 const MenuItemExtraParams& menu_item) const override; 47 const MenuItemExtraParams& menu_item) const override;
48 48
49 // Creates a shader appropriate for painting the background of a button. 49 // Creates a shader appropriate for painting the background of a button.
50 static sk_sp<SkShader> GetButtonBackgroundShader(ButtonBackgroundType type, 50 static sk_sp<SkShader> GetButtonBackgroundShader(ButtonBackgroundType type,
51 int height); 51 int height);
52 52
53 // Creates a shader for the button border. This should be painted over with 53 // Creates a shader for the button border. This should be painted over with
54 // the background after insetting the rounded rect. 54 // the background after insetting the rounded rect.
55 static sk_sp<SkShader> GetButtonBorderShader(ButtonBackgroundType type, 55 static sk_sp<SkShader> GetButtonBorderShader(ButtonBackgroundType type,
56 int height); 56 int height);
57 57
58 // Paints the styled button shape used for default controls on Mac. The basic 58 // Paints the styled button shape used for default controls on Mac. The basic
59 // style is used for dialog buttons, comboboxes, and tabbed pane tabs. 59 // style is used for dialog buttons, comboboxes, and tabbed pane tabs.
60 // Depending on the control part being drawn, the left or the right side can 60 // Depending on the control part being drawn, the left or the right side can
61 // be given rounded corners. 61 // be given rounded corners.
62 static void PaintStyledGradientButton(SkCanvas* canvas, 62 static void PaintStyledGradientButton(cc::PaintCanvas* canvas,
63 const gfx::Rect& bounds, 63 const gfx::Rect& bounds,
64 ButtonBackgroundType type, 64 ButtonBackgroundType type,
65 bool round_left, 65 bool round_left,
66 bool round_right, 66 bool round_right,
67 bool focus); 67 bool focus);
68 68
69 protected: 69 protected:
70 friend class NativeTheme; 70 friend class NativeTheme;
71 static NativeThemeMac* instance(); 71 static NativeThemeMac* instance();
72 72
73 private: 73 private:
74 NativeThemeMac(); 74 NativeThemeMac();
75 ~NativeThemeMac() override; 75 ~NativeThemeMac() override;
76 76
77 DISALLOW_COPY_AND_ASSIGN(NativeThemeMac); 77 DISALLOW_COPY_AND_ASSIGN(NativeThemeMac);
78 }; 78 };
79 79
80 } // namespace ui 80 } // namespace ui
81 81
82 #endif // UI_NATIVE_THEME_NATIVE_THEME_MAC_H_ 82 #endif // UI_NATIVE_THEME_NATIVE_THEME_MAC_H_
OLDNEW
« no previous file with comments | « ui/native_theme/native_theme_base.cc ('k') | ui/native_theme/native_theme_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698