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 12 matching lines...) Expand all Loading... |
23 #include "ash/common/wm/window_state.h" | 23 #include "ash/common/wm/window_state.h" |
24 #include "ash/common/wm/wm_screen_util.h" | 24 #include "ash/common/wm/wm_screen_util.h" |
25 #include "ash/common/wm_lookup.h" | 25 #include "ash/common/wm_lookup.h" |
26 #include "ash/common/wm_shell.h" | 26 #include "ash/common/wm_shell.h" |
27 #include "ash/common/wm_window.h" | 27 #include "ash/common/wm_window.h" |
28 #include "ash/public/cpp/shell_window_ids.h" | 28 #include "ash/public/cpp/shell_window_ids.h" |
29 #include "ash/root_window_controller.h" | 29 #include "ash/root_window_controller.h" |
30 #include "base/auto_reset.h" | 30 #include "base/auto_reset.h" |
31 #include "base/command_line.h" | 31 #include "base/command_line.h" |
32 #include "base/metrics/histogram_macros.h" | 32 #include "base/metrics/histogram_macros.h" |
33 #include "third_party/skia/include/core/SkPaint.h" | |
34 #include "third_party/skia/include/core/SkPath.h" | 33 #include "third_party/skia/include/core/SkPath.h" |
35 #include "ui/base/resource/resource_bundle.h" | 34 #include "ui/base/resource/resource_bundle.h" |
36 #include "ui/compositor/scoped_layer_animation_settings.h" | 35 #include "ui/compositor/scoped_layer_animation_settings.h" |
37 #include "ui/display/screen.h" | 36 #include "ui/display/screen.h" |
38 #include "ui/events/event.h" | 37 #include "ui/events/event.h" |
39 #include "ui/gfx/canvas.h" | 38 #include "ui/gfx/canvas.h" |
40 #include "ui/gfx/paint_vector_icon.h" | 39 #include "ui/gfx/paint_vector_icon.h" |
41 #include "ui/gfx/skia_util.h" | 40 #include "ui/gfx/skia_util.h" |
42 #include "ui/gfx/vector_icons_public.h" | 41 #include "ui/gfx/vector_icons_public.h" |
43 #include "ui/views/border.h" | 42 #include "ui/views/border.h" |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
110 void OnPaint(gfx::Canvas* canvas) override { | 109 void OnPaint(gfx::Canvas* canvas) override { |
111 views::View::OnPaint(canvas); | 110 views::View::OnPaint(canvas); |
112 | 111 |
113 SkScalar radius = SkIntToScalar(corner_radius_); | 112 SkScalar radius = SkIntToScalar(corner_radius_); |
114 const SkScalar kRadius[8] = {radius, radius, radius, radius, | 113 const SkScalar kRadius[8] = {radius, radius, radius, radius, |
115 radius, radius, radius, radius}; | 114 radius, radius, radius, radius}; |
116 SkPath path; | 115 SkPath path; |
117 gfx::Rect bounds(size()); | 116 gfx::Rect bounds(size()); |
118 path.addRoundRect(gfx::RectToSkRect(bounds), kRadius); | 117 path.addRoundRect(gfx::RectToSkRect(bounds), kRadius); |
119 | 118 |
120 SkPaint paint; | 119 cc::PaintFlags paint; |
121 paint.setAntiAlias(true); | 120 paint.setAntiAlias(true); |
122 canvas->ClipPath(path, true); | 121 canvas->ClipPath(path, true); |
123 canvas->DrawColor(background_); | 122 canvas->DrawColor(background_); |
124 } | 123 } |
125 | 124 |
126 private: | 125 private: |
127 int corner_radius_; | 126 int corner_radius_; |
128 SkColor background_; | 127 SkColor background_; |
129 | 128 |
130 DISALLOW_COPY_AND_ASSIGN(RoundedContainerView); | 129 DISALLOW_COPY_AND_ASSIGN(RoundedContainerView); |
(...skipping 535 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
666 for (size_t i = 0; i <= grid_list_.size() && | 665 for (size_t i = 0; i <= grid_list_.size() && |
667 grid_list_[selected_grid_index_]->Move(direction, animate); | 666 grid_list_[selected_grid_index_]->Move(direction, animate); |
668 i++) { | 667 i++) { |
669 selected_grid_index_ = | 668 selected_grid_index_ = |
670 (selected_grid_index_ + display_direction + grid_list_.size()) % | 669 (selected_grid_index_ + display_direction + grid_list_.size()) % |
671 grid_list_.size(); | 670 grid_list_.size(); |
672 } | 671 } |
673 } | 672 } |
674 | 673 |
675 } // namespace ash | 674 } // namespace ash |
OLD | NEW |