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

Side by Side Diff: ui/views/controls/button/toggle_button.cc

Issue 2661353002: ui/gfx: split out code that depends on paint (Closed)
Patch Set: Fix mac, chromeos build 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/views/bubble/bubble_border.cc ('k') | ui/views/shadow_border.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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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/views/controls/button/toggle_button.h" 5 #include "ui/views/controls/button/toggle_button.h"
6 6
7 #include "third_party/skia/include/core/SkDrawLooper.h" 7 #include "third_party/skia/include/core/SkDrawLooper.h"
8 #include "third_party/skia/include/core/SkPaint.h" 8 #include "third_party/skia/include/core/SkPaint.h"
9 #include "ui/accessibility/ax_node_data.h" 9 #include "ui/accessibility/ax_node_data.h"
10 #include "ui/gfx/canvas.h" 10 #include "ui/gfx/canvas.h"
11 #include "ui/gfx/color_palette.h" 11 #include "ui/gfx/color_palette.h"
12 #include "ui/gfx/color_utils.h" 12 #include "ui/gfx/color_utils.h"
13 #include "ui/gfx/geometry/rect_conversions.h" 13 #include "ui/gfx/geometry/rect_conversions.h"
14 #include "ui/gfx/shadow_value.h" 14 #include "ui/gfx/shadow_value.h"
15 #include "ui/gfx/skia_paint_util.h"
15 #include "ui/views/animation/ink_drop_impl.h" 16 #include "ui/views/animation/ink_drop_impl.h"
16 #include "ui/views/animation/ink_drop_ripple.h" 17 #include "ui/views/animation/ink_drop_ripple.h"
17 #include "ui/views/border.h" 18 #include "ui/views/border.h"
18 #include "ui/views/painter.h" 19 #include "ui/views/painter.h"
19 20
20 namespace views { 21 namespace views {
21 22
22 namespace { 23 namespace {
23 24
24 // Constants are measured in dip. 25 // Constants are measured in dip.
(...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after
271 // TODO(varkha, estade): The thumb is using its own view. Investigate if 272 // TODO(varkha, estade): The thumb is using its own view. Investigate if
272 // repainting in every animation step to update colors could be avoided. 273 // repainting in every animation step to update colors could be avoided.
273 UpdateThumb(); 274 UpdateThumb();
274 SchedulePaint(); 275 SchedulePaint();
275 return; 276 return;
276 } 277 }
277 CustomButton::AnimationProgressed(animation); 278 CustomButton::AnimationProgressed(animation);
278 } 279 }
279 280
280 } // namespace views 281 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/bubble/bubble_border.cc ('k') | ui/views/shadow_border.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698