| 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 423 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 482 | 484 |
| 483 // Force Layout | 485 // Force Layout |
| 484 root_window_controller->root_window_layout()->OnWindowResized(); | 486 root_window_controller->root_window_layout()->OnWindowResized(); |
| 485 | 487 |
| 486 // It needs to be created after OnWindowResized has been called, otherwise the | 488 // It needs to be created after OnWindowResized has been called, otherwise the |
| 487 // widget will not paint when restoring after a browser crash. Also it needs | 489 // widget will not paint when restoring after a browser crash. Also it needs |
| 488 // to be created after InitSecondaryDisplays() to initialize the wallpapers in | 490 // to be created after InitSecondaryDisplays() to initialize the wallpapers in |
| 489 // the correct size. | 491 // the correct size. |
| 490 user_wallpaper_delegate_->InitializeWallpaper(); | 492 user_wallpaper_delegate_->InitializeWallpaper(); |
| 491 | 493 |
| 492 session_state_controller_.reset(new SessionStateController); | 494 if (command_line->HasSwitch(ash::switches::kAshNewLockAnimationsEnabled)) |
| 495 session_state_controller_.reset(new SessionStateControllerImpl2); |
| 496 else |
| 497 session_state_controller_.reset(new SessionStateControllerImpl); |
| 493 power_button_controller_.reset(new PowerButtonController( | 498 power_button_controller_.reset(new PowerButtonController( |
| 494 session_state_controller_.get())); | 499 session_state_controller_.get())); |
| 495 AddShellObserver(session_state_controller_.get()); | 500 AddShellObserver(session_state_controller_.get()); |
| 496 | 501 |
| 497 if (initially_hide_cursor_) | 502 if (initially_hide_cursor_) |
| 498 cursor_manager_.ShowCursor(false); | 503 cursor_manager_.ShowCursor(false); |
| 499 | 504 |
| 500 // Cursor might have been hidden by somethign other than chrome. | 505 // Cursor might have been hidden by somethign other than chrome. |
| 501 // Let the first mouse event show the cursor. | 506 // Let the first mouse event show the cursor. |
| 502 env_filter_->set_cursor_hidden_by_filter(true); | 507 env_filter_->set_cursor_hidden_by_filter(true); |
| (...skipping 286 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 789 iter != controllers.end(); ++iter) { | 794 iter != controllers.end(); ++iter) { |
| 790 if ((*iter)->GetSystemModalLayoutManager(window)-> | 795 if ((*iter)->GetSystemModalLayoutManager(window)-> |
| 791 CanWindowReceiveEvents(window)) { | 796 CanWindowReceiveEvents(window)) { |
| 792 return true; | 797 return true; |
| 793 } | 798 } |
| 794 } | 799 } |
| 795 return false; | 800 return false; |
| 796 } | 801 } |
| 797 | 802 |
| 798 } // namespace ash | 803 } // namespace ash |
| OLD | NEW |