| 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 29 matching lines...) Expand all Loading... |
| 40 #include "ash/wm/dialog_frame_view.h" | 40 #include "ash/wm/dialog_frame_view.h" |
| 41 #include "ash/wm/event_client_impl.h" | 41 #include "ash/wm/event_client_impl.h" |
| 42 #include "ash/wm/event_rewriter_event_filter.h" | 42 #include "ash/wm/event_rewriter_event_filter.h" |
| 43 #include "ash/wm/overlay_event_filter.h" | 43 #include "ash/wm/overlay_event_filter.h" |
| 44 #include "ash/wm/power_button_controller.h" | 44 #include "ash/wm/power_button_controller.h" |
| 45 #include "ash/wm/property_util.h" | 45 #include "ash/wm/property_util.h" |
| 46 #include "ash/wm/resize_shadow_controller.h" | 46 #include "ash/wm/resize_shadow_controller.h" |
| 47 #include "ash/wm/root_window_layout_manager.h" | 47 #include "ash/wm/root_window_layout_manager.h" |
| 48 #include "ash/wm/screen_dimmer.h" | 48 #include "ash/wm/screen_dimmer.h" |
| 49 #include "ash/wm/session_state_controller.h" | 49 #include "ash/wm/session_state_controller.h" |
| 50 #include "ash/wm/session_state_controller_impl.h" |
| 51 #include "ash/wm/session_state_controller_impl2.h" |
| 50 #include "ash/wm/shadow_controller.h" | 52 #include "ash/wm/shadow_controller.h" |
| 51 #include "ash/wm/stacking_controller.h" | 53 #include "ash/wm/stacking_controller.h" |
| 52 #include "ash/wm/system_gesture_event_filter.h" | 54 #include "ash/wm/system_gesture_event_filter.h" |
| 53 #include "ash/wm/system_modal_container_event_filter.h" | 55 #include "ash/wm/system_modal_container_event_filter.h" |
| 54 #include "ash/wm/system_modal_container_layout_manager.h" | 56 #include "ash/wm/system_modal_container_layout_manager.h" |
| 55 #include "ash/wm/user_activity_detector.h" | 57 #include "ash/wm/user_activity_detector.h" |
| 56 #include "ash/wm/video_detector.h" | 58 #include "ash/wm/video_detector.h" |
| 57 #include "ash/wm/visibility_controller.h" | 59 #include "ash/wm/visibility_controller.h" |
| 58 #include "ash/wm/window_cycle_controller.h" | 60 #include "ash/wm/window_cycle_controller.h" |
| 59 #include "ash/wm/window_modality_controller.h" | 61 #include "ash/wm/window_modality_controller.h" |
| (...skipping 425 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 485 | 487 |
| 486 // Force Layout | 488 // Force Layout |
| 487 root_window_controller->root_window_layout()->OnWindowResized(); | 489 root_window_controller->root_window_layout()->OnWindowResized(); |
| 488 | 490 |
| 489 // It needs to be created after OnWindowResized has been called, otherwise the | 491 // It needs to be created after OnWindowResized has been called, otherwise the |
| 490 // widget will not paint when restoring after a browser crash. Also it needs | 492 // widget will not paint when restoring after a browser crash. Also it needs |
| 491 // to be created after InitSecondaryDisplays() to initialize the wallpapers in | 493 // to be created after InitSecondaryDisplays() to initialize the wallpapers in |
| 492 // the correct size. | 494 // the correct size. |
| 493 user_wallpaper_delegate_->InitializeWallpaper(); | 495 user_wallpaper_delegate_->InitializeWallpaper(); |
| 494 | 496 |
| 495 session_state_controller_.reset(new SessionStateController); | 497 if (command_line->HasSwitch(ash::switches::kAshNewLockAnimationsEnabled)) |
| 498 session_state_controller_.reset(new SessionStateControllerImpl2); |
| 499 else if (command_line->HasSwitch( |
| 500 ash::switches::kAshNewLockAnimationsDisabled)) |
| 501 session_state_controller_.reset(new SessionStateControllerImpl); |
| 502 else // default |
| 503 session_state_controller_.reset(new SessionStateControllerImpl); |
| 496 power_button_controller_.reset(new PowerButtonController( | 504 power_button_controller_.reset(new PowerButtonController( |
| 497 session_state_controller_.get())); | 505 session_state_controller_.get())); |
| 498 AddShellObserver(session_state_controller_.get()); | 506 AddShellObserver(session_state_controller_.get()); |
| 499 | 507 |
| 500 if (initially_hide_cursor_) | 508 if (initially_hide_cursor_) |
| 501 cursor_manager_.ShowCursor(false); | 509 cursor_manager_.ShowCursor(false); |
| 502 | 510 |
| 503 // Cursor might have been hidden by somethign other than chrome. | 511 // Cursor might have been hidden by somethign other than chrome. |
| 504 // Let the first mouse event show the cursor. | 512 // Let the first mouse event show the cursor. |
| 505 env_filter_->set_cursor_hidden_by_filter(true); | 513 env_filter_->set_cursor_hidden_by_filter(true); |
| (...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 768 iter != controllers.end(); ++iter) { | 776 iter != controllers.end(); ++iter) { |
| 769 if ((*iter)->GetSystemModalLayoutManager(window)-> | 777 if ((*iter)->GetSystemModalLayoutManager(window)-> |
| 770 CanWindowReceiveEvents(window)) { | 778 CanWindowReceiveEvents(window)) { |
| 771 return true; | 779 return true; |
| 772 } | 780 } |
| 773 } | 781 } |
| 774 return false; | 782 return false; |
| 775 } | 783 } |
| 776 | 784 |
| 777 } // namespace ash | 785 } // namespace ash |
| OLD | NEW |