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

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

Issue 1151133003: Added an ActivationReason parameter to ActivationChangeObserver::OnWindowActivated(...). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Uploaded diff based on dependant CL. Created 5 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/shelf/shelf_layout_manager.h ('k') | ash/shelf/shelf_window_watcher.h » ('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 511 matching lines...) Expand 10 before | Expand all | Expand 10 after
522 } 522 }
523 } 523 }
524 524
525 void ShelfLayoutManager::OnLockStateChanged(bool locked) { 525 void ShelfLayoutManager::OnLockStateChanged(bool locked) {
526 // Force the shelf to layout for alignment (bottom if locked, restore 526 // Force the shelf to layout for alignment (bottom if locked, restore
527 // the previous alignment otherwise). 527 // the previous alignment otherwise).
528 state_.is_screen_locked = locked; 528 state_.is_screen_locked = locked;
529 UpdateShelfVisibilityAfterLoginUIChange(); 529 UpdateShelfVisibilityAfterLoginUIChange();
530 } 530 }
531 531
532 void ShelfLayoutManager::OnWindowActivated(aura::Window* gained_active, 532 void ShelfLayoutManager::OnWindowActivated(
533 aura::Window* lost_active) { 533 aura::client::ActivationChangeObserver::ActivationReason reason,
534 aura::Window* gained_active,
535 aura::Window* lost_active) {
534 UpdateAutoHideStateNow(); 536 UpdateAutoHideStateNow();
535 } 537 }
536 538
537 bool ShelfLayoutManager::IsHorizontalAlignment() const { 539 bool ShelfLayoutManager::IsHorizontalAlignment() const {
538 return GetAlignment() == SHELF_ALIGNMENT_BOTTOM || 540 return GetAlignment() == SHELF_ALIGNMENT_BOTTOM ||
539 GetAlignment() == SHELF_ALIGNMENT_TOP; 541 GetAlignment() == SHELF_ALIGNMENT_TOP;
540 } 542 }
541 543
542 // static 544 // static
543 ShelfLayoutManager* ShelfLayoutManager::ForShelf(aura::Window* window) { 545 ShelfLayoutManager* ShelfLayoutManager::ForShelf(aura::Window* window) {
(...skipping 647 matching lines...) Expand 10 before | Expand all | Expand 10 after
1191 return false; 1193 return false;
1192 } 1194 }
1193 if (session_state_delegate->IsUserSessionBlocked() || 1195 if (session_state_delegate->IsUserSessionBlocked() ||
1194 state_.is_adding_user_screen) { 1196 state_.is_adding_user_screen) {
1195 return true; 1197 return true;
1196 } 1198 }
1197 return false; 1199 return false;
1198 } 1200 }
1199 1201
1200 } // namespace ash 1202 } // namespace ash
OLDNEW
« no previous file with comments | « ash/shelf/shelf_layout_manager.h ('k') | ash/shelf/shelf_window_watcher.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698