OLD | NEW |
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/shell.h" | 5 #include "ash/shell.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "ash/accelerators/accelerator_controller.h" | 9 #include "ash/accelerators/accelerator_controller.h" |
10 #include "ash/accelerators/accelerator_filter.h" | 10 #include "ash/accelerators/accelerator_filter.h" |
(...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
266 aura::client::SetTooltipClient(tooltip_controller_.get()); | 266 aura::client::SetTooltipClient(tooltip_controller_.get()); |
267 | 267 |
268 drag_drop_controller_.reset(new internal::DragDropController); | 268 drag_drop_controller_.reset(new internal::DragDropController); |
269 power_button_controller_.reset(new PowerButtonController); | 269 power_button_controller_.reset(new PowerButtonController); |
270 video_detector_.reset(new VideoDetector); | 270 video_detector_.reset(new VideoDetector); |
271 window_cycle_controller_.reset(new WindowCycleController); | 271 window_cycle_controller_.reset(new WindowCycleController); |
272 } | 272 } |
273 | 273 |
274 Shell::WindowMode Shell::ComputeWindowMode(const gfx::Size& monitor_size, | 274 Shell::WindowMode Shell::ComputeWindowMode(const gfx::Size& monitor_size, |
275 CommandLine* command_line) const { | 275 CommandLine* command_line) const { |
| 276 if (command_line->HasSwitch(switches::kAuraForceCompactWindowMode)) |
| 277 return COMPACT_MODE; |
| 278 |
276 // If user set the flag, use their desired behavior. | 279 // If user set the flag, use their desired behavior. |
277 if (command_line->HasSwitch(switches::kAuraWindowMode)) { | 280 if (command_line->HasSwitch(switches::kAuraWindowMode)) { |
278 std::string mode = | 281 std::string mode = |
279 command_line->GetSwitchValueASCII(switches::kAuraWindowMode); | 282 command_line->GetSwitchValueASCII(switches::kAuraWindowMode); |
280 if (mode == switches::kAuraWindowModeNormal) | 283 if (mode == switches::kAuraWindowModeNormal) |
281 return NORMAL_MODE; | 284 return NORMAL_MODE; |
282 if (mode == switches::kAuraWindowModeCompact) | 285 if (mode == switches::kAuraWindowModeCompact) |
283 return COMPACT_MODE; | 286 return COMPACT_MODE; |
284 } | 287 } |
285 | 288 |
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
427 default_container->SetLayoutManager( | 430 default_container->SetLayoutManager( |
428 new internal::DefaultContainerLayoutManager( | 431 new internal::DefaultContainerLayoutManager( |
429 workspace_controller_->workspace_manager())); | 432 workspace_controller_->workspace_manager())); |
430 } | 433 } |
431 | 434 |
432 void Shell::ResetLayoutManager(int container_id) { | 435 void Shell::ResetLayoutManager(int container_id) { |
433 GetContainer(container_id)->SetLayoutManager(NULL); | 436 GetContainer(container_id)->SetLayoutManager(NULL); |
434 } | 437 } |
435 | 438 |
436 } // namespace ash | 439 } // namespace ash |
OLD | NEW |