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

Side by Side Diff: ash/shell.cc

Issue 11570017: Enables storing shelf's auto_hide_behavior and alignment per display. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix Created 8 years 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 | ash/shell_observer.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/shell.h" 5 #include "ash/shell.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <string> 8 #include <string>
9 9
10 #include "ash/accelerators/focus_manager_factory.h" 10 #include "ash/accelerators/focus_manager_factory.h"
(...skipping 700 matching lines...) Expand 10 before | Expand all | Expand 10 after
711 GetRootWindowController(root_window)->SetShelfAutoHideBehavior(behavior); 711 GetRootWindowController(root_window)->SetShelfAutoHideBehavior(behavior);
712 } 712 }
713 713
714 ShelfAutoHideBehavior Shell::GetShelfAutoHideBehavior( 714 ShelfAutoHideBehavior Shell::GetShelfAutoHideBehavior(
715 aura::RootWindow* root_window) const { 715 aura::RootWindow* root_window) const {
716 return GetRootWindowController(root_window)->GetShelfAutoHideBehavior(); 716 return GetRootWindowController(root_window)->GetShelfAutoHideBehavior();
717 } 717 }
718 718
719 void Shell::SetShelfAlignment(ShelfAlignment alignment, 719 void Shell::SetShelfAlignment(ShelfAlignment alignment,
720 aura::RootWindow* root_window) { 720 aura::RootWindow* root_window) {
721 if (GetRootWindowController(root_window)->SetShelfAlignment(alignment)) 721 if (GetRootWindowController(root_window)->SetShelfAlignment(alignment)) {
722 FOR_EACH_OBSERVER(ShellObserver, observers_, OnShelfAlignmentChanged()); 722 FOR_EACH_OBSERVER(
723 ShellObserver, observers_, OnShelfAlignmentChanged(root_window));
724 }
723 } 725 }
724 726
725 ShelfAlignment Shell::GetShelfAlignment(aura::RootWindow* root_window) { 727 ShelfAlignment Shell::GetShelfAlignment(aura::RootWindow* root_window) {
726 return GetRootWindowController(root_window)->GetShelfAlignment(); 728 return GetRootWindowController(root_window)->GetShelfAlignment();
727 } 729 }
728 730
729 void Shell::SetDimming(bool should_dim) { 731 void Shell::SetDimming(bool should_dim) {
730 RootWindowControllerList controllers = GetAllRootWindowControllers(); 732 RootWindowControllerList controllers = GetAllRootWindowControllers();
731 for (RootWindowControllerList::iterator iter = controllers.begin(); 733 for (RootWindowControllerList::iterator iter = controllers.begin();
732 iter != controllers.end(); ++iter) 734 iter != controllers.end(); ++iter)
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after
896 //////////////////////////////////////////////////////////////////////////////// 898 ////////////////////////////////////////////////////////////////////////////////
897 // Shell, aura::client::ActivationChangeObserver implementation: 899 // Shell, aura::client::ActivationChangeObserver implementation:
898 900
899 void Shell::OnWindowActivated(aura::Window* gained_active, 901 void Shell::OnWindowActivated(aura::Window* gained_active,
900 aura::Window* lost_active) { 902 aura::Window* lost_active) {
901 if (gained_active) 903 if (gained_active)
902 active_root_window_ = gained_active->GetRootWindow(); 904 active_root_window_ = gained_active->GetRootWindow();
903 } 905 }
904 906
905 } // namespace ash 907 } // namespace ash
OLDNEW
« no previous file with comments | « no previous file | ash/shell_observer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698