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

Side by Side Diff: ash/wm/workspace/workspace2.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/wm/workspace/workspace2.h ('k') | ash/wm/workspace/workspace_event_filter.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/wm/workspace/workspace2.h" 5 #include "ash/wm/workspace/workspace2.h"
6 6
7 #include "ash/shell_window_ids.h" 7 #include "ash/shell_window_ids.h"
8 #include "ash/wm/property_util.h" 8 #include "ash/wm/property_util.h"
9 #include "ash/wm/window_properties.h" 9 #include "ash/wm/window_properties.h"
10 #include "ash/wm/window_util.h" 10 #include "ash/wm/window_util.h"
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 // Remove the LayoutManager and EventFilter as they refer back to us and/or 44 // Remove the LayoutManager and EventFilter as they refer back to us and/or
45 // WorkspaceManager. 45 // WorkspaceManager.
46 window_->SetLayoutManager(NULL); 46 window_->SetLayoutManager(NULL);
47 window_->SetEventFilter(NULL); 47 window_->SetEventFilter(NULL);
48 aura::Window* window = window_; 48 aura::Window* window = window_;
49 window_ = NULL; 49 window_ = NULL;
50 event_filter_ = NULL; 50 event_filter_ = NULL;
51 return window; 51 return window;
52 } 52 }
53 53
54 void Workspace2::SetGridSize(int grid_size) {
55 event_filter_->set_grid_size(grid_size);
56 }
57
58 bool Workspace2::ShouldMoveToPending() const { 54 bool Workspace2::ShouldMoveToPending() const {
59 if (!is_maximized_) 55 if (!is_maximized_)
60 return false; 56 return false;
61 57
62 bool has_visible_non_maximized_window = false; 58 bool has_visible_non_maximized_window = false;
63 for (size_t i = 0; i < window_->children().size(); ++i) { 59 for (size_t i = 0; i < window_->children().size(); ++i) {
64 aura::Window* child(window_->children()[i]); 60 aura::Window* child(window_->children()[i]);
65 if (!child->TargetVisibility() || wm::IsWindowMinimized(child)) 61 if (!child->TargetVisibility() || wm::IsWindowMinimized(child))
66 continue; 62 continue;
67 if (WorkspaceManager2::IsMaximized(child)) 63 if (WorkspaceManager2::IsMaximized(child))
(...skipping 13 matching lines...) Expand all
81 WorkspaceManager2::WillRestoreMaximized(child)) { 77 WorkspaceManager2::WillRestoreMaximized(child)) {
82 if (++count == 2) 78 if (++count == 2)
83 return count; 79 return count;
84 } 80 }
85 } 81 }
86 return count; 82 return count;
87 } 83 }
88 84
89 } // namespace internal 85 } // namespace internal
90 } // namespace ash 86 } // namespace ash
OLDNEW
« no previous file with comments | « ash/wm/workspace/workspace2.h ('k') | ash/wm/workspace/workspace_event_filter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698