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 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
86 const SkColor kTextFilterBackgroundColorMD = SK_ColorWHITE; | 86 const SkColor kTextFilterBackgroundColorMD = SK_ColorWHITE; |
87 | 87 |
88 // The color or search icon with Material Design. | 88 // The color or search icon with Material Design. |
89 const SkColor kTextFilterIconColorMD = SkColorSetARGB(138, 0, 0, 0); | 89 const SkColor kTextFilterIconColorMD = SkColorSetARGB(138, 0, 0, 0); |
90 | 90 |
91 // The size of search icon with Material Design. | 91 // The size of search icon with Material Design. |
92 const int kTextFilterIconSize = 20; | 92 const int kTextFilterIconSize = 20; |
93 | 93 |
94 // The radius used for the rounded corners on the text filtering textbox. | 94 // The radius used for the rounded corners on the text filtering textbox. |
95 const int kTextFilterCornerRadius = 1; | 95 const int kTextFilterCornerRadius = 1; |
96 const int kTextFilterCornerRadiusMD = 2; | 96 const int kTextFilterCornerRadiusMD = 4; |
97 | 97 |
98 // A comparator for locating a grid with a given root window. | 98 // A comparator for locating a grid with a given root window. |
99 struct RootWindowGridComparator { | 99 struct RootWindowGridComparator { |
100 explicit RootWindowGridComparator(const WmWindow* root_window) | 100 explicit RootWindowGridComparator(const WmWindow* root_window) |
101 : root_window_(root_window) {} | 101 : root_window_(root_window) {} |
102 | 102 |
103 bool operator()(const std::unique_ptr<WindowGrid>& grid) const { | 103 bool operator()(const std::unique_ptr<WindowGrid>& grid) const { |
104 return grid->root_window() == root_window_; | 104 return grid->root_window() == root_window_; |
105 } | 105 } |
106 | 106 |
(...skipping 572 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
679 for (size_t i = 0; i <= grid_list_.size() && | 679 for (size_t i = 0; i <= grid_list_.size() && |
680 grid_list_[selected_grid_index_]->Move(direction, animate); | 680 grid_list_[selected_grid_index_]->Move(direction, animate); |
681 i++) { | 681 i++) { |
682 selected_grid_index_ = | 682 selected_grid_index_ = |
683 (selected_grid_index_ + display_direction + grid_list_.size()) % | 683 (selected_grid_index_ + display_direction + grid_list_.size()) % |
684 grid_list_.size(); | 684 grid_list_.size(); |
685 } | 685 } |
686 } | 686 } |
687 | 687 |
688 } // namespace ash | 688 } // namespace ash |
OLD | NEW |