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

Side by Side Diff: ash/wm/workspace_controller.cc

Issue 10852003: Changes all non-workspace code to talk to WorkspaceManager via (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: more constness Created 8 years, 4 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/wm/workspace_controller.h ('k') | ash/wm/workspace_controller_test_helper.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/wm/workspace_controller.h" 5 #include "ash/wm/workspace_controller.h"
6 6
7 #include "ash/wm/window_util.h" 7 #include "ash/wm/window_util.h"
8 #include "ash/wm/workspace/workspace_event_filter.h" 8 #include "ash/wm/workspace/workspace_event_filter.h"
9 #include "ash/wm/workspace/workspace_layout_manager.h" 9 #include "ash/wm/workspace/workspace_layout_manager.h"
10 #include "ash/wm/workspace/workspace_manager.h" 10 #include "ash/wm/workspace/workspace_manager.h"
(...skipping 28 matching lines...) Expand all
39 } 39 }
40 40
41 WorkspaceController::~WorkspaceController() { 41 WorkspaceController::~WorkspaceController() {
42 aura::client::GetActivationClient(viewport_->GetRootWindow())-> 42 aura::client::GetActivationClient(viewport_->GetRootWindow())->
43 RemoveObserver(this); 43 RemoveObserver(this);
44 // WorkspaceLayoutManager may attempt to access state from us. Destroy it now. 44 // WorkspaceLayoutManager may attempt to access state from us. Destroy it now.
45 if (viewport_->layout_manager() == layout_manager_) 45 if (viewport_->layout_manager() == layout_manager_)
46 viewport_->SetLayoutManager(NULL); 46 viewport_->SetLayoutManager(NULL);
47 } 47 }
48 48
49 bool WorkspaceController::IsInMaximizedMode() const {
50 return workspace_manager_->IsInMaximizedMode();
51 }
52
49 void WorkspaceController::SetGridSize(int grid_size) { 53 void WorkspaceController::SetGridSize(int grid_size) {
50 workspace_manager_->set_grid_size(grid_size); 54 workspace_manager_->set_grid_size(grid_size);
51 event_filter_->set_grid_size(grid_size); 55 event_filter_->set_grid_size(grid_size);
52 } 56 }
53 57
58 int WorkspaceController::GetGridSize() const {
59 return workspace_manager_->grid_size();
60 }
61
62 WorkspaceWindowState WorkspaceController::GetWindowState() const {
63 return workspace_manager_->GetWindowState();
64 }
65
66 void WorkspaceController::SetShelf(ShelfLayoutManager* shelf) {
67 workspace_manager_->set_shelf(shelf);
68 }
69
54 void WorkspaceController::OnWindowActivated(aura::Window* window, 70 void WorkspaceController::OnWindowActivated(aura::Window* window,
55 aura::Window* old_active) { 71 aura::Window* old_active) {
56 workspace_manager_->SetActiveWorkspaceByWindow(window); 72 workspace_manager_->SetActiveWorkspaceByWindow(window);
57 } 73 }
58 74
59 } // namespace internal 75 } // namespace internal
60 } // namespace ash 76 } // namespace ash
OLDNEW
« no previous file with comments | « ash/wm/workspace_controller.h ('k') | ash/wm/workspace_controller_test_helper.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698