| 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 28 matching lines...) Expand all Loading... |
| 39 #include "ash/wm/dialog_frame_view.h" | 39 #include "ash/wm/dialog_frame_view.h" |
| 40 #include "ash/wm/event_client_impl.h" | 40 #include "ash/wm/event_client_impl.h" |
| 41 #include "ash/wm/event_rewriter_event_filter.h" | 41 #include "ash/wm/event_rewriter_event_filter.h" |
| 42 #include "ash/wm/overlay_event_filter.h" | 42 #include "ash/wm/overlay_event_filter.h" |
| 43 #include "ash/wm/power_button_controller.h" | 43 #include "ash/wm/power_button_controller.h" |
| 44 #include "ash/wm/property_util.h" | 44 #include "ash/wm/property_util.h" |
| 45 #include "ash/wm/resize_shadow_controller.h" | 45 #include "ash/wm/resize_shadow_controller.h" |
| 46 #include "ash/wm/root_window_layout_manager.h" | 46 #include "ash/wm/root_window_layout_manager.h" |
| 47 #include "ash/wm/screen_dimmer.h" | 47 #include "ash/wm/screen_dimmer.h" |
| 48 #include "ash/wm/session_state_controller.h" | 48 #include "ash/wm/session_state_controller.h" |
| 49 #include "ash/wm/session_state_controller_impl.h" |
| 50 #include "ash/wm/session_state_controller_impl2.h" |
| 49 #include "ash/wm/shadow_controller.h" | 51 #include "ash/wm/shadow_controller.h" |
| 50 #include "ash/wm/stacking_controller.h" | 52 #include "ash/wm/stacking_controller.h" |
| 51 #include "ash/wm/system_gesture_event_filter.h" | 53 #include "ash/wm/system_gesture_event_filter.h" |
| 52 #include "ash/wm/system_modal_container_event_filter.h" | 54 #include "ash/wm/system_modal_container_event_filter.h" |
| 53 #include "ash/wm/system_modal_container_layout_manager.h" | 55 #include "ash/wm/system_modal_container_layout_manager.h" |
| 54 #include "ash/wm/user_activity_detector.h" | 56 #include "ash/wm/user_activity_detector.h" |
| 55 #include "ash/wm/video_detector.h" | 57 #include "ash/wm/video_detector.h" |
| 56 #include "ash/wm/visibility_controller.h" | 58 #include "ash/wm/visibility_controller.h" |
| 57 #include "ash/wm/window_cycle_controller.h" | 59 #include "ash/wm/window_cycle_controller.h" |
| 58 #include "ash/wm/window_modality_controller.h" | 60 #include "ash/wm/window_modality_controller.h" |
| (...skipping 424 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 483 | 485 |
| 484 // Force Layout | 486 // Force Layout |
| 485 root_window_controller->root_window_layout()->OnWindowResized(); | 487 root_window_controller->root_window_layout()->OnWindowResized(); |
| 486 | 488 |
| 487 // It needs to be created after OnWindowResized has been called, otherwise the | 489 // It needs to be created after OnWindowResized has been called, otherwise the |
| 488 // widget will not paint when restoring after a browser crash. Also it needs | 490 // widget will not paint when restoring after a browser crash. Also it needs |
| 489 // to be created after InitSecondaryDisplays() to initialize the wallpapers in | 491 // to be created after InitSecondaryDisplays() to initialize the wallpapers in |
| 490 // the correct size. | 492 // the correct size. |
| 491 user_wallpaper_delegate_->InitializeWallpaper(); | 493 user_wallpaper_delegate_->InitializeWallpaper(); |
| 492 | 494 |
| 493 session_state_controller_.reset(new SessionStateController); | 495 if (command_line->HasSwitch(ash::switches::kAshNewLockAnimationsEnabled)) |
| 496 session_state_controller_.reset(new SessionStateControllerImpl2); |
| 497 else |
| 498 session_state_controller_.reset(new SessionStateControllerImpl); |
| 494 power_button_controller_.reset(new PowerButtonController( | 499 power_button_controller_.reset(new PowerButtonController( |
| 495 session_state_controller_.get())); | 500 session_state_controller_.get())); |
| 496 AddShellObserver(session_state_controller_.get()); | 501 AddShellObserver(session_state_controller_.get()); |
| 497 | 502 |
| 498 if (initially_hide_cursor_) | 503 if (initially_hide_cursor_) |
| 499 cursor_manager_.ShowCursor(false); | 504 cursor_manager_.ShowCursor(false); |
| 500 | 505 |
| 501 // Cursor might have been hidden by somethign other than chrome. | 506 // Cursor might have been hidden by somethign other than chrome. |
| 502 // Let the first mouse event show the cursor. | 507 // Let the first mouse event show the cursor. |
| 503 env_filter_->set_cursor_hidden_by_filter(true); | 508 env_filter_->set_cursor_hidden_by_filter(true); |
| (...skipping 286 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 790 iter != controllers.end(); ++iter) { | 795 iter != controllers.end(); ++iter) { |
| 791 if ((*iter)->GetSystemModalLayoutManager(window)-> | 796 if ((*iter)->GetSystemModalLayoutManager(window)-> |
| 792 CanWindowReceiveEvents(window)) { | 797 CanWindowReceiveEvents(window)) { |
| 793 return true; | 798 return true; |
| 794 } | 799 } |
| 795 } | 800 } |
| 796 return false; | 801 return false; |
| 797 } | 802 } |
| 798 | 803 |
| 799 } // namespace ash | 804 } // namespace ash |
| OLD | NEW |