| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "ui/aura_shell/shell.h" | 5 #include "ui/aura_shell/shell.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
| 9 #include "ui/aura/aura_switches.h" | 9 #include "ui/aura/aura_switches.h" |
| 10 #include "ui/aura/client/aura_constants.h" | 10 #include "ui/aura/client/aura_constants.h" |
| (...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 211 internal::ShelfLayoutManager* shelf_layout_manager = | 211 internal::ShelfLayoutManager* shelf_layout_manager = |
| 212 new internal::ShelfLayoutManager(launcher_->widget(), status_widget); | 212 new internal::ShelfLayoutManager(launcher_->widget(), status_widget); |
| 213 GetContainer(aura_shell::internal::kShellWindowId_LauncherContainer)-> | 213 GetContainer(aura_shell::internal::kShellWindowId_LauncherContainer)-> |
| 214 SetLayoutManager(shelf_layout_manager); | 214 SetLayoutManager(shelf_layout_manager); |
| 215 | 215 |
| 216 internal::StatusAreaLayoutManager* status_area_layout_manager = | 216 internal::StatusAreaLayoutManager* status_area_layout_manager = |
| 217 new internal::StatusAreaLayoutManager(shelf_layout_manager); | 217 new internal::StatusAreaLayoutManager(shelf_layout_manager); |
| 218 GetContainer(aura_shell::internal::kShellWindowId_StatusContainer)-> | 218 GetContainer(aura_shell::internal::kShellWindowId_StatusContainer)-> |
| 219 SetLayoutManager(status_area_layout_manager); | 219 SetLayoutManager(status_area_layout_manager); |
| 220 | 220 |
| 221 if (!CommandLine::ForCurrentProcess()->HasSwitch(switches::kAuraNoShadows)) | 221 CommandLine* command_line = CommandLine::ForCurrentProcess(); |
| 222 if (!command_line->HasSwitch(switches::kAuraNoShadows)) |
| 222 shadow_controller_.reset(new internal::ShadowController()); | 223 shadow_controller_.reset(new internal::ShadowController()); |
| 223 | 224 |
| 224 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kAuraWindows)) { | 225 if (command_line->HasSwitch(switches::kAuraConstrainedWindows)) { |
| 225 EnableWorkspaceManager(); | 226 EnableWorkspaceManager(); |
| 226 } else { | 227 } else { |
| 227 internal::ToplevelLayoutManager* toplevel_layout_manager = | 228 internal::ToplevelLayoutManager* toplevel_layout_manager = |
| 228 new internal::ToplevelLayoutManager(); | 229 new internal::ToplevelLayoutManager(); |
| 229 default_container->SetLayoutManager(toplevel_layout_manager); | 230 default_container->SetLayoutManager(toplevel_layout_manager); |
| 230 toplevel_layout_manager->set_shelf(shelf_layout_manager); | 231 toplevel_layout_manager->set_shelf(shelf_layout_manager); |
| 231 } | 232 } |
| 232 | 233 |
| 233 // Force a layout. | 234 // Force a layout. |
| 234 root_window_layout->OnWindowResized(); | 235 root_window_layout->OnWindowResized(); |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 292 new internal::WorkspaceController(default_container)); | 293 new internal::WorkspaceController(default_container)); |
| 293 workspace_controller_->SetLauncherModel(launcher_->model()); | 294 workspace_controller_->SetLauncherModel(launcher_->model()); |
| 294 default_container->SetEventFilter( | 295 default_container->SetEventFilter( |
| 295 new internal::DefaultContainerEventFilter(default_container)); | 296 new internal::DefaultContainerEventFilter(default_container)); |
| 296 default_container->SetLayoutManager( | 297 default_container->SetLayoutManager( |
| 297 new internal::DefaultContainerLayoutManager( | 298 new internal::DefaultContainerLayoutManager( |
| 298 workspace_controller_->workspace_manager())); | 299 workspace_controller_->workspace_manager())); |
| 299 } | 300 } |
| 300 | 301 |
| 301 } // namespace aura_shell | 302 } // namespace aura_shell |
| OLD | NEW |