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 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
200 int* text_filter_bottom) { | 200 int* text_filter_bottom) { |
201 views::Widget* widget = new views::Widget; | 201 views::Widget* widget = new views::Widget; |
202 views::Widget::InitParams params; | 202 views::Widget::InitParams params; |
203 params.type = views::Widget::InitParams::TYPE_WINDOW_FRAMELESS; | 203 params.type = views::Widget::InitParams::TYPE_WINDOW_FRAMELESS; |
204 params.ownership = views::Widget::InitParams::WIDGET_OWNS_NATIVE_WIDGET; | 204 params.ownership = views::Widget::InitParams::WIDGET_OWNS_NATIVE_WIDGET; |
205 params.opacity = views::Widget::InitParams::TRANSLUCENT_WINDOW; | 205 params.opacity = views::Widget::InitParams::TRANSLUCENT_WINDOW; |
206 params.accept_events = true; | 206 params.accept_events = true; |
207 params.bounds = GetTextFilterPosition(root_window); | 207 params.bounds = GetTextFilterPosition(root_window); |
208 *text_filter_bottom = params.bounds.bottom(); | 208 *text_filter_bottom = params.bounds.bottom(); |
209 root_window->GetRootWindowController()->ConfigureWidgetInitParamsForContainer( | 209 root_window->GetRootWindowController()->ConfigureWidgetInitParamsForContainer( |
210 widget, kShellWindowId_OverlayContainer, ¶ms); | 210 widget, kShellWindowId_StatusContainer, ¶ms); |
211 widget->Init(params); | 211 widget->Init(params); |
212 | 212 |
213 // Use |container| to specify the padding surrounding the text and to give | 213 // Use |container| to specify the padding surrounding the text and to give |
214 // the textfield rounded corners. | 214 // the textfield rounded corners. |
215 const bool material = ash::MaterialDesignController::IsOverviewMaterial(); | 215 const bool material = ash::MaterialDesignController::IsOverviewMaterial(); |
216 views::View* container = new RoundedContainerView( | 216 views::View* container = new RoundedContainerView( |
217 material ? kTextFilterCornerRadiusMD : kTextFilterCornerRadius, | 217 material ? kTextFilterCornerRadiusMD : kTextFilterCornerRadius, |
218 material ? kTextFilterBackgroundColorMD : kTextFilterBackgroundColor); | 218 material ? kTextFilterBackgroundColorMD : kTextFilterBackgroundColor); |
219 ui::ResourceBundle& bundle = ui::ResourceBundle::GetSharedInstance(); | 219 ui::ResourceBundle& bundle = ui::ResourceBundle::GetSharedInstance(); |
220 const ::ui::ResourceBundle::FontStyle font_style = | 220 const ::ui::ResourceBundle::FontStyle font_style = |
(...skipping 484 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
705 for (size_t i = 0; i <= grid_list_.size() && | 705 for (size_t i = 0; i <= grid_list_.size() && |
706 grid_list_[selected_grid_index_]->Move(direction, animate); | 706 grid_list_[selected_grid_index_]->Move(direction, animate); |
707 i++) { | 707 i++) { |
708 selected_grid_index_ = | 708 selected_grid_index_ = |
709 (selected_grid_index_ + display_direction + grid_list_.size()) % | 709 (selected_grid_index_ + display_direction + grid_list_.size()) % |
710 grid_list_.size(); | 710 grid_list_.size(); |
711 } | 711 } |
712 } | 712 } |
713 | 713 |
714 } // namespace ash | 714 } // namespace ash |
OLD | NEW |