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

Side by Side Diff: ash/shell.cc

Issue 10910164: Removes the grid from ash. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix ShelfBrowserTest Created 8 years, 3 months 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 | « ash/shell.h ('k') | ash/wm/base_layout_manager.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 638 matching lines...) Expand 10 before | Expand all | Expand 10 after
649 } 649 }
650 650
651 SystemTrayDelegate* Shell::tray_delegate() { 651 SystemTrayDelegate* Shell::tray_delegate() {
652 return status_area_widget_->system_tray_delegate(); 652 return status_area_widget_->system_tray_delegate();
653 } 653 }
654 654
655 SystemTray* Shell::system_tray() { 655 SystemTray* Shell::system_tray() {
656 return status_area_widget_->system_tray(); 656 return status_area_widget_->system_tray();
657 } 657 }
658 658
659 int Shell::GetGridSize() const {
660 return
661 GetPrimaryRootWindowController()->workspace_controller()->GetGridSize();
662 }
663
664 void Shell::InitRootWindowForSecondaryDisplay(aura::RootWindow* root) { 659 void Shell::InitRootWindowForSecondaryDisplay(aura::RootWindow* root) {
665 root->set_focus_manager(focus_manager_.get()); 660 root->set_focus_manager(focus_manager_.get());
666 internal::RootWindowController* controller = 661 internal::RootWindowController* controller =
667 new internal::RootWindowController(root); 662 new internal::RootWindowController(root);
668 controller->CreateContainers(); 663 controller->CreateContainers();
669 InitRootWindowController(controller); 664 InitRootWindowController(controller);
670 controller->root_window_layout()->OnWindowResized(); 665 controller->root_window_layout()->OnWindowResized();
671 desktop_background_controller_->OnRootWindowAdded(root); 666 desktop_background_controller_->OnRootWindowAdded(root);
672 root->ShowRootWindow(); 667 root->ShowRootWindow();
673 // Activate new root for testing. 668 // Activate new root for testing.
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
746 GetPrimaryRootWindow(), 741 GetPrimaryRootWindow(),
747 internal::kShellWindowId_PanelContainer); 742 internal::kShellWindowId_PanelContainer);
748 panel_layout_manager_ = 743 panel_layout_manager_ =
749 new internal::PanelLayoutManager(panel_container); 744 new internal::PanelLayoutManager(panel_container);
750 panel_container->SetEventFilter( 745 panel_container->SetEventFilter(
751 new internal::PanelWindowEventFilter( 746 new internal::PanelWindowEventFilter(
752 panel_container, panel_layout_manager_)); 747 panel_container, panel_layout_manager_));
753 panel_container->SetLayoutManager(panel_layout_manager_); 748 panel_container->SetLayoutManager(panel_layout_manager_);
754 } 749 }
755 750
756 // TODO: this is only used in tests, move with test.
757 void Shell::DisableWorkspaceGridLayout() {
758 RootWindowControllerList controllers = GetAllRootWindowControllers();
759 for (RootWindowControllerList::iterator iter = controllers.begin();
760 iter != controllers.end(); ++iter)
761 (*iter)->workspace_controller()->SetGridSize(0);
762 }
763
764 void Shell::SetCursor(gfx::NativeCursor cursor) { 751 void Shell::SetCursor(gfx::NativeCursor cursor) {
765 RootWindowList root_windows = GetAllRootWindows(); 752 RootWindowList root_windows = GetAllRootWindows();
766 for (RootWindowList::iterator iter = root_windows.begin(); 753 for (RootWindowList::iterator iter = root_windows.begin();
767 iter != root_windows.end(); ++iter) 754 iter != root_windows.end(); ++iter)
768 (*iter)->SetCursor(cursor); 755 (*iter)->SetCursor(cursor);
769 } 756 }
770 757
771 void Shell::ShowCursor(bool visible) { 758 void Shell::ShowCursor(bool visible) {
772 RootWindowList root_windows = GetAllRootWindows(); 759 RootWindowList root_windows = GetAllRootWindows();
773 for (RootWindowList::iterator iter = root_windows.begin(); 760 for (RootWindowList::iterator iter = root_windows.begin();
774 iter != root_windows.end(); ++iter) 761 iter != root_windows.end(); ++iter)
775 (*iter)->ShowCursor(visible); 762 (*iter)->ShowCursor(visible);
776 } 763 }
777 764
778 } // namespace ash 765 } // namespace ash
OLDNEW
« no previous file with comments | « ash/shell.h ('k') | ash/wm/base_layout_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698