Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(297)

Side by Side Diff: ash/shell.cc

Issue 11230050: ash : introduce second SessionStateController implementation. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Merge with TOT, review fixes Created 8 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « ash/ash_switches.cc ('k') | ash/wm/power_button_controller.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
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
OLDNEW
« no previous file with comments | « ash/ash_switches.cc ('k') | ash/wm/power_button_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698