Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3)

Side by Side Diff: ash/wm/overview/window_selector.cc

Issue 2899253002: chromeos: Rename ash::WmShelf to Shelf (Closed)
Patch Set: cleanup Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 #include <functional> 8 #include <functional>
9 #include <set> 9 #include <set>
10 #include <utility> 10 #include <utility>
11 #include <vector> 11 #include <vector>
12 12
13 #include "ash/accessibility_delegate.h" 13 #include "ash/accessibility_delegate.h"
14 #include "ash/accessibility_types.h" 14 #include "ash/accessibility_types.h"
15 #include "ash/metrics/user_metrics_action.h" 15 #include "ash/metrics/user_metrics_action.h"
16 #include "ash/public/cpp/shell_window_ids.h" 16 #include "ash/public/cpp/shell_window_ids.h"
17 #include "ash/root_window_controller.h" 17 #include "ash/root_window_controller.h"
18 #include "ash/screen_util.h" 18 #include "ash/screen_util.h"
19 #include "ash/shelf/wm_shelf.h" 19 #include "ash/shelf/shelf.h"
20 #include "ash/shell.h" 20 #include "ash/shell.h"
21 #include "ash/shell_port.h" 21 #include "ash/shell_port.h"
22 #include "ash/wm/mru_window_tracker.h" 22 #include "ash/wm/mru_window_tracker.h"
23 #include "ash/wm/overview/window_grid.h" 23 #include "ash/wm/overview/window_grid.h"
24 #include "ash/wm/overview/window_selector_delegate.h" 24 #include "ash/wm/overview/window_selector_delegate.h"
25 #include "ash/wm/overview/window_selector_item.h" 25 #include "ash/wm/overview/window_selector_item.h"
26 #include "ash/wm/panels/panel_layout_manager.h" 26 #include "ash/wm/panels/panel_layout_manager.h"
27 #include "ash/wm/switchable_windows.h" 27 #include "ash/wm/switchable_windows.h"
28 #include "ash/wm/window_state.h" 28 #include "ash/wm/window_state.h"
29 #include "ash/wm/window_util.h" 29 #include "ash/wm/window_util.h"
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 private: 125 private:
126 int corner_radius_; 126 int corner_radius_;
127 SkColor background_; 127 SkColor background_;
128 128
129 DISALLOW_COPY_AND_ASSIGN(RoundedContainerView); 129 DISALLOW_COPY_AND_ASSIGN(RoundedContainerView);
130 }; 130 };
131 131
132 // Triggers a shelf visibility update on all root window controllers. 132 // Triggers a shelf visibility update on all root window controllers.
133 void UpdateShelfVisibility() { 133 void UpdateShelfVisibility() {
134 for (aura::Window* root : Shell::GetAllRootWindows()) 134 for (aura::Window* root : Shell::GetAllRootWindows())
135 WmShelf::ForWindow(root)->UpdateVisibilityState(); 135 Shelf::ForWindow(root)->UpdateVisibilityState();
136 } 136 }
137 137
138 gfx::Rect GetTextFilterPosition(WmWindow* root_window) { 138 gfx::Rect GetTextFilterPosition(WmWindow* root_window) {
139 gfx::Rect total_bounds = root_window->ConvertRectToScreen( 139 gfx::Rect total_bounds = root_window->ConvertRectToScreen(
140 ScreenUtil::GetDisplayWorkAreaBoundsInParent( 140 ScreenUtil::GetDisplayWorkAreaBoundsInParent(
141 root_window->GetChildByShellWindowId(kShellWindowId_DefaultContainer) 141 root_window->GetChildByShellWindowId(kShellWindowId_DefaultContainer)
142 ->aura_window())); 142 ->aura_window()));
143 return gfx::Rect( 143 return gfx::Rect(
144 0.5 * (total_bounds.width() - 144 0.5 * (total_bounds.width() -
145 std::min(kTextFilterWidth, total_bounds.width())), 145 std::min(kTextFilterWidth, total_bounds.width())),
(...skipping 536 matching lines...) Expand 10 before | Expand all | Expand 10 after
682 for (size_t i = 0; i <= grid_list_.size() && 682 for (size_t i = 0; i <= grid_list_.size() &&
683 grid_list_[selected_grid_index_]->Move(direction, animate); 683 grid_list_[selected_grid_index_]->Move(direction, animate);
684 i++) { 684 i++) {
685 selected_grid_index_ = 685 selected_grid_index_ =
686 (selected_grid_index_ + display_direction + grid_list_.size()) % 686 (selected_grid_index_ + display_direction + grid_list_.size()) %
687 grid_list_.size(); 687 grid_list_.size();
688 } 688 }
689 } 689 }
690 690
691 } // namespace ash 691 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698