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/wm/overview/window_selector.h" | 5 #include "ash/wm/overview/window_selector.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "ash/accessibility_delegate.h" | 9 #include "ash/accessibility_delegate.h" |
10 #include "ash/ash_switches.h" | 10 #include "ash/ash_switches.h" |
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
114 // classes and move into ui/views. | 114 // classes and move into ui/views. |
115 class RoundedContainerView : public views::View { | 115 class RoundedContainerView : public views::View { |
116 public: | 116 public: |
117 RoundedContainerView(int corner_radius, SkColor background) | 117 RoundedContainerView(int corner_radius, SkColor background) |
118 : corner_radius_(corner_radius), | 118 : corner_radius_(corner_radius), |
119 background_(background) { | 119 background_(background) { |
120 } | 120 } |
121 | 121 |
122 virtual ~RoundedContainerView() {} | 122 virtual ~RoundedContainerView() {} |
123 | 123 |
124 virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE { | 124 virtual void OnPaint(gfx::Canvas* canvas) override { |
125 views::View::OnPaint(canvas); | 125 views::View::OnPaint(canvas); |
126 | 126 |
127 SkScalar radius = SkIntToScalar(corner_radius_); | 127 SkScalar radius = SkIntToScalar(corner_radius_); |
128 const SkScalar kRadius[8] = {radius, radius, radius, radius, | 128 const SkScalar kRadius[8] = {radius, radius, radius, radius, |
129 radius, radius, radius, radius}; | 129 radius, radius, radius, radius}; |
130 SkPath path; | 130 SkPath path; |
131 gfx::Rect bounds(size()); | 131 gfx::Rect bounds(size()); |
132 path.addRoundRect(gfx::RectToSkRect(bounds), kRadius); | 132 path.addRoundRect(gfx::RectToSkRect(bounds), kRadius); |
133 | 133 |
134 SkPaint paint; | 134 SkPaint paint; |
(...skipping 446 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
581 for (size_t i = 0; | 581 for (size_t i = 0; |
582 i <= grid_list_.size() && | 582 i <= grid_list_.size() && |
583 grid_list_[selected_grid_index_]->Move(direction, animate); i++) { | 583 grid_list_[selected_grid_index_]->Move(direction, animate); i++) { |
584 // TODO(flackr): If there are more than two monitors, move between grids | 584 // TODO(flackr): If there are more than two monitors, move between grids |
585 // in the requested direction. | 585 // in the requested direction. |
586 selected_grid_index_ = (selected_grid_index_ + 1) % grid_list_.size(); | 586 selected_grid_index_ = (selected_grid_index_ + 1) % grid_list_.size(); |
587 } | 587 } |
588 } | 588 } |
589 | 589 |
590 } // namespace ash | 590 } // namespace ash |
OLD | NEW |