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

Side by Side Diff: ash/shell.cc

Issue 11185006: Revert 162140 - ash : Decouple power button controller and session state controller. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: 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 | Annotate | Revision Log
« no previous file with comments | « ash/shell.h ('k') | ash/wm/power_button_controller.h » ('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/custom_frame_view_ash.h" 39 #include "ash/wm/custom_frame_view_ash.h"
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"
50 #include "ash/wm/shadow_controller.h" 49 #include "ash/wm/shadow_controller.h"
51 #include "ash/wm/stacking_controller.h" 50 #include "ash/wm/stacking_controller.h"
52 #include "ash/wm/system_gesture_event_filter.h" 51 #include "ash/wm/system_gesture_event_filter.h"
53 #include "ash/wm/system_modal_container_event_filter.h" 52 #include "ash/wm/system_modal_container_event_filter.h"
54 #include "ash/wm/system_modal_container_layout_manager.h" 53 #include "ash/wm/system_modal_container_layout_manager.h"
55 #include "ash/wm/user_activity_detector.h" 54 #include "ash/wm/user_activity_detector.h"
56 #include "ash/wm/video_detector.h" 55 #include "ash/wm/video_detector.h"
57 #include "ash/wm/visibility_controller.h" 56 #include "ash/wm/visibility_controller.h"
58 #include "ash/wm/window_cycle_controller.h" 57 #include "ash/wm/window_cycle_controller.h"
59 #include "ash/wm/window_modality_controller.h" 58 #include "ash/wm/window_modality_controller.h"
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after
241 240
242 // Destroy all child windows including widgets. 241 // Destroy all child windows including widgets.
243 display_controller_->CloseChildWindows(); 242 display_controller_->CloseChildWindows();
244 243
245 // These need a valid Shell instance to clean up properly, so explicitly 244 // These need a valid Shell instance to clean up properly, so explicitly
246 // delete them before invalidating the instance. 245 // delete them before invalidating the instance.
247 // Alphabetical. 246 // Alphabetical.
248 drag_drop_controller_.reset(); 247 drag_drop_controller_.reset();
249 magnification_controller_.reset(); 248 magnification_controller_.reset();
250 power_button_controller_.reset(); 249 power_button_controller_.reset();
251 session_state_controller_.reset();
252 resize_shadow_controller_.reset(); 250 resize_shadow_controller_.reset();
253 shadow_controller_.reset(); 251 shadow_controller_.reset();
254 tooltip_controller_.reset(); 252 tooltip_controller_.reset();
255 event_client_.reset(); 253 event_client_.reset();
256 window_cycle_controller_.reset(); 254 window_cycle_controller_.reset();
257 capture_controller_.reset(); 255 capture_controller_.reset();
258 nested_dispatcher_controller_.reset(); 256 nested_dispatcher_controller_.reset();
259 user_action_client_.reset(); 257 user_action_client_.reset();
260 visibility_controller_.reset(); 258 visibility_controller_.reset();
261 259
(...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after
483 481
484 // Force Layout 482 // Force Layout
485 root_window_controller->root_window_layout()->OnWindowResized(); 483 root_window_controller->root_window_layout()->OnWindowResized();
486 484
487 // It needs to be created after OnWindowResized has been called, otherwise the 485 // 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 486 // widget will not paint when restoring after a browser crash. Also it needs
489 // to be created after InitSecondaryDisplays() to initialize the wallpapers in 487 // to be created after InitSecondaryDisplays() to initialize the wallpapers in
490 // the correct size. 488 // the correct size.
491 user_wallpaper_delegate_->InitializeWallpaper(); 489 user_wallpaper_delegate_->InitializeWallpaper();
492 490
493 session_state_controller_.reset(new SessionStateController); 491 power_button_controller_.reset(new PowerButtonController);
494 power_button_controller_.reset(new PowerButtonController( 492 AddShellObserver(power_button_controller_.get());
495 session_state_controller_.get()));
496 AddShellObserver(session_state_controller_.get());
497 493
498 if (initially_hide_cursor_) 494 if (initially_hide_cursor_)
499 cursor_manager_.ShowCursor(false); 495 cursor_manager_.ShowCursor(false);
500 496
501 // Cursor might have been hidden by somethign other than chrome. 497 // Cursor might have been hidden by somethign other than chrome.
502 // Let the first mouse event show the cursor. 498 // Let the first mouse event show the cursor.
503 env_filter_->set_cursor_hidden_by_filter(true); 499 env_filter_->set_cursor_hidden_by_filter(true);
504 } 500 }
505 501
506 void Shell::AddEnvEventFilter(aura::EventFilter* filter) { 502 void Shell::AddEnvEventFilter(aura::EventFilter* filter) {
(...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after
762 iter != controllers.end(); ++iter) { 758 iter != controllers.end(); ++iter) {
763 if ((*iter)->GetSystemModalLayoutManager(window)-> 759 if ((*iter)->GetSystemModalLayoutManager(window)->
764 CanWindowReceiveEvents(window)) { 760 CanWindowReceiveEvents(window)) {
765 return true; 761 return true;
766 } 762 }
767 } 763 }
768 return false; 764 return false;
769 } 765 }
770 766
771 } // namespace ash 767 } // namespace ash
OLDNEW
« no previous file with comments | « ash/shell.h ('k') | ash/wm/power_button_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698