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 399 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
410 } | 410 } |
411 return containers; | 411 return containers; |
412 } | 412 } |
413 | 413 |
414 // static | 414 // static |
415 bool Shell::IsLauncherPerDisplayEnabled() { | 415 bool Shell::IsLauncherPerDisplayEnabled() { |
416 CommandLine* command_line = CommandLine::ForCurrentProcess(); | 416 CommandLine* command_line = CommandLine::ForCurrentProcess(); |
417 return !command_line->HasSwitch(switches::kAshDisableLauncherPerDisplay); | 417 return !command_line->HasSwitch(switches::kAshDisableLauncherPerDisplay); |
418 } | 418 } |
419 | 419 |
| 420 // static |
| 421 bool Shell::IsForcedMaximizeMode() { |
| 422 CommandLine* command_line = CommandLine::ForCurrentProcess(); |
| 423 return command_line->HasSwitch(switches::kForcedMaximizeMode); |
| 424 } |
| 425 |
420 void Shell::Init() { | 426 void Shell::Init() { |
421 delegate_->PreInit(); | 427 delegate_->PreInit(); |
422 #if defined(OS_CHROMEOS) | 428 #if defined(OS_CHROMEOS) |
423 output_configurator_animation_.reset( | 429 output_configurator_animation_.reset( |
424 new internal::OutputConfiguratorAnimation()); | 430 new internal::OutputConfiguratorAnimation()); |
425 output_configurator_->AddObserver(output_configurator_animation_.get()); | 431 output_configurator_->AddObserver(output_configurator_animation_.get()); |
426 if (base::chromeos::IsRunningOnChromeOS()) { | 432 if (base::chromeos::IsRunningOnChromeOS()) { |
427 display_change_observer_.reset(new internal::DisplayChangeObserverX11); | 433 display_change_observer_.reset(new internal::DisplayChangeObserverX11); |
428 // Register |display_change_observer_| first so that the rest of | 434 // Register |display_change_observer_| first so that the rest of |
429 // observer gets invoked after the root windows are configured. | 435 // observer gets invoked after the root windows are configured. |
(...skipping 517 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 |