| 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 22 matching lines...) Expand all Loading... |
| 33 #include "ash/shell_window_ids.h" | 33 #include "ash/shell_window_ids.h" |
| 34 #include "ash/system/status_area_widget.h" | 34 #include "ash/system/status_area_widget.h" |
| 35 #include "ash/system/tray/system_tray_delegate.h" | 35 #include "ash/system/tray/system_tray_delegate.h" |
| 36 #include "ash/system/tray/system_tray_notifier.h" | 36 #include "ash/system/tray/system_tray_notifier.h" |
| 37 #include "ash/touch/touch_observer_hud.h" | 37 #include "ash/touch/touch_observer_hud.h" |
| 38 #include "ash/wm/activation_controller.h" | 38 #include "ash/wm/activation_controller.h" |
| 39 #include "ash/wm/always_on_top_controller.h" | 39 #include "ash/wm/always_on_top_controller.h" |
| 40 #include "ash/wm/app_list_controller.h" | 40 #include "ash/wm/app_list_controller.h" |
| 41 #include "ash/wm/ash_activation_controller.h" | 41 #include "ash/wm/ash_activation_controller.h" |
| 42 #include "ash/wm/ash_focus_rules.h" | 42 #include "ash/wm/ash_focus_rules.h" |
| 43 #include "ash/wm/ash_native_cursor_manager.h" |
| 43 #include "ash/wm/base_layout_manager.h" | 44 #include "ash/wm/base_layout_manager.h" |
| 44 #include "ash/wm/capture_controller.h" | 45 #include "ash/wm/capture_controller.h" |
| 45 #include "ash/wm/coordinate_conversion.h" | 46 #include "ash/wm/coordinate_conversion.h" |
| 46 #include "ash/wm/custom_frame_view_ash.h" | 47 #include "ash/wm/custom_frame_view_ash.h" |
| 47 #include "ash/wm/event_client_impl.h" | 48 #include "ash/wm/event_client_impl.h" |
| 48 #include "ash/wm/event_rewriter_event_filter.h" | 49 #include "ash/wm/event_rewriter_event_filter.h" |
| 49 #include "ash/wm/overlay_event_filter.h" | 50 #include "ash/wm/overlay_event_filter.h" |
| 50 #include "ash/wm/power_button_controller.h" | 51 #include "ash/wm/power_button_controller.h" |
| 51 #include "ash/wm/property_util.h" | 52 #include "ash/wm/property_util.h" |
| 52 #include "ash/wm/resize_shadow_controller.h" | 53 #include "ash/wm/resize_shadow_controller.h" |
| (...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 191 // Shell, public: | 192 // Shell, public: |
| 192 | 193 |
| 193 Shell::Shell(ShellDelegate* delegate) | 194 Shell::Shell(ShellDelegate* delegate) |
| 194 : screen_(new ScreenAsh), | 195 : screen_(new ScreenAsh), |
| 195 active_root_window_(NULL), | 196 active_root_window_(NULL), |
| 196 delegate_(delegate), | 197 delegate_(delegate), |
| 197 activation_client_(NULL), | 198 activation_client_(NULL), |
| 198 #if defined(OS_CHROMEOS) | 199 #if defined(OS_CHROMEOS) |
| 199 output_configurator_(new chromeos::OutputConfigurator()), | 200 output_configurator_(new chromeos::OutputConfigurator()), |
| 200 #endif // defined(OS_CHROMEOS) | 201 #endif // defined(OS_CHROMEOS) |
| 202 native_cursor_manager_(new AshNativeCursorManager), |
| 203 cursor_manager_(scoped_ptr<views::corewm::NativeCursorManager>( |
| 204 native_cursor_manager_)), |
| 201 browser_context_(NULL), | 205 browser_context_(NULL), |
| 202 simulate_modal_window_open_for_testing_(false) { | 206 simulate_modal_window_open_for_testing_(false) { |
| 203 DCHECK(delegate_.get()); | 207 DCHECK(delegate_.get()); |
| 204 display_manager_.reset(new internal::DisplayManager); | 208 display_manager_.reset(new internal::DisplayManager); |
| 205 ANNOTATE_LEAKING_OBJECT_PTR(screen_); // see crbug.com/156466 | 209 ANNOTATE_LEAKING_OBJECT_PTR(screen_); // see crbug.com/156466 |
| 206 gfx::Screen::SetScreenInstance(gfx::SCREEN_TYPE_ALTERNATE, screen_); | 210 gfx::Screen::SetScreenInstance(gfx::SCREEN_TYPE_ALTERNATE, screen_); |
| 207 if (!gfx::Screen::GetScreenByType(gfx::SCREEN_TYPE_NATIVE)) | 211 if (!gfx::Screen::GetScreenByType(gfx::SCREEN_TYPE_NATIVE)) |
| 208 gfx::Screen::SetScreenInstance(gfx::SCREEN_TYPE_NATIVE, screen_); | 212 gfx::Screen::SetScreenInstance(gfx::SCREEN_TYPE_NATIVE, screen_); |
| 209 #if defined(OS_CHROMEOS) | 213 #if defined(OS_CHROMEOS) |
| 210 content::GpuFeatureType blacklisted_features = | 214 content::GpuFeatureType blacklisted_features = |
| (...skipping 728 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 939 //////////////////////////////////////////////////////////////////////////////// | 943 //////////////////////////////////////////////////////////////////////////////// |
| 940 // Shell, aura::client::ActivationChangeObserver implementation: | 944 // Shell, aura::client::ActivationChangeObserver implementation: |
| 941 | 945 |
| 942 void Shell::OnWindowActivated(aura::Window* gained_active, | 946 void Shell::OnWindowActivated(aura::Window* gained_active, |
| 943 aura::Window* lost_active) { | 947 aura::Window* lost_active) { |
| 944 if (gained_active) | 948 if (gained_active) |
| 945 active_root_window_ = gained_active->GetRootWindow(); | 949 active_root_window_ = gained_active->GetRootWindow(); |
| 946 } | 950 } |
| 947 | 951 |
| 948 } // namespace ash | 952 } // namespace ash |
| OLD | NEW |