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

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

Issue 2899253002: chromeos: Rename ash::WmShelf to Shelf (Closed)
Patch Set: rebase 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
« no previous file with comments | « ash/wm/overview/window_grid.cc ('k') | ash/wm/overview/window_selector_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 private: 128 private:
129 int corner_radius_; 129 int corner_radius_;
130 SkColor background_; 130 SkColor background_;
131 131
132 DISALLOW_COPY_AND_ASSIGN(RoundedContainerView); 132 DISALLOW_COPY_AND_ASSIGN(RoundedContainerView);
133 }; 133 };
134 134
135 // Triggers a shelf visibility update on all root window controllers. 135 // Triggers a shelf visibility update on all root window controllers.
136 void UpdateShelfVisibility() { 136 void UpdateShelfVisibility() {
137 for (aura::Window* root : Shell::GetAllRootWindows()) 137 for (aura::Window* root : Shell::GetAllRootWindows())
138 WmShelf::ForWindow(root)->UpdateVisibilityState(); 138 Shelf::ForWindow(root)->UpdateVisibilityState();
139 } 139 }
140 140
141 gfx::Rect GetTextFilterPosition(aura::Window* root_window) { 141 gfx::Rect GetTextFilterPosition(aura::Window* root_window) {
142 gfx::Rect total_bounds = ScreenUtil::GetDisplayWorkAreaBoundsInParent( 142 gfx::Rect total_bounds = ScreenUtil::GetDisplayWorkAreaBoundsInParent(
143 root_window->GetChildById(kShellWindowId_DefaultContainer)); 143 root_window->GetChildById(kShellWindowId_DefaultContainer));
144 ::wm::ConvertRectToScreen(root_window, &total_bounds); 144 ::wm::ConvertRectToScreen(root_window, &total_bounds);
145 return gfx::Rect( 145 return gfx::Rect(
146 0.5 * (total_bounds.width() - 146 0.5 * (total_bounds.width() -
147 std::min(kTextFilterWidth, total_bounds.width())), 147 std::min(kTextFilterWidth, total_bounds.width())),
148 total_bounds.y() + total_bounds.height() * kTextFilterTopScreenProportion, 148 total_bounds.y() + total_bounds.height() * kTextFilterTopScreenProportion,
(...skipping 529 matching lines...) Expand 10 before | Expand all | Expand 10 after
678 for (size_t i = 0; i <= grid_list_.size() && 678 for (size_t i = 0; i <= grid_list_.size() &&
679 grid_list_[selected_grid_index_]->Move(direction, animate); 679 grid_list_[selected_grid_index_]->Move(direction, animate);
680 i++) { 680 i++) {
681 selected_grid_index_ = 681 selected_grid_index_ =
682 (selected_grid_index_ + display_direction + grid_list_.size()) % 682 (selected_grid_index_ + display_direction + grid_list_.size()) %
683 grid_list_.size(); 683 grid_list_.size();
684 } 684 }
685 } 685 }
686 686
687 } // namespace ash 687 } // namespace ash
OLDNEW
« no previous file with comments | « ash/wm/overview/window_grid.cc ('k') | ash/wm/overview/window_selector_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698