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 keyboard::KeyboardController* Shell::GetKeyboardController() { |
| 424 return GetPrimaryRootWindowController()->keyboard_controller(); |
| 425 } |
| 426 |
422 void Shell::Init() { | 427 void Shell::Init() { |
423 delegate_->PreInit(); | 428 delegate_->PreInit(); |
424 #if defined(OS_CHROMEOS) | 429 #if defined(OS_CHROMEOS) |
425 output_configurator_animation_.reset( | 430 output_configurator_animation_.reset( |
426 new internal::OutputConfiguratorAnimation()); | 431 new internal::OutputConfiguratorAnimation()); |
427 output_configurator_->AddObserver(output_configurator_animation_.get()); | 432 output_configurator_->AddObserver(output_configurator_animation_.get()); |
428 if (base::chromeos::IsRunningOnChromeOS()) { | 433 if (base::chromeos::IsRunningOnChromeOS()) { |
429 display_change_observer_.reset(new internal::DisplayChangeObserverX11); | 434 display_change_observer_.reset(new internal::DisplayChangeObserverX11); |
430 // Register |display_change_observer_| first so that the rest of | 435 // Register |display_change_observer_| first so that the rest of |
431 // observer gets invoked after the root windows are configured. | 436 // observer gets invoked after the root windows are configured. |
(...skipping 517 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
949 //////////////////////////////////////////////////////////////////////////////// | 954 //////////////////////////////////////////////////////////////////////////////// |
950 // Shell, aura::client::ActivationChangeObserver implementation: | 955 // Shell, aura::client::ActivationChangeObserver implementation: |
951 | 956 |
952 void Shell::OnWindowActivated(aura::Window* gained_active, | 957 void Shell::OnWindowActivated(aura::Window* gained_active, |
953 aura::Window* lost_active) { | 958 aura::Window* lost_active) { |
954 if (gained_active) | 959 if (gained_active) |
955 active_root_window_ = gained_active->GetRootWindow(); | 960 active_root_window_ = gained_active->GetRootWindow(); |
956 } | 961 } |
957 | 962 |
958 } // namespace ash | 963 } // namespace ash |
OLD | NEW |