| 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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 43 #include "ash/wm/event_client_impl.h" | 43 #include "ash/wm/event_client_impl.h" |
| 44 #include "ash/wm/event_rewriter_event_filter.h" | 44 #include "ash/wm/event_rewriter_event_filter.h" |
| 45 #include "ash/wm/overlay_event_filter.h" | 45 #include "ash/wm/overlay_event_filter.h" |
| 46 #include "ash/wm/panel_layout_manager.h" | 46 #include "ash/wm/panel_layout_manager.h" |
| 47 #include "ash/wm/panel_window_event_filter.h" | 47 #include "ash/wm/panel_window_event_filter.h" |
| 48 #include "ash/wm/power_button_controller.h" | 48 #include "ash/wm/power_button_controller.h" |
| 49 #include "ash/wm/property_util.h" | 49 #include "ash/wm/property_util.h" |
| 50 #include "ash/wm/resize_shadow_controller.h" | 50 #include "ash/wm/resize_shadow_controller.h" |
| 51 #include "ash/wm/root_window_layout_manager.h" | 51 #include "ash/wm/root_window_layout_manager.h" |
| 52 #include "ash/wm/screen_dimmer.h" | 52 #include "ash/wm/screen_dimmer.h" |
| 53 #include "ash/wm/session_state_controller.h" |
| 53 #include "ash/wm/shadow_controller.h" | 54 #include "ash/wm/shadow_controller.h" |
| 54 #include "ash/wm/shelf_layout_manager.h" | 55 #include "ash/wm/shelf_layout_manager.h" |
| 55 #include "ash/wm/stacking_controller.h" | 56 #include "ash/wm/stacking_controller.h" |
| 56 #include "ash/wm/status_area_layout_manager.h" | 57 #include "ash/wm/status_area_layout_manager.h" |
| 57 #include "ash/wm/system_gesture_event_filter.h" | 58 #include "ash/wm/system_gesture_event_filter.h" |
| 58 #include "ash/wm/system_modal_container_event_filter.h" | 59 #include "ash/wm/system_modal_container_event_filter.h" |
| 59 #include "ash/wm/system_modal_container_layout_manager.h" | 60 #include "ash/wm/system_modal_container_layout_manager.h" |
| 60 #include "ash/wm/user_activity_detector.h" | 61 #include "ash/wm/user_activity_detector.h" |
| 61 #include "ash/wm/video_detector.h" | 62 #include "ash/wm/video_detector.h" |
| 62 #include "ash/wm/visibility_controller.h" | 63 #include "ash/wm/visibility_controller.h" |
| (...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 246 shelf_->set_workspace_controller(NULL); | 247 shelf_->set_workspace_controller(NULL); |
| 247 // Destroy all child windows including widgets. | 248 // Destroy all child windows including widgets. |
| 248 display_controller_->CloseChildWindows(); | 249 display_controller_->CloseChildWindows(); |
| 249 | 250 |
| 250 // These need a valid Shell instance to clean up properly, so explicitly | 251 // These need a valid Shell instance to clean up properly, so explicitly |
| 251 // delete them before invalidating the instance. | 252 // delete them before invalidating the instance. |
| 252 // Alphabetical. | 253 // Alphabetical. |
| 253 drag_drop_controller_.reset(); | 254 drag_drop_controller_.reset(); |
| 254 magnification_controller_.reset(); | 255 magnification_controller_.reset(); |
| 255 power_button_controller_.reset(); | 256 power_button_controller_.reset(); |
| 257 session_state_controller_.reset(); |
| 256 resize_shadow_controller_.reset(); | 258 resize_shadow_controller_.reset(); |
| 257 shadow_controller_.reset(); | 259 shadow_controller_.reset(); |
| 258 tooltip_controller_.reset(); | 260 tooltip_controller_.reset(); |
| 259 event_client_.reset(); | 261 event_client_.reset(); |
| 260 window_cycle_controller_.reset(); | 262 window_cycle_controller_.reset(); |
| 261 capture_controller_.reset(); | 263 capture_controller_.reset(); |
| 262 nested_dispatcher_controller_.reset(); | 264 nested_dispatcher_controller_.reset(); |
| 263 user_action_client_.reset(); | 265 user_action_client_.reset(); |
| 264 visibility_controller_.reset(); | 266 visibility_controller_.reset(); |
| 265 | 267 |
| (...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 497 | 499 |
| 498 // Force Layout | 500 // Force Layout |
| 499 root_window_controller->root_window_layout()->OnWindowResized(); | 501 root_window_controller->root_window_layout()->OnWindowResized(); |
| 500 | 502 |
| 501 // It needs to be created after OnWindowResized has been called, otherwise the | 503 // It needs to be created after OnWindowResized has been called, otherwise the |
| 502 // widget will not paint when restoring after a browser crash. Also it needs | 504 // widget will not paint when restoring after a browser crash. Also it needs |
| 503 // to be created after InitSecondaryDisplays() to initialize the wallpapers in | 505 // to be created after InitSecondaryDisplays() to initialize the wallpapers in |
| 504 // the correct size. | 506 // the correct size. |
| 505 user_wallpaper_delegate_->InitializeWallpaper(); | 507 user_wallpaper_delegate_->InitializeWallpaper(); |
| 506 | 508 |
| 507 power_button_controller_.reset(new PowerButtonController); | 509 session_state_controller_.reset(new SessionStateController); |
| 508 AddShellObserver(power_button_controller_.get()); | 510 power_button_controller_.reset(new PowerButtonController( |
| 511 session_state_controller_.get())); |
| 512 AddShellObserver(session_state_controller_.get()); |
| 509 | 513 |
| 510 if (initially_hide_cursor_) | 514 if (initially_hide_cursor_) |
| 511 cursor_manager_.ShowCursor(false); | 515 cursor_manager_.ShowCursor(false); |
| 512 | 516 |
| 513 // Cursor might have been hidden by somethign other than chrome. | 517 // Cursor might have been hidden by somethign other than chrome. |
| 514 // Let the first mouse event show the cursor. | 518 // Let the first mouse event show the cursor. |
| 515 env_filter_->set_cursor_hidden_by_filter(true); | 519 env_filter_->set_cursor_hidden_by_filter(true); |
| 516 } | 520 } |
| 517 | 521 |
| 518 void Shell::AddEnvEventFilter(aura::EventFilter* filter) { | 522 void Shell::AddEnvEventFilter(aura::EventFilter* filter) { |
| (...skipping 306 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 825 iter != controllers.end(); ++iter) { | 829 iter != controllers.end(); ++iter) { |
| 826 if ((*iter)->GetSystemModalLayoutManager()-> | 830 if ((*iter)->GetSystemModalLayoutManager()-> |
| 827 CanWindowReceiveEvents(window)) { | 831 CanWindowReceiveEvents(window)) { |
| 828 return true; | 832 return true; |
| 829 } | 833 } |
| 830 } | 834 } |
| 831 return false; | 835 return false; |
| 832 } | 836 } |
| 833 | 837 |
| 834 } // namespace ash | 838 } // namespace ash |
| OLD | NEW |