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 397 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
408 } | 408 } |
409 return containers; | 409 return containers; |
410 } | 410 } |
411 | 411 |
412 // static | 412 // static |
413 bool Shell::IsLauncherPerDisplayEnabled() { | 413 bool Shell::IsLauncherPerDisplayEnabled() { |
414 CommandLine* command_line = CommandLine::ForCurrentProcess(); | 414 CommandLine* command_line = CommandLine::ForCurrentProcess(); |
415 return !command_line->HasSwitch(switches::kAshDisableLauncherPerDisplay); | 415 return !command_line->HasSwitch(switches::kAshDisableLauncherPerDisplay); |
416 } | 416 } |
417 | 417 |
| 418 // static |
| 419 bool Shell::IsForcedMaximizeMode() { |
| 420 CommandLine* command_line = CommandLine::ForCurrentProcess(); |
| 421 return command_line->HasSwitch(switches::kForceMaximizeMode); |
| 422 } |
| 423 |
418 void Shell::Init() { | 424 void Shell::Init() { |
419 delegate_->PreInit(); | 425 delegate_->PreInit(); |
420 #if defined(OS_CHROMEOS) | 426 #if defined(OS_CHROMEOS) |
421 output_configurator_animation_.reset( | 427 output_configurator_animation_.reset( |
422 new internal::OutputConfiguratorAnimation()); | 428 new internal::OutputConfiguratorAnimation()); |
423 output_configurator_->AddObserver(output_configurator_animation_.get()); | 429 output_configurator_->AddObserver(output_configurator_animation_.get()); |
424 if (base::chromeos::IsRunningOnChromeOS()) { | 430 if (base::chromeos::IsRunningOnChromeOS()) { |
425 display_change_observer_.reset(new internal::DisplayChangeObserverX11); | 431 display_change_observer_.reset(new internal::DisplayChangeObserverX11); |
426 // Register |display_change_observer_| first so that the rest of | 432 // Register |display_change_observer_| first so that the rest of |
427 // observer gets invoked after the root windows are configured. | 433 // observer gets invoked after the root windows are configured. |
(...skipping 512 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
940 //////////////////////////////////////////////////////////////////////////////// | 946 //////////////////////////////////////////////////////////////////////////////// |
941 // Shell, aura::client::ActivationChangeObserver implementation: | 947 // Shell, aura::client::ActivationChangeObserver implementation: |
942 | 948 |
943 void Shell::OnWindowActivated(aura::Window* gained_active, | 949 void Shell::OnWindowActivated(aura::Window* gained_active, |
944 aura::Window* lost_active) { | 950 aura::Window* lost_active) { |
945 if (gained_active) | 951 if (gained_active) |
946 active_root_window_ = gained_active->GetRootWindow(); | 952 active_root_window_ = gained_active->GetRootWindow(); |
947 } | 953 } |
948 | 954 |
949 } // namespace ash | 955 } // namespace ash |
OLD | NEW |