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

Side by Side Diff: ash/shell.cc

Issue 9703026: Makes the maximize/restore button handling (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Incorporate review feedback Created 8 years, 9 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/shell/shell_main.cc » ('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 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
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
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
OLDNEW
« no previous file with comments | « ash/shell.h ('k') | ash/shell/shell_main.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698