| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 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 #include "ash/common/wm/overview/window_selector.h" | 5 #include "ash/common/wm/overview/window_selector.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <functional> | 8 #include <functional> |
| 9 #include <set> | 9 #include <set> |
| 10 #include <utility> | 10 #include <utility> |
| (...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 109 void OnPaint(gfx::Canvas* canvas) override { | 109 void OnPaint(gfx::Canvas* canvas) override { |
| 110 views::View::OnPaint(canvas); | 110 views::View::OnPaint(canvas); |
| 111 | 111 |
| 112 SkScalar radius = SkIntToScalar(corner_radius_); | 112 SkScalar radius = SkIntToScalar(corner_radius_); |
| 113 const SkScalar kRadius[8] = {radius, radius, radius, radius, | 113 const SkScalar kRadius[8] = {radius, radius, radius, radius, |
| 114 radius, radius, radius, radius}; | 114 radius, radius, radius, radius}; |
| 115 SkPath path; | 115 SkPath path; |
| 116 gfx::Rect bounds(size()); | 116 gfx::Rect bounds(size()); |
| 117 path.addRoundRect(gfx::RectToSkRect(bounds), kRadius); | 117 path.addRoundRect(gfx::RectToSkRect(bounds), kRadius); |
| 118 | 118 |
| 119 cc::PaintFlags paint; | |
| 120 paint.setAntiAlias(true); | |
| 121 canvas->ClipPath(path, true); | 119 canvas->ClipPath(path, true); |
| 122 canvas->DrawColor(background_); | 120 canvas->DrawColor(background_); |
| 123 } | 121 } |
| 124 | 122 |
| 125 private: | 123 private: |
| 126 int corner_radius_; | 124 int corner_radius_; |
| 127 SkColor background_; | 125 SkColor background_; |
| 128 | 126 |
| 129 DISALLOW_COPY_AND_ASSIGN(RoundedContainerView); | 127 DISALLOW_COPY_AND_ASSIGN(RoundedContainerView); |
| 130 }; | 128 }; |
| (...skipping 534 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 665 for (size_t i = 0; i <= grid_list_.size() && | 663 for (size_t i = 0; i <= grid_list_.size() && |
| 666 grid_list_[selected_grid_index_]->Move(direction, animate); | 664 grid_list_[selected_grid_index_]->Move(direction, animate); |
| 667 i++) { | 665 i++) { |
| 668 selected_grid_index_ = | 666 selected_grid_index_ = |
| 669 (selected_grid_index_ + display_direction + grid_list_.size()) % | 667 (selected_grid_index_ + display_direction + grid_list_.size()) % |
| 670 grid_list_.size(); | 668 grid_list_.size(); |
| 671 } | 669 } |
| 672 } | 670 } |
| 673 | 671 |
| 674 } // namespace ash | 672 } // namespace ash |
| OLD | NEW |