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

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

Issue 2042913002: Converts MruWindowTracker to work with common types (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: not equal Created 4 years, 6 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/mus/bridge/wm_window_mus.cc ('k') | ash/shell.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 (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/shelf/shelf_layout_manager.h" 5 #include "ash/shelf/shelf_layout_manager.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <cmath> 8 #include <cmath>
9 #include <cstring> 9 #include <cstring>
10 #include <string> 10 #include <string>
(...skipping 1026 matching lines...) Expand 10 before | Expand all | Expand 10 after
1037 shelf_widget_->shelf()->IsShowingOverflowBubble()) 1037 shelf_widget_->shelf()->IsShowingOverflowBubble())
1038 return SHELF_AUTO_HIDE_SHOWN; 1038 return SHELF_AUTO_HIDE_SHOWN;
1039 1039
1040 if (shelf_widget_->IsActive() || 1040 if (shelf_widget_->IsActive() ||
1041 (shelf_widget_->status_area_widget() && 1041 (shelf_widget_->status_area_widget() &&
1042 shelf_widget_->status_area_widget()->IsActive())) 1042 shelf_widget_->status_area_widget()->IsActive()))
1043 return SHELF_AUTO_HIDE_SHOWN; 1043 return SHELF_AUTO_HIDE_SHOWN;
1044 1044
1045 // TODO(jamescook): Track visible windows on mash via ShelfDelegate. 1045 // TODO(jamescook): Track visible windows on mash via ShelfDelegate.
1046 if (!Shell::GetInstance()->in_mus()) { 1046 if (!Shell::GetInstance()->in_mus()) {
1047 const std::vector<aura::Window*> windows = 1047 const std::vector<WmWindow*> windows =
1048 shell->mru_window_tracker()->BuildWindowListIgnoreModal(); 1048 shell->mru_window_tracker()->BuildWindowListIgnoreModal();
1049 1049
1050 // Process the window list and check if there are any visible windows. 1050 // Process the window list and check if there are any visible windows.
1051 bool visible_window = false; 1051 bool visible_window = false;
1052 for (size_t i = 0; i < windows.size(); ++i) { 1052 for (size_t i = 0; i < windows.size(); ++i) {
1053 if (windows[i] && windows[i]->IsVisible() && 1053 if (windows[i] && windows[i]->IsVisible() &&
1054 !wm::GetWindowState(windows[i])->IsMinimized() && 1054 !windows[i]->GetWindowState()->IsMinimized() &&
1055 root_window_ == windows[i]->GetRootWindow()) { 1055 root_window_ ==
1056 WmWindowAura::GetAuraWindow(windows[i]->GetRootWindow())) {
1056 visible_window = true; 1057 visible_window = true;
1057 break; 1058 break;
1058 } 1059 }
1059 } 1060 }
1060 // If there are no visible windows do not hide the shelf. 1061 // If there are no visible windows do not hide the shelf.
1061 if (!visible_window) 1062 if (!visible_window)
1062 return SHELF_AUTO_HIDE_SHOWN; 1063 return SHELF_AUTO_HIDE_SHOWN;
1063 } 1064 }
1064 1065
1065 if (gesture_drag_status_ == GESTURE_DRAG_COMPLETE_IN_PROGRESS) 1066 if (gesture_drag_status_ == GESTURE_DRAG_COMPLETE_IN_PROGRESS)
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
1192 UpdateBoundsAndOpacity(target_bounds, true, NULL); 1193 UpdateBoundsAndOpacity(target_bounds, true, NULL);
1193 UpdateVisibilityState(); 1194 UpdateVisibilityState();
1194 } 1195 }
1195 1196
1196 void ShelfLayoutManager::UpdateShelfVisibilityAfterLoginUIChange() { 1197 void ShelfLayoutManager::UpdateShelfVisibilityAfterLoginUIChange() {
1197 UpdateVisibilityState(); 1198 UpdateVisibilityState();
1198 LayoutShelf(); 1199 LayoutShelf();
1199 } 1200 }
1200 1201
1201 } // namespace ash 1202 } // namespace ash
OLDNEW
« no previous file with comments | « ash/mus/bridge/wm_window_mus.cc ('k') | ash/shell.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698