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

Side by Side Diff: ash/common/shelf/shelf_layout_manager.cc

Issue 2766543002: Move even more from WmShell to Shell (Closed)
Patch Set: Created 3 years, 9 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/shelf/shelf_layout_manager.h" 5 #include "ash/common/shelf/shelf_layout_manager.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <cmath> 8 #include <cmath>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 879 matching lines...) Expand 10 before | Expand all | Expand 10 after
890 if (shelf_widget_->IsActive() || 890 if (shelf_widget_->IsActive() ||
891 (shelf_widget_->status_area_widget() && 891 (shelf_widget_->status_area_widget() &&
892 shelf_widget_->status_area_widget()->IsActive())) 892 shelf_widget_->status_area_widget()->IsActive()))
893 return SHELF_AUTO_HIDE_SHOWN; 893 return SHELF_AUTO_HIDE_SHOWN;
894 894
895 const int64_t shelf_display_id = 895 const int64_t shelf_display_id =
896 WmWindow::Get(shelf_widget_->GetNativeWindow()) 896 WmWindow::Get(shelf_widget_->GetNativeWindow())
897 ->GetDisplayNearestWindow() 897 ->GetDisplayNearestWindow()
898 .id(); 898 .id();
899 const std::vector<WmWindow*> windows = 899 const std::vector<WmWindow*> windows =
900 WmShell::Get()->mru_window_tracker()->BuildWindowListIgnoreModal(); 900 Shell::Get()->mru_window_tracker()->BuildWindowListIgnoreModal();
901 // Process the window list and check if there are any visible windows. 901 // Process the window list and check if there are any visible windows.
902 // Ignore app list windows that may be animating to hide after dismissal. 902 // Ignore app list windows that may be animating to hide after dismissal.
903 bool visible_window = false; 903 bool visible_window = false;
904 for (size_t i = 0; i < windows.size(); ++i) { 904 for (size_t i = 0; i < windows.size(); ++i) {
905 if (windows[i] && windows[i]->IsVisible() && !IsAppListWindow(windows[i]) && 905 if (windows[i] && windows[i]->IsVisible() && !IsAppListWindow(windows[i]) &&
906 !windows[i]->GetWindowState()->IsMinimized() && 906 !windows[i]->GetWindowState()->IsMinimized() &&
907 windows[i]->GetDisplayNearestWindow().id() == shelf_display_id) { 907 windows[i]->GetDisplayNearestWindow().id() == shelf_display_id) {
908 visible_window = true; 908 visible_window = true;
909 break; 909 break;
910 } 910 }
(...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after
1148 gesture_drag_status_ = GESTURE_DRAG_NONE; 1148 gesture_drag_status_ = GESTURE_DRAG_NONE;
1149 } 1149 }
1150 1150
1151 void ShelfLayoutManager::CancelGestureDrag() { 1151 void ShelfLayoutManager::CancelGestureDrag() {
1152 gesture_drag_status_ = GESTURE_DRAG_CANCEL_IN_PROGRESS; 1152 gesture_drag_status_ = GESTURE_DRAG_CANCEL_IN_PROGRESS;
1153 UpdateVisibilityState(); 1153 UpdateVisibilityState();
1154 gesture_drag_status_ = GESTURE_DRAG_NONE; 1154 gesture_drag_status_ = GESTURE_DRAG_NONE;
1155 } 1155 }
1156 1156
1157 } // namespace ash 1157 } // namespace ash
OLDNEW
« no previous file with comments | « ash/common/mojo_interface_factory.cc ('k') | ash/common/system/chromeos/brightness/tray_brightness.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698