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

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

Issue 165943011: Remove flag to hide shelf alignment (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 10 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 | « ash/ash_switches.cc ('k') | chrome/app/generated_resources.grd » ('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_widget.h" 5 #include "ash/shelf/shelf_widget.h"
6 6
7 #include "ash/ash_switches.h" 7 #include "ash/ash_switches.h"
8 #include "ash/focus_cycler.h" 8 #include "ash/focus_cycler.h"
9 #include "ash/root_window_controller.h" 9 #include "ash/root_window_controller.h"
10 #include "ash/session_state_delegate.h" 10 #include "ash/session_state_delegate.h"
(...skipping 665 matching lines...) Expand 10 before | Expand all | Expand 10 after
676 if (delegate_view_->opaque_background()->GetTargetOpacity() == 1.0f) 676 if (delegate_view_->opaque_background()->GetTargetOpacity() == 1.0f)
677 return SHELF_BACKGROUND_MAXIMIZED; 677 return SHELF_BACKGROUND_MAXIMIZED;
678 if (background_animator_.paints_background()) 678 if (background_animator_.paints_background())
679 return SHELF_BACKGROUND_OVERLAP; 679 return SHELF_BACKGROUND_OVERLAP;
680 680
681 return SHELF_BACKGROUND_DEFAULT; 681 return SHELF_BACKGROUND_DEFAULT;
682 } 682 }
683 683
684 // static 684 // static
685 bool ShelfWidget::ShelfAlignmentAllowed() { 685 bool ShelfWidget::ShelfAlignmentAllowed() {
686 if (!ash::switches::ShowShelfAlignmentMenu())
687 return false;
688 user::LoginStatus login_status = 686 user::LoginStatus login_status =
689 Shell::GetInstance()->system_tray_delegate()->GetUserLoginStatus(); 687 Shell::GetInstance()->system_tray_delegate()->GetUserLoginStatus();
690 688
691 switch (login_status) { 689 switch (login_status) {
692 case user::LOGGED_IN_USER: 690 case user::LOGGED_IN_USER:
693 case user::LOGGED_IN_OWNER: 691 case user::LOGGED_IN_OWNER:
694 return true; 692 return true;
695 case user::LOGGED_IN_LOCKED: 693 case user::LOGGED_IN_LOCKED:
696 case user::LOGGED_IN_PUBLIC: 694 case user::LOGGED_IN_PUBLIC:
697 case user::LOGGED_IN_LOCALLY_MANAGED: 695 case user::LOGGED_IN_LOCALLY_MANAGED:
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
808 DCHECK(delegate_view_); 806 DCHECK(delegate_view_);
809 return delegate_view_->disable_dimming_animations_for_test(); 807 return delegate_view_->disable_dimming_animations_for_test();
810 } 808 }
811 809
812 void ShelfWidget::WillDeleteShelf() { 810 void ShelfWidget::WillDeleteShelf() {
813 shelf_layout_manager_->RemoveObserver(this); 811 shelf_layout_manager_->RemoveObserver(this);
814 shelf_layout_manager_ = NULL; 812 shelf_layout_manager_ = NULL;
815 } 813 }
816 814
817 } // namespace ash 815 } // namespace ash
OLDNEW
« no previous file with comments | « ash/ash_switches.cc ('k') | chrome/app/generated_resources.grd » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698