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

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

Issue 251343003: Checked validity of status_widget before calling IsActive method. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 8 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | 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 1010 matching lines...) Expand 10 before | Expand all | Expand 10 after
1021 if (shelf_->status_area_widget() && 1021 if (shelf_->status_area_widget() &&
1022 shelf_->status_area_widget()->ShouldShowShelf()) 1022 shelf_->status_area_widget()->ShouldShowShelf())
1023 return SHELF_AUTO_HIDE_SHOWN; 1023 return SHELF_AUTO_HIDE_SHOWN;
1024 1024
1025 if (shelf_->shelf() && shelf_->shelf()->IsShowingMenu()) 1025 if (shelf_->shelf() && shelf_->shelf()->IsShowingMenu())
1026 return SHELF_AUTO_HIDE_SHOWN; 1026 return SHELF_AUTO_HIDE_SHOWN;
1027 1027
1028 if (shelf_->shelf() && shelf_->shelf()->IsShowingOverflowBubble()) 1028 if (shelf_->shelf() && shelf_->shelf()->IsShowingOverflowBubble())
1029 return SHELF_AUTO_HIDE_SHOWN; 1029 return SHELF_AUTO_HIDE_SHOWN;
1030 1030
1031 if (shelf_->IsActive() || shelf_->status_area_widget()->IsActive()) 1031 if (shelf_->IsActive() ||
1032 (shelf_->status_area_widget() &&
1033 shelf_->status_area_widget()->IsActive()))
1032 return SHELF_AUTO_HIDE_SHOWN; 1034 return SHELF_AUTO_HIDE_SHOWN;
1033 1035
1034 const std::vector<aura::Window*> windows = 1036 const std::vector<aura::Window*> windows =
1035 ash::MruWindowTracker::BuildWindowList(false); 1037 ash::MruWindowTracker::BuildWindowList(false);
1036 1038
1037 // Process the window list and check if there are any visible windows. 1039 // Process the window list and check if there are any visible windows.
1038 bool visible_window = false; 1040 bool visible_window = false;
1039 for (size_t i = 0; i < windows.size(); ++i) { 1041 for (size_t i = 0; i < windows.size(); ++i) {
1040 if (windows[i] && windows[i]->IsVisible() && 1042 if (windows[i] && windows[i]->IsVisible() &&
1041 !wm::GetWindowState(windows[i])->IsMinimized() && 1043 !wm::GetWindowState(windows[i])->IsMinimized() &&
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
1178 1180
1179 void ShelfLayoutManager::SessionStateChanged( 1181 void ShelfLayoutManager::SessionStateChanged(
1180 SessionStateDelegate::SessionState state) { 1182 SessionStateDelegate::SessionState state) {
1181 TargetBounds target_bounds; 1183 TargetBounds target_bounds;
1182 CalculateTargetBounds(state_, &target_bounds); 1184 CalculateTargetBounds(state_, &target_bounds);
1183 UpdateBoundsAndOpacity(target_bounds, true, NULL); 1185 UpdateBoundsAndOpacity(target_bounds, true, NULL);
1184 UpdateVisibilityState(); 1186 UpdateVisibilityState();
1185 } 1187 }
1186 1188
1187 } // namespace ash 1189 } // namespace ash
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698