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/base_layout_manager.h" | 39 #include "ash/wm/base_layout_manager.h" |
40 #include "ash/wm/capture_controller.h" | 40 #include "ash/wm/capture_controller.h" |
41 #include "ash/wm/custom_frame_view_ash.h" | 41 #include "ash/wm/custom_frame_view_ash.h" |
42 #include "ash/wm/dialog_frame_view.h" | 42 #include "ash/wm/dialog_frame_view.h" |
43 #include "ash/wm/event_client_impl.h" | 43 #include "ash/wm/event_client_impl.h" |
44 #include "ash/wm/event_rewriter_event_filter.h" | 44 #include "ash/wm/event_rewriter_event_filter.h" |
45 #include "ash/wm/overlay_event_filter.h" | 45 #include "ash/wm/overlay_event_filter.h" |
46 #include "ash/wm/panel_layout_manager.h" | 46 #include "ash/wm/panel_layout_manager.h" |
47 #include "ash/wm/panel_window_event_filter.h" | 47 #include "ash/wm/panel_window_event_filter.h" |
48 #include "ash/wm/power_button_controller.h" | 48 #include "ash/wm/power_button_controller.h" |
49 #include "ash/wm/session_state_controller.h" | |
Daniel Erat
2012/10/09 17:28:55
keep this list alphabetized
Denis Kuznetsov (DE-MUC)
2012/10/11 11:37:12
Done.
| |
49 #include "ash/wm/property_util.h" | 50 #include "ash/wm/property_util.h" |
50 #include "ash/wm/resize_shadow_controller.h" | 51 #include "ash/wm/resize_shadow_controller.h" |
51 #include "ash/wm/root_window_layout_manager.h" | 52 #include "ash/wm/root_window_layout_manager.h" |
52 #include "ash/wm/screen_dimmer.h" | 53 #include "ash/wm/screen_dimmer.h" |
53 #include "ash/wm/shadow_controller.h" | 54 #include "ash/wm/shadow_controller.h" |
54 #include "ash/wm/shelf_layout_manager.h" | 55 #include "ash/wm/shelf_layout_manager.h" |
55 #include "ash/wm/stacking_controller.h" | 56 #include "ash/wm/stacking_controller.h" |
56 #include "ash/wm/status_area_layout_manager.h" | 57 #include "ash/wm/status_area_layout_manager.h" |
57 #include "ash/wm/system_gesture_event_filter.h" | 58 #include "ash/wm/system_gesture_event_filter.h" |
58 #include "ash/wm/system_modal_container_event_filter.h" | 59 #include "ash/wm/system_modal_container_event_filter.h" |
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
246 shelf_->set_workspace_controller(NULL); | 247 shelf_->set_workspace_controller(NULL); |
247 // Destroy all child windows including widgets. | 248 // Destroy all child windows including widgets. |
248 display_controller_->CloseChildWindows(); | 249 display_controller_->CloseChildWindows(); |
249 | 250 |
250 // These need a valid Shell instance to clean up properly, so explicitly | 251 // These need a valid Shell instance to clean up properly, so explicitly |
251 // delete them before invalidating the instance. | 252 // delete them before invalidating the instance. |
252 // Alphabetical. | 253 // Alphabetical. |
253 drag_drop_controller_.reset(); | 254 drag_drop_controller_.reset(); |
254 magnification_controller_.reset(); | 255 magnification_controller_.reset(); |
255 power_button_controller_.reset(); | 256 power_button_controller_.reset(); |
257 session_state_controller_.reset(); | |
256 resize_shadow_controller_.reset(); | 258 resize_shadow_controller_.reset(); |
257 shadow_controller_.reset(); | 259 shadow_controller_.reset(); |
258 tooltip_controller_.reset(); | 260 tooltip_controller_.reset(); |
259 window_cycle_controller_.reset(); | 261 window_cycle_controller_.reset(); |
260 capture_controller_.reset(); | 262 capture_controller_.reset(); |
261 nested_dispatcher_controller_.reset(); | 263 nested_dispatcher_controller_.reset(); |
262 user_action_client_.reset(); | 264 user_action_client_.reset(); |
263 visibility_controller_.reset(); | 265 visibility_controller_.reset(); |
264 | 266 |
265 // This also deletes all RootWindows. | 267 // This also deletes all RootWindows. |
(...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
488 | 490 |
489 // Force Layout | 491 // Force Layout |
490 root_window_controller->root_window_layout()->OnWindowResized(); | 492 root_window_controller->root_window_layout()->OnWindowResized(); |
491 | 493 |
492 // It needs to be created after OnWindowResized has been called, otherwise the | 494 // It needs to be created after OnWindowResized has been called, otherwise the |
493 // widget will not paint when restoring after a browser crash. Also it needs | 495 // widget will not paint when restoring after a browser crash. Also it needs |
494 // to be created after InitSecondaryDisplays() to initialize the wallpapers in | 496 // to be created after InitSecondaryDisplays() to initialize the wallpapers in |
495 // the correct size. | 497 // the correct size. |
496 user_wallpaper_delegate_->InitializeWallpaper(); | 498 user_wallpaper_delegate_->InitializeWallpaper(); |
497 | 499 |
498 power_button_controller_.reset(new PowerButtonController); | 500 session_state_controller_.reset(new SessionStateController); |
499 AddShellObserver(power_button_controller_.get()); | 501 power_button_controller_.reset(new PowerButtonController( |
502 session_state_controller_.get())); | |
503 AddShellObserver(session_state_controller_.get()); | |
500 | 504 |
501 if (initially_hide_cursor_) | 505 if (initially_hide_cursor_) |
502 cursor_manager_.ShowCursor(false); | 506 cursor_manager_.ShowCursor(false); |
503 | 507 |
504 // Cursor might have been hidden by somethign other than chrome. | 508 // Cursor might have been hidden by somethign other than chrome. |
505 // Let the first mouse event show the cursor. | 509 // Let the first mouse event show the cursor. |
506 env_filter_->set_cursor_hidden_by_filter(true); | 510 env_filter_->set_cursor_hidden_by_filter(true); |
507 } | 511 } |
508 | 512 |
509 void Shell::AddEnvEventFilter(aura::EventFilter* filter) { | 513 void Shell::AddEnvEventFilter(aura::EventFilter* filter) { |
(...skipping 305 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
815 iter != controllers.end(); ++iter) { | 819 iter != controllers.end(); ++iter) { |
816 if ((*iter)->GetSystemModalLayoutManager()-> | 820 if ((*iter)->GetSystemModalLayoutManager()-> |
817 CanWindowReceiveEvents(window)) { | 821 CanWindowReceiveEvents(window)) { |
818 return true; | 822 return true; |
819 } | 823 } |
820 } | 824 } |
821 return false; | 825 return false; |
822 } | 826 } |
823 | 827 |
824 } // namespace ash | 828 } // namespace ash |
OLD | NEW |