Chromium Code Reviews| OLD | NEW |
|---|---|
| 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" |
| 11 | 11 |
| 12 namespace ui { | 12 namespace ui { |
| 13 | 13 |
| 14 // Mac implementation of native theme support. | 14 // Mac implementation of native theme support. |
| 15 class NATIVE_THEME_EXPORT NativeThemeMac : public NativeThemeBase { | 15 class NATIVE_THEME_EXPORT NativeThemeMac : public NativeThemeBase { |
| 16 public: | 16 public: |
| 17 static const int kComboboxCornerRadius = 5; | |
| 18 | |
| 17 static NativeThemeMac* instance(); | 19 static NativeThemeMac* instance(); |
| 18 | 20 |
| 19 // Overridden from NativeTheme: | 21 // Overridden from NativeTheme: |
| 20 SkColor GetSystemColor(ColorId color_id) const override; | 22 SkColor GetSystemColor(ColorId color_id) const override; |
| 21 | 23 |
| 22 // Overridden from NativeThemeBase: | 24 // Overridden from NativeThemeBase: |
| 23 void PaintMenuPopupBackground( | 25 void PaintMenuPopupBackground( |
| 24 SkCanvas* canvas, | 26 SkCanvas* canvas, |
| 25 const gfx::Size& size, | 27 const gfx::Size& size, |
| 26 const MenuBackgroundExtraParams& menu_background) const override; | 28 const MenuBackgroundExtraParams& menu_background) const override; |
| 27 void PaintMenuItemBackground( | 29 void PaintMenuItemBackground( |
| 28 SkCanvas* canvas, | 30 SkCanvas* canvas, |
| 29 State state, | 31 State state, |
| 30 const gfx::Rect& rect, | 32 const gfx::Rect& rect, |
| 31 const MenuItemExtraParams& menu_item) const override; | 33 const MenuItemExtraParams& menu_item) const override; |
| 32 | 34 |
| 35 static skia::RefPtr<SkShader> GetButtonBackgroundShader( | |
|
tapted
2016/03/22 23:04:32
nit: should have a comment
Elly Fong-Jones
2016/03/23 18:07:44
Done.
| |
| 36 State state, | |
| 37 int height); | |
| 38 | |
| 33 private: | 39 private: |
| 34 NativeThemeMac(); | 40 NativeThemeMac(); |
| 35 ~NativeThemeMac() override; | 41 ~NativeThemeMac() override; |
| 36 | 42 |
| 37 DISALLOW_COPY_AND_ASSIGN(NativeThemeMac); | 43 DISALLOW_COPY_AND_ASSIGN(NativeThemeMac); |
| 38 }; | 44 }; |
| 39 | 45 |
| 40 } // namespace ui | 46 } // namespace ui |
| 41 | 47 |
| 42 #endif // UI_NATIVE_THEME_NATIVE_THEME_MAC_H_ | 48 #endif // UI_NATIVE_THEME_NATIVE_THEME_MAC_H_ |
| OLD | NEW |