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

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

Issue 11316245: Move VisibilityController to corewm. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years 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/window_properties.cc ('k') | chrome/browser/ui/views/constrained_window_views.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/workspace.h" 5 #include "ash/wm/workspace/workspace.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_animations.h" 9 #include "ash/wm/window_animations.h"
10 #include "ash/wm/window_properties.h" 10 #include "ash/wm/window_properties.h"
11 #include "ash/wm/window_util.h" 11 #include "ash/wm/window_util.h"
12 #include "ash/wm/workspace/workspace_event_handler.h" 12 #include "ash/wm/workspace/workspace_event_handler.h"
13 #include "ash/wm/workspace/workspace_layout_manager.h" 13 #include "ash/wm/workspace/workspace_layout_manager.h"
14 #include "ash/wm/workspace/workspace_manager.h" 14 #include "ash/wm/workspace/workspace_manager.h"
15 #include "ui/aura/window.h" 15 #include "ui/aura/window.h"
16 #include "ui/views/corewm/visibility_controller.h"
16 17
17 namespace ash { 18 namespace ash {
18 namespace internal { 19 namespace internal {
19 20
20 Workspace::Workspace(WorkspaceManager* manager, 21 Workspace::Workspace(WorkspaceManager* manager,
21 aura::Window* parent, 22 aura::Window* parent,
22 bool is_maximized) 23 bool is_maximized)
23 : is_maximized_(is_maximized), 24 : is_maximized_(is_maximized),
24 workspace_manager_(manager), 25 workspace_manager_(manager),
25 window_(new aura::Window(NULL)), 26 window_(new aura::Window(NULL)),
26 event_handler_(new WorkspaceEventHandler(window_)), 27 event_handler_(new WorkspaceEventHandler(window_)),
27 workspace_layout_manager_(NULL) { 28 workspace_layout_manager_(NULL) {
28 window_->SetProperty(internal::kChildWindowVisibilityChangesAnimatedKey, 29 views::corewm::SetChildWindowVisibilityChangesAnimated(window_);
29 true);
30 SetWindowVisibilityAnimationTransition(window_, views::corewm::ANIMATE_NONE); 30 SetWindowVisibilityAnimationTransition(window_, views::corewm::ANIMATE_NONE);
31 window_->set_id(kShellWindowId_WorkspaceContainer); 31 window_->set_id(kShellWindowId_WorkspaceContainer);
32 window_->SetName("WorkspaceContainer"); 32 window_->SetName("WorkspaceContainer");
33 window_->Init(ui::LAYER_NOT_DRAWN); 33 window_->Init(ui::LAYER_NOT_DRAWN);
34 // Do this so when animating out windows don't extend beyond the bounds. 34 // Do this so when animating out windows don't extend beyond the bounds.
35 window_->layer()->SetMasksToBounds(true); 35 window_->layer()->SetMasksToBounds(true);
36 window_->Hide(); 36 window_->Hide();
37 parent->AddChild(window_); 37 parent->AddChild(window_);
38 window_->SetProperty(internal::kUsesScreenCoordinatesKey, true); 38 window_->SetProperty(internal::kUsesScreenCoordinatesKey, true);
39 39
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 WorkspaceManager::WillRestoreMaximized(child))) { 86 WorkspaceManager::WillRestoreMaximized(child))) {
87 if (++count == 2) 87 if (++count == 2)
88 return count; 88 return count;
89 } 89 }
90 } 90 }
91 return count; 91 return count;
92 } 92 }
93 93
94 } // namespace internal 94 } // namespace internal
95 } // namespace ash 95 } // namespace ash
OLDNEW
« no previous file with comments | « ash/wm/window_properties.cc ('k') | chrome/browser/ui/views/constrained_window_views.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698