| 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 #include "ui/native_theme/native_theme_aura.h" | 5 #include "ui/native_theme/native_theme_aura.h" |
| 6 | 6 |
| 7 #include <limits> | 7 #include <limits> |
| 8 | 8 |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "ui/base/layout.h" | 10 #include "ui/base/layout.h" |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 80 } | 80 } |
| 81 #endif | 81 #endif |
| 82 | 82 |
| 83 NativeThemeAura::NativeThemeAura() { | 83 NativeThemeAura::NativeThemeAura() { |
| 84 // We don't draw scrollbar buttons. | 84 // We don't draw scrollbar buttons. |
| 85 #if defined(OS_CHROMEOS) | 85 #if defined(OS_CHROMEOS) |
| 86 set_scrollbar_button_length(0); | 86 set_scrollbar_button_length(0); |
| 87 #endif | 87 #endif |
| 88 | 88 |
| 89 // Images and alphas declarations assume the following order. | 89 // Images and alphas declarations assume the following order. |
| 90 COMPILE_ASSERT(kDisabled == 0, states_unexpectedly_changed); | 90 static_assert(kDisabled == 0, "states unexpectedly changed"); |
| 91 COMPILE_ASSERT(kHovered == 1, states_unexpectedly_changed); | 91 static_assert(kHovered == 1, "states unexpectedly changed"); |
| 92 COMPILE_ASSERT(kNormal == 2, states_unexpectedly_changed); | 92 static_assert(kNormal == 2, "states unexpectedly changed"); |
| 93 COMPILE_ASSERT(kPressed == 3, states_unexpectedly_changed); | 93 static_assert(kPressed == 3, "states unexpectedly changed"); |
| 94 } | 94 } |
| 95 | 95 |
| 96 NativeThemeAura::~NativeThemeAura() { | 96 NativeThemeAura::~NativeThemeAura() { |
| 97 } | 97 } |
| 98 | 98 |
| 99 void NativeThemeAura::PaintMenuPopupBackground( | 99 void NativeThemeAura::PaintMenuPopupBackground( |
| 100 SkCanvas* canvas, | 100 SkCanvas* canvas, |
| 101 const gfx::Size& size, | 101 const gfx::Size& size, |
| 102 const MenuBackgroundExtraParams& menu_background) const { | 102 const MenuBackgroundExtraParams& menu_background) const { |
| 103 SkColor color = GetSystemColor(NativeTheme::kColorId_MenuBackgroundColor); | 103 SkColor color = GetSystemColor(NativeTheme::kColorId_MenuBackgroundColor); |
| (...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 320 scoped_ptr<NineImagePainter> stroke_painter, | 320 scoped_ptr<NineImagePainter> stroke_painter, |
| 321 const uint8 stroke_alphas[kNumStates]) | 321 const uint8 stroke_alphas[kNumStates]) |
| 322 : fill_painter(fill_painter.Pass()), | 322 : fill_painter(fill_painter.Pass()), |
| 323 fill_alphas(fill_alphas), | 323 fill_alphas(fill_alphas), |
| 324 stroke_painter(stroke_painter.Pass()), | 324 stroke_painter(stroke_painter.Pass()), |
| 325 stroke_alphas(stroke_alphas) {} | 325 stroke_alphas(stroke_alphas) {} |
| 326 | 326 |
| 327 NativeThemeAura::DualPainter::~DualPainter() {} | 327 NativeThemeAura::DualPainter::~DualPainter() {} |
| 328 | 328 |
| 329 } // namespace ui | 329 } // namespace ui |
| OLD | NEW |