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 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "ash/accelerators/focus_manager_factory.h" | 10 #include "ash/accelerators/focus_manager_factory.h" |
(...skipping 401 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
412 } | 412 } |
413 return containers; | 413 return containers; |
414 } | 414 } |
415 | 415 |
416 // static | 416 // static |
417 bool Shell::IsLauncherPerDisplayEnabled() { | 417 bool Shell::IsLauncherPerDisplayEnabled() { |
418 CommandLine* command_line = CommandLine::ForCurrentProcess(); | 418 CommandLine* command_line = CommandLine::ForCurrentProcess(); |
419 return !command_line->HasSwitch(switches::kAshDisableLauncherPerDisplay); | 419 return !command_line->HasSwitch(switches::kAshDisableLauncherPerDisplay); |
420 } | 420 } |
421 | 421 |
| 422 // static |
| 423 bool Shell::IsForcedMaximizeMode() { |
| 424 CommandLine* command_line = CommandLine::ForCurrentProcess(); |
| 425 return command_line->HasSwitch(switches::kForcedMaximizeMode); |
| 426 } |
| 427 |
422 void Shell::Init() { | 428 void Shell::Init() { |
423 delegate_->PreInit(); | 429 delegate_->PreInit(); |
424 #if defined(OS_CHROMEOS) && defined(USE_X11) | 430 #if defined(OS_CHROMEOS) && defined(USE_X11) |
425 output_configurator_animation_.reset( | 431 output_configurator_animation_.reset( |
426 new internal::OutputConfiguratorAnimation()); | 432 new internal::OutputConfiguratorAnimation()); |
427 output_configurator_->AddObserver(output_configurator_animation_.get()); | 433 output_configurator_->AddObserver(output_configurator_animation_.get()); |
428 if (base::chromeos::IsRunningOnChromeOS()) { | 434 if (base::chromeos::IsRunningOnChromeOS()) { |
429 display_change_observer_.reset(new internal::DisplayChangeObserverX11); | 435 display_change_observer_.reset(new internal::DisplayChangeObserverX11); |
430 // Register |display_change_observer_| first so that the rest of | 436 // Register |display_change_observer_| first so that the rest of |
431 // observer gets invoked after the root windows are configured. | 437 // observer gets invoked after the root windows are configured. |
(...skipping 515 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
947 //////////////////////////////////////////////////////////////////////////////// | 953 //////////////////////////////////////////////////////////////////////////////// |
948 // Shell, aura::client::ActivationChangeObserver implementation: | 954 // Shell, aura::client::ActivationChangeObserver implementation: |
949 | 955 |
950 void Shell::OnWindowActivated(aura::Window* gained_active, | 956 void Shell::OnWindowActivated(aura::Window* gained_active, |
951 aura::Window* lost_active) { | 957 aura::Window* lost_active) { |
952 if (gained_active) | 958 if (gained_active) |
953 active_root_window_ = gained_active->GetRootWindow(); | 959 active_root_window_ = gained_active->GetRootWindow(); |
954 } | 960 } |
955 | 961 |
956 } // namespace ash | 962 } // namespace ash |
OLD | NEW |