| 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 #include <utility> | 9 #include <utility> |
| 10 | 10 |
| (...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 93 #include "ash/wm/window_util.h" | 93 #include "ash/wm/window_util.h" |
| 94 #include "base/bind.h" | 94 #include "base/bind.h" |
| 95 #include "base/bind_helpers.h" | 95 #include "base/bind_helpers.h" |
| 96 #include "base/command_line.h" | 96 #include "base/command_line.h" |
| 97 #include "base/memory/ptr_util.h" | 97 #include "base/memory/ptr_util.h" |
| 98 #include "base/sys_info.h" | 98 #include "base/sys_info.h" |
| 99 #include "base/trace_event/trace_event.h" | 99 #include "base/trace_event/trace_event.h" |
| 100 #include "chromeos/audio/audio_a11y_controller.h" | 100 #include "chromeos/audio/audio_a11y_controller.h" |
| 101 #include "chromeos/chromeos_switches.h" | 101 #include "chromeos/chromeos_switches.h" |
| 102 #include "chromeos/dbus/dbus_thread_manager.h" | 102 #include "chromeos/dbus/dbus_thread_manager.h" |
| 103 #include "chromeos/system/devicemode.h" |
| 103 #include "ui/aura/client/aura_constants.h" | 104 #include "ui/aura/client/aura_constants.h" |
| 104 #include "ui/aura/env.h" | 105 #include "ui/aura/env.h" |
| 105 #include "ui/aura/layout_manager.h" | 106 #include "ui/aura/layout_manager.h" |
| 106 #include "ui/aura/window.h" | 107 #include "ui/aura/window.h" |
| 107 #include "ui/aura/window_event_dispatcher.h" | 108 #include "ui/aura/window_event_dispatcher.h" |
| 108 #include "ui/base/ui_base_switches.h" | 109 #include "ui/base/ui_base_switches.h" |
| 109 #include "ui/base/user_activity/user_activity_detector.h" | 110 #include "ui/base/user_activity/user_activity_detector.h" |
| 110 #include "ui/chromeos/user_activity_power_manager_notifier.h" | 111 #include "ui/chromeos/user_activity_power_manager_notifier.h" |
| 111 #include "ui/compositor/layer.h" | 112 #include "ui/compositor/layer.h" |
| 112 #include "ui/compositor/layer_animator.h" | 113 #include "ui/compositor/layer_animator.h" |
| (...skipping 459 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 572 #endif | 573 #endif |
| 573 | 574 |
| 574 // The DBusThreadManager must outlive this Shell. See the DCHECK in ~Shell. | 575 // The DBusThreadManager must outlive this Shell. See the DCHECK in ~Shell. |
| 575 chromeos::DBusThreadManager* dbus_thread_manager = | 576 chromeos::DBusThreadManager* dbus_thread_manager = |
| 576 chromeos::DBusThreadManager::Get(); | 577 chromeos::DBusThreadManager::Get(); |
| 577 projecting_observer_.reset( | 578 projecting_observer_.reset( |
| 578 new ProjectingObserver(dbus_thread_manager->GetPowerManagerClient())); | 579 new ProjectingObserver(dbus_thread_manager->GetPowerManagerClient())); |
| 579 display_configurator_->AddObserver(projecting_observer_.get()); | 580 display_configurator_->AddObserver(projecting_observer_.get()); |
| 580 wm_shell_->AddShellObserver(projecting_observer_.get()); | 581 wm_shell_->AddShellObserver(projecting_observer_.get()); |
| 581 | 582 |
| 582 if (!display_initialized && base::SysInfo::IsRunningOnChromeOS()) { | 583 if (!display_initialized && chromeos::IsRunningAsSystemCompositor()) { |
| 583 display_change_observer_ = base::MakeUnique<display::DisplayChangeObserver>( | 584 display_change_observer_ = base::MakeUnique<display::DisplayChangeObserver>( |
| 584 display_configurator_.get(), display_manager_.get()); | 585 display_configurator_.get(), display_manager_.get()); |
| 585 | 586 |
| 586 shutdown_observer_ = | 587 shutdown_observer_ = |
| 587 base::MakeUnique<ShutdownObserver>(display_configurator_.get()); | 588 base::MakeUnique<ShutdownObserver>(display_configurator_.get()); |
| 588 | 589 |
| 589 // Register |display_change_observer_| first so that the rest of | 590 // Register |display_change_observer_| first so that the rest of |
| 590 // observer gets invoked after the root windows are configured. | 591 // observer gets invoked after the root windows are configured. |
| 591 display_configurator_->AddObserver(display_change_observer_.get()); | 592 display_configurator_->AddObserver(display_change_observer_.get()); |
| 592 display_error_observer_.reset(new DisplayErrorObserver()); | 593 display_error_observer_.reset(new DisplayErrorObserver()); |
| (...skipping 254 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 847 std::unique_ptr<ui::EventTargetIterator> Shell::GetChildIterator() const { | 848 std::unique_ptr<ui::EventTargetIterator> Shell::GetChildIterator() const { |
| 848 return std::unique_ptr<ui::EventTargetIterator>(); | 849 return std::unique_ptr<ui::EventTargetIterator>(); |
| 849 } | 850 } |
| 850 | 851 |
| 851 ui::EventTargeter* Shell::GetEventTargeter() { | 852 ui::EventTargeter* Shell::GetEventTargeter() { |
| 852 NOTREACHED(); | 853 NOTREACHED(); |
| 853 return nullptr; | 854 return nullptr; |
| 854 } | 855 } |
| 855 | 856 |
| 856 } // namespace ash | 857 } // namespace ash |
| OLD | NEW |