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/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 698 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
709 void Shell::SetShelfAutoHideBehavior(ShelfAutoHideBehavior behavior, | 709 void Shell::SetShelfAutoHideBehavior(ShelfAutoHideBehavior behavior, |
710 aura::RootWindow* root_window) { | 710 aura::RootWindow* root_window) { |
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 bool Shell::IsShelfAutoHideMenuHideChecked(aura::RootWindow* root_window) { | |
720 return GetRootWindowController(root_window)->GetShelfAutoHideBehavior() == | |
721 ash::SHELF_AUTO_HIDE_BEHAVIOR_ALWAYS; | |
722 } | |
723 | |
724 ShelfAutoHideBehavior Shell::GetToggledShelfAutoHideBehavior( | |
725 aura::RootWindow* root_window) { | |
726 return GetRootWindowController(root_window)-> | |
727 GetToggledShelfAutoHideBehavior(); | |
728 } | |
729 | |
730 void Shell::SetShelfAlignment(ShelfAlignment alignment, | 719 void Shell::SetShelfAlignment(ShelfAlignment alignment, |
731 aura::RootWindow* root_window) { | 720 aura::RootWindow* root_window) { |
732 if (GetRootWindowController(root_window)->SetShelfAlignment(alignment)) | 721 if (GetRootWindowController(root_window)->SetShelfAlignment(alignment)) |
733 FOR_EACH_OBSERVER(ShellObserver, observers_, OnShelfAlignmentChanged()); | 722 FOR_EACH_OBSERVER(ShellObserver, observers_, OnShelfAlignmentChanged()); |
734 } | 723 } |
735 | 724 |
736 ShelfAlignment Shell::GetShelfAlignment(aura::RootWindow* root_window) { | 725 ShelfAlignment Shell::GetShelfAlignment(aura::RootWindow* root_window) { |
737 return GetRootWindowController(root_window)->GetShelfAlignment(); | 726 return GetRootWindowController(root_window)->GetShelfAlignment(); |
738 } | 727 } |
739 | 728 |
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
882 | 871 |
883 bool Shell::CanAcceptEvents() { | 872 bool Shell::CanAcceptEvents() { |
884 return true; | 873 return true; |
885 } | 874 } |
886 | 875 |
887 ui::EventTarget* Shell::GetParentTarget() { | 876 ui::EventTarget* Shell::GetParentTarget() { |
888 return NULL; | 877 return NULL; |
889 } | 878 } |
890 | 879 |
891 } // namespace ash | 880 } // namespace ash |
OLD | NEW |