| OLD | NEW |
| 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 218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 229 | 229 |
| 230 void ShelfLayoutManager::PrepareForShutdown() { | 230 void ShelfLayoutManager::PrepareForShutdown() { |
| 231 // Clear all event filters, otherwise sometimes those filters may catch | 231 // Clear all event filters, otherwise sometimes those filters may catch |
| 232 // synthesized mouse event and cause crashes during the shutdown. | 232 // synthesized mouse event and cause crashes during the shutdown. |
| 233 set_workspace_controller(NULL); | 233 set_workspace_controller(NULL); |
| 234 auto_hide_event_filter_.reset(); | 234 auto_hide_event_filter_.reset(); |
| 235 bezel_event_filter_.reset(); | 235 bezel_event_filter_.reset(); |
| 236 // Stop observing window change, otherwise we can attempt to update a | 236 // Stop observing window change, otherwise we can attempt to update a |
| 237 // partially destructed shelf. | 237 // partially destructed shelf. |
| 238 aura::client::GetActivationClient(root_window_)->RemoveObserver(this); | 238 aura::client::GetActivationClient(root_window_)->RemoveObserver(this); |
| 239 FOR_EACH_OBSERVER(ShelfLayoutManagerObserver, observers_, WillDeleteShelf()); | |
| 240 } | 239 } |
| 241 | 240 |
| 242 bool ShelfLayoutManager::IsVisible() const { | 241 bool ShelfLayoutManager::IsVisible() const { |
| 243 // status_area_widget() may be NULL during the shutdown. | 242 // status_area_widget() may be NULL during the shutdown. |
| 244 return shelf_->status_area_widget() && | 243 return shelf_->status_area_widget() && |
| 245 shelf_->status_area_widget()->IsVisible() && | 244 shelf_->status_area_widget()->IsVisible() && |
| 246 (state_.visibility_state == SHELF_VISIBLE || | 245 (state_.visibility_state == SHELF_VISIBLE || |
| 247 (state_.visibility_state == SHELF_AUTO_HIDE && | 246 (state_.visibility_state == SHELF_AUTO_HIDE && |
| 248 state_.auto_hide_state == SHELF_AUTO_HIDE_SHOWN)); | 247 state_.auto_hide_state == SHELF_AUTO_HIDE_SHOWN)); |
| 249 } | 248 } |
| (...skipping 911 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1161 return false; | 1160 return false; |
| 1162 } | 1161 } |
| 1163 if (session_state_delegate->IsUserSessionBlocked() || | 1162 if (session_state_delegate->IsUserSessionBlocked() || |
| 1164 state_.is_adding_user_screen) { | 1163 state_.is_adding_user_screen) { |
| 1165 return true; | 1164 return true; |
| 1166 } | 1165 } |
| 1167 return false; | 1166 return false; |
| 1168 } | 1167 } |
| 1169 | 1168 |
| 1170 } // namespace ash | 1169 } // namespace ash |
| OLD | NEW |