Chromium Code Reviews| 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 674 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 685 void Shell::SetShelfAutoHideBehavior(ShelfAutoHideBehavior behavior, | 685 void Shell::SetShelfAutoHideBehavior(ShelfAutoHideBehavior behavior, |
| 686 aura::RootWindow* root_window) { | 686 aura::RootWindow* root_window) { |
| 687 GetRootWindowController(root_window)->SetShelfAutoHideBehavior(behavior); | 687 GetRootWindowController(root_window)->SetShelfAutoHideBehavior(behavior); |
| 688 } | 688 } |
| 689 | 689 |
| 690 ShelfAutoHideBehavior Shell::GetShelfAutoHideBehavior( | 690 ShelfAutoHideBehavior Shell::GetShelfAutoHideBehavior( |
| 691 aura::RootWindow* root_window) const { | 691 aura::RootWindow* root_window) const { |
| 692 return GetRootWindowController(root_window)->GetShelfAutoHideBehavior(); | 692 return GetRootWindowController(root_window)->GetShelfAutoHideBehavior(); |
| 693 } | 693 } |
| 694 | 694 |
| 695 bool Shell::IsShelfAutoHideMenuHideChecked(aura::RootWindow* root_window) { | |
| 696 return GetRootWindowController(root_window)->GetShelfAutoHideBehavior() == | |
| 697 ash::SHELF_AUTO_HIDE_BEHAVIOR_ALWAYS; | |
| 698 } | |
|
oshima
2012/11/26 19:13:00
Given that this is used in two places, I prefer to
bartfab (slow)
2012/11/29 18:25:51
This is actually not used in production code at al
oshima
2012/11/29 18:43:35
This is used in launcher_context_menu.cc, and it's
bartfab (slow)
2012/11/29 19:01:10
As I mentioned above, yes, launcher_context_menu.c
| |
| 699 | |
| 700 ShelfAutoHideBehavior Shell::GetToggledShelfAutoHideBehavior( | |
| 701 aura::RootWindow* root_window) { | |
| 702 return GetRootWindowController(root_window)-> | |
| 703 GetToggledShelfAutoHideBehavior(); | |
| 704 } | |
| 705 | |
| 706 void Shell::SetShelfAlignment(ShelfAlignment alignment, | 695 void Shell::SetShelfAlignment(ShelfAlignment alignment, |
| 707 aura::RootWindow* root_window) { | 696 aura::RootWindow* root_window) { |
| 708 if (GetRootWindowController(root_window)->SetShelfAlignment(alignment)) | 697 if (GetRootWindowController(root_window)->SetShelfAlignment(alignment)) |
| 709 FOR_EACH_OBSERVER(ShellObserver, observers_, OnShelfAlignmentChanged()); | 698 FOR_EACH_OBSERVER(ShellObserver, observers_, OnShelfAlignmentChanged()); |
| 710 } | 699 } |
| 711 | 700 |
| 712 ShelfAlignment Shell::GetShelfAlignment(aura::RootWindow* root_window) { | 701 ShelfAlignment Shell::GetShelfAlignment(aura::RootWindow* root_window) { |
| 713 return GetRootWindowController(root_window)->GetShelfAlignment(); | 702 return GetRootWindowController(root_window)->GetShelfAlignment(); |
| 714 } | 703 } |
| 715 | 704 |
| (...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 858 | 847 |
| 859 bool Shell::CanAcceptEvents() { | 848 bool Shell::CanAcceptEvents() { |
| 860 return true; | 849 return true; |
| 861 } | 850 } |
| 862 | 851 |
| 863 ui::EventTarget* Shell::GetParentTarget() { | 852 ui::EventTarget* Shell::GetParentTarget() { |
| 864 return NULL; | 853 return NULL; |
| 865 } | 854 } |
| 866 | 855 |
| 867 } // namespace ash | 856 } // namespace ash |
| OLD | NEW |