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

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

Issue 10384212: fix property linkage warnings (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years, 7 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/window_util.cc ('k') | no next file » | 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_layout_manager.h" 5 #include "ash/wm/workspace/workspace_layout_manager.h"
6 6
7 #include "ash/screen_ash.h" 7 #include "ash/screen_ash.h"
8 #include "ash/wm/property_util.h"
9 #include "ash/wm/window_util.h" 8 #include "ash/wm/window_util.h"
9 #include "ash/wm/window_properties.h"
10 #include "ash/wm/workspace/workspace.h" 10 #include "ash/wm/workspace/workspace.h"
11 #include "ash/wm/workspace/workspace_manager.h" 11 #include "ash/wm/workspace/workspace_manager.h"
12 #include "ash/wm/workspace/workspace_window_resizer.h" 12 #include "ash/wm/workspace/workspace_window_resizer.h"
13 #include "ui/aura/client/aura_constants.h" 13 #include "ui/aura/client/aura_constants.h"
14 #include "ui/aura/event.h" 14 #include "ui/aura/event.h"
15 #include "ui/aura/root_window.h" 15 #include "ui/aura/root_window.h"
16 #include "ui/aura/window.h" 16 #include "ui/aura/window.h"
17 #include "ui/aura/window_observer.h" 17 #include "ui/aura/window_observer.h"
18 #include "ui/aura/window_property.h"
19 #include "ui/base/ui_base_types.h" 18 #include "ui/base/ui_base_types.h"
20 #include "ui/gfx/rect.h" 19 #include "ui/gfx/rect.h"
21 #include "ui/views/widget/native_widget_aura.h" 20 #include "ui/views/widget/native_widget_aura.h"
22 21
23 namespace ash { 22 namespace ash {
24 namespace internal { 23 namespace internal {
25 24
26 WorkspaceLayoutManager::WorkspaceLayoutManager( 25 WorkspaceLayoutManager::WorkspaceLayoutManager(
27 aura::RootWindow* root_window, 26 aura::RootWindow* root_window,
28 WorkspaceManager* workspace_manager) 27 WorkspaceManager* workspace_manager)
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 BaseLayoutManager::SetChildBounds(child, requested_bounds); 80 BaseLayoutManager::SetChildBounds(child, requested_bounds);
82 else 81 else
83 SetChildBoundsDirect(child, requested_bounds); 82 SetChildBoundsDirect(child, requested_bounds);
84 workspace_manager_->UpdateShelfVisibility(); 83 workspace_manager_->UpdateShelfVisibility();
85 } 84 }
86 85
87 void WorkspaceLayoutManager::OnWindowPropertyChanged(aura::Window* window, 86 void WorkspaceLayoutManager::OnWindowPropertyChanged(aura::Window* window,
88 const void* key, 87 const void* key,
89 intptr_t old) { 88 intptr_t old) {
90 BaseLayoutManager::OnWindowPropertyChanged(window, key, old); 89 BaseLayoutManager::OnWindowPropertyChanged(window, key, old);
91 if (key == ash::kWindowTrackedByWorkspacePropKey && 90 if (key == ash::internal::kWindowTrackedByWorkspaceKey &&
92 ash::GetTrackedByWorkspace(window)) { 91 ash::GetTrackedByWorkspace(window)) {
93 // We currently don't need to support transitioning from true to false, so 92 // We currently don't need to support transitioning from true to false, so
94 // we ignore it. 93 // we ignore it.
95 workspace_manager_->AddWindow(window); 94 workspace_manager_->AddWindow(window);
96 } 95 }
97 } 96 }
98 97
99 void WorkspaceLayoutManager::ShowStateChanged( 98 void WorkspaceLayoutManager::ShowStateChanged(
100 aura::Window* window, 99 aura::Window* window,
101 ui::WindowShowState last_show_state) { 100 ui::WindowShowState last_show_state) {
102 if (workspace_manager_->IsManagedWindow(window)) { 101 if (workspace_manager_->IsManagedWindow(window)) {
103 if (wm::IsWindowMinimized(window)) { 102 if (wm::IsWindowMinimized(window)) {
104 workspace_manager_->RemoveWindow(window); 103 workspace_manager_->RemoveWindow(window);
105 } else if ((window->TargetVisibility() || 104 } else if ((window->TargetVisibility() ||
106 last_show_state == ui::SHOW_STATE_MINIMIZED) && 105 last_show_state == ui::SHOW_STATE_MINIMIZED) &&
107 !workspace_manager_->IsManagingWindow(window)) { 106 !workspace_manager_->IsManagingWindow(window)) {
108 workspace_manager_->AddWindow(window); 107 workspace_manager_->AddWindow(window);
109 } 108 }
110 } else { 109 } else {
111 workspace_manager_->UpdateShelfVisibility(); 110 workspace_manager_->UpdateShelfVisibility();
112 } 111 }
113 BaseLayoutManager::ShowStateChanged(window, last_show_state); 112 BaseLayoutManager::ShowStateChanged(window, last_show_state);
114 workspace_manager_->ShowStateChanged(window); 113 workspace_manager_->ShowStateChanged(window);
115 } 114 }
116 115
117 } // namespace internal 116 } // namespace internal
118 } // namespace ash 117 } // namespace ash
OLDNEW
« no previous file with comments | « ash/wm/window_util.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698