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 603 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
614 FOR_EACH_OBSERVER(ShellObserver, observers_, OnLockStateChanged(locked)); | 614 FOR_EACH_OBSERVER(ShellObserver, observers_, OnLockStateChanged(locked)); |
615 } | 615 } |
616 | 616 |
617 void Shell::CreateLauncher() { | 617 void Shell::CreateLauncher() { |
618 if (launcher_.get()) | 618 if (launcher_.get()) |
619 return; | 619 return; |
620 | 620 |
621 aura::Window* default_container = | 621 aura::Window* default_container = |
622 GetPrimaryRootWindowController()-> | 622 GetPrimaryRootWindowController()-> |
623 GetContainer(internal::kShellWindowId_DefaultContainer); | 623 GetContainer(internal::kShellWindowId_DefaultContainer); |
624 launcher_.reset(new Launcher(default_container)); | 624 launcher_.reset(new Launcher(default_container, shelf_)); |
625 | 625 |
626 launcher_->SetFocusCycler(focus_cycler_.get()); | 626 launcher_->SetFocusCycler(focus_cycler_.get()); |
627 shelf_->SetLauncher(launcher_.get()); | 627 shelf_->SetLauncher(launcher_.get()); |
628 if (panel_layout_manager_) | 628 if (panel_layout_manager_) |
629 panel_layout_manager_->SetLauncher(launcher_.get()); | 629 panel_layout_manager_->SetLauncher(launcher_.get()); |
630 | 630 |
631 launcher_->widget()->Show(); | 631 launcher_->widget()->Show(); |
632 } | 632 } |
633 | 633 |
634 void Shell::AddShellObserver(ShellObserver* observer) { | 634 void Shell::AddShellObserver(ShellObserver* observer) { |
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
791 } | 791 } |
792 | 792 |
793 void Shell::ShowCursor(bool visible) { | 793 void Shell::ShowCursor(bool visible) { |
794 RootWindowList root_windows = GetAllRootWindows(); | 794 RootWindowList root_windows = GetAllRootWindows(); |
795 for (RootWindowList::iterator iter = root_windows.begin(); | 795 for (RootWindowList::iterator iter = root_windows.begin(); |
796 iter != root_windows.end(); ++iter) | 796 iter != root_windows.end(); ++iter) |
797 (*iter)->ShowCursor(visible); | 797 (*iter)->ShowCursor(visible); |
798 } | 798 } |
799 | 799 |
800 } // namespace ash | 800 } // namespace ash |
OLD | NEW |