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 | 8 |
9 #include "ash/app_list/app_list.h" | 9 #include "ash/app_list/app_list.h" |
10 #include "ash/ash_switches.h" | 10 #include "ash/ash_switches.h" |
(...skipping 610 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
621 } | 621 } |
622 | 622 |
623 void Shell::AddShellObserver(ShellObserver* observer) { | 623 void Shell::AddShellObserver(ShellObserver* observer) { |
624 observers_.AddObserver(observer); | 624 observers_.AddObserver(observer); |
625 } | 625 } |
626 | 626 |
627 void Shell::RemoveShellObserver(ShellObserver* observer) { | 627 void Shell::RemoveShellObserver(ShellObserver* observer) { |
628 observers_.RemoveObserver(observer); | 628 observers_.RemoveObserver(observer); |
629 } | 629 } |
630 | 630 |
| 631 int Shell::GetGridSize() const { |
| 632 return workspace_controller_->workspace_manager()->grid_size(); |
| 633 } |
| 634 |
631 //////////////////////////////////////////////////////////////////////////////// | 635 //////////////////////////////////////////////////////////////////////////////// |
632 // Shell, private: | 636 // Shell, private: |
633 | 637 |
634 void Shell::InitLayoutManagers() { | 638 void Shell::InitLayoutManagers() { |
635 DCHECK(root_window_layout_); | 639 DCHECK(root_window_layout_); |
636 DCHECK(status_widget_); | 640 DCHECK(status_widget_); |
637 | 641 |
638 internal::ShelfLayoutManager* shelf_layout_manager = | 642 internal::ShelfLayoutManager* shelf_layout_manager = |
639 new internal::ShelfLayoutManager(launcher_->widget(), status_widget_); | 643 new internal::ShelfLayoutManager(launcher_->widget(), status_widget_); |
640 GetContainer(internal::kShellWindowId_LauncherContainer)-> | 644 GetContainer(internal::kShellWindowId_LauncherContainer)-> |
(...skipping 18 matching lines...) Expand all Loading... |
659 // Create the desktop background image. | 663 // Create the desktop background image. |
660 SetDesktopBackgroundMode(BACKGROUND_IMAGE); | 664 SetDesktopBackgroundMode(BACKGROUND_IMAGE); |
661 } | 665 } |
662 | 666 |
663 void Shell::DisableWorkspaceGridLayout() { | 667 void Shell::DisableWorkspaceGridLayout() { |
664 if (workspace_controller_.get()) | 668 if (workspace_controller_.get()) |
665 workspace_controller_->workspace_manager()->set_grid_size(0); | 669 workspace_controller_->workspace_manager()->set_grid_size(0); |
666 } | 670 } |
667 | 671 |
668 } // namespace ash | 672 } // namespace ash |
OLD | NEW |