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

Issue 2734933004: ash: Use SessionController instead of SessionStateDelegate (Closed)

Created:
3 years, 9 months ago by xiyuan
Modified:
3 years, 9 months ago
CC:
aboxhall+watch_chromium.org, chromium-reviews, darin-cc_chromium.org, davemoore+watch_chromium.org, derat+watch_chromium.org, dmazzoni+watch_chromium.org, dtseng+watch_chromium.org, jam, je_julie, kalyank, nektar+watch_chromium.org, oshima+watch_chromium.org, posciak+watch_chromium.org, sadrul, stevenjb+watch_chromium.org, yuzo+watch_chromium.org
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

ash: Use SessionController instead of SessionStateDelegate - Switch SessionStateDelegate callers to SessionController; - Remove all migrated methods from SessionStateDelegate; - Update tests; - Update ash_shell_with_content; - Changed ScreenLocker to set SessionState::ACTIVE before destroying LockWindow so that focus is properly restored after lock; - Changed UserSessionManager to set SessionState::ACTIVE before creating browser window so that the created window receives focus; BUG=648964, 699234 Review-Url: https://codereview.chromium.org/2734933004 Cr-Commit-Position: refs/heads/master@{#458168} Committed: https://chromium.googlesource.com/chromium/src/+/f1ff14d7d25d3c37239e6804a3bfd6928c9cd1ef

Patch Set 1 #

Patch Set 2 : rebase, fix ash_unittests #

Patch Set 3 : fix interactive_ui_tests compile #

Patch Set 4 : fix tests #

Patch Set 5 : rebase #

Total comments: 78

Patch Set 6 : for #5 comments #

Patch Set 7 : SessionController picks a proper default state to avoid FlushForTest on start #

Patch Set 8 : rebase #

Total comments: 16

Patch Set 9 : for #8 #

Patch Set 10 : rebase to get WorkspaceLayoutManagerSoloTest change #

Unified diffs Side-by-side diffs Delta from patch set Stats (+885 lines, -1126 lines) Patch
M ash/BUILD.gn View 1 2 3 4 5 6 7 2 chunks +2 lines, -1 line 0 comments Download
M ash/accelerators/accelerator_controller_unittest.cc View 1 2 3 4 5 6 7 2 chunks +3 lines, -3 lines 0 comments Download
M ash/accelerators/accelerator_filter_unittest.cc View 1 2 3 4 5 3 chunks +13 lines, -10 lines 0 comments Download
M ash/accelerators/accelerator_interactive_uitest_chromeos.cc View 1 2 3 2 chunks +0 lines, -2 lines 0 comments Download
M ash/common/accelerators/accelerator_controller.cc View 1 2 3 4 5 6 7 6 chunks +8 lines, -9 lines 0 comments Download
M ash/common/session/session_controller.h View 1 2 3 4 5 6 3 chunks +14 lines, -2 lines 0 comments Download
M ash/common/session/session_controller.cc View 1 2 3 4 5 6 7 8 5 chunks +51 lines, -2 lines 0 comments Download
M ash/common/session/session_controller_unittest.cc View 1 2 3 4 5 2 chunks +17 lines, -0 lines 0 comments Download
M ash/common/session/session_state_delegate.h View 2 chunks +0 lines, -71 lines 0 comments Download
D ash/common/session/session_state_delegate.cc View 1 chunk +0 lines, -23 lines 0 comments Download
M ash/common/session/session_state_observer.cc View 2 chunks +3 lines, -4 lines 0 comments Download
M ash/common/shelf/shelf_layout_manager.cc View 1 3 chunks +3 lines, -4 lines 0 comments Download
M ash/common/shelf/shelf_locking_manager.h View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M ash/common/shelf/shelf_locking_manager.cc View 1 2 3 4 5 1 chunk +9 lines, -7 lines 0 comments Download
M ash/common/shelf/shelf_widget.cc View 1 3 chunks +3 lines, -3 lines 0 comments Download
M ash/common/shelf/shelf_window_watcher_unittest.cc View 1 2 3 4 5 6 7 2 chunks +2 lines, -2 lines 0 comments Download
M ash/common/system/chromeos/media_security/multi_profile_media_tray_item.cc View 1 2 3 4 5 6 7 2 chunks +4 lines, -5 lines 0 comments Download
M ash/common/system/chromeos/media_security/multi_profile_media_tray_item_unittest.cc View 1 2 3 4 5 3 chunks +4 lines, -7 lines 0 comments Download
M ash/common/system/chromeos/network/tray_vpn.cc View 2 chunks +2 lines, -2 lines 0 comments Download
M ash/common/system/chromeos/palette/palette_tray.cc View 1 4 chunks +6 lines, -7 lines 0 comments Download
M ash/common/system/chromeos/settings/tray_settings.cc View 3 chunks +3 lines, -5 lines 0 comments Download
M ash/common/system/date/date_default_view.cc View 3 chunks +3 lines, -3 lines 0 comments Download
M ash/common/system/overview/overview_button_tray.cc View 1 3 chunks +7 lines, -8 lines 0 comments Download
M ash/common/system/tiles/tiles_default_view.cc View 2 chunks +2 lines, -2 lines 0 comments Download
M ash/common/system/tray/system_tray.cc View 1 2 3 4 5 6 7 2 chunks +3 lines, -4 lines 0 comments Download
M ash/common/system/tray/tray_popup_utils.cc View 2 chunks +2 lines, -2 lines 0 comments Download
M ash/common/system/user/login_status.cc View 2 chunks +2 lines, -2 lines 0 comments Download
M ash/common/system/user/tray_user.cc View 1 2 3 4 5 4 chunks +16 lines, -16 lines 0 comments Download
M ash/common/system/user/tray_user_unittest.cc View 1 2 3 4 5 9 chunks +37 lines, -19 lines 0 comments Download
M ash/common/system/user/user_card_view.cc View 1 2 3 4 5 5 chunks +11 lines, -10 lines 0 comments Download
M ash/common/system/user/user_view.cc View 1 2 3 4 5 3 chunks +13 lines, -9 lines 0 comments Download
M ash/common/system/web_notification/web_notification_tray.cc View 1 2 3 4 2 chunks +2 lines, -2 lines 0 comments Download
A ash/common/test/test_session_controller_client.h View 1 2 3 4 5 1 chunk +81 lines, -0 lines 0 comments Download
A ash/common/test/test_session_controller_client.cc View 1 2 3 4 5 6 7 8 1 chunk +182 lines, -0 lines 0 comments Download
M ash/common/test/test_session_state_delegate.h View 1 2 3 4 5 6 7 8 1 chunk +1 line, -87 lines 0 comments Download
M ash/common/test/test_session_state_delegate.cc View 1 2 3 4 5 6 7 8 2 chunks +4 lines, -230 lines 0 comments Download
M ash/common/test/test_system_tray_delegate.cc View 2 chunks +4 lines, -4 lines 0 comments Download
M ash/common/wallpaper/wallpaper_view.cc View 1 2 chunks +2 lines, -2 lines 0 comments Download
M ash/common/wm/container_finder.cc View 1 2 chunks +2 lines, -2 lines 0 comments Download
M ash/common/wm/maximize_mode/maximize_mode_event_handler.cc View 2 chunks +4 lines, -5 lines 0 comments Download
M ash/common/wm/overview/window_selector_controller.cc View 1 2 chunks +4 lines, -5 lines 0 comments Download
M ash/common/wm/system_modal_container_layout_manager.cc View 1 2 chunks +2 lines, -2 lines 0 comments Download
M ash/common/wm/window_cycle_controller.cc View 2 chunks +2 lines, -2 lines 0 comments Download
M ash/common/wm/workspace/workspace_layout_manager.cc View 1 2 chunks +2 lines, -2 lines 0 comments Download
M ash/common/wm/workspace/workspace_layout_manager_unittest.cc View 1 2 3 4 5 6 7 8 9 3 chunks +5 lines, -5 lines 0 comments Download
M ash/common/wm_shell.cc View 1 2 3 4 5 6 7 3 chunks +8 lines, -8 lines 0 comments Download
M ash/mus/bridge/wm_shell_mus.cc View 1 2 3 4 5 6 7 2 chunks +1 line, -37 lines 0 comments Download
M ash/mus/shell_delegate_mus.cc View 2 chunks +1 line, -36 lines 0 comments Download
M ash/root_window_controller.cc View 1 4 chunks +4 lines, -4 lines 0 comments Download
M ash/root_window_controller_unittest.cc View 1 5 chunks +11 lines, -9 lines 0 comments Download
M ash/shelf/shelf_layout_manager_unittest.cc View 1 2 3 4 5 6 7 3 chunks +7 lines, -13 lines 0 comments Download
M ash/shell/app_list.cc View 1 2 chunks +2 lines, -2 lines 0 comments Download
M ash/shell/content/client/shell_browser_main_parts.h View 2 chunks +3 lines, -0 lines 0 comments Download
M ash/shell/content/client/shell_browser_main_parts.cc View 1 2 chunks +9 lines, -0 lines 0 comments Download
A ash/shell/example_session_controller_client.h View 1 chunk +38 lines, -0 lines 0 comments Download
A ash/shell/example_session_controller_client.cc View 1 2 3 4 5 1 chunk +55 lines, -0 lines 0 comments Download
M ash/shell/lock_view.cc View 2 chunks +3 lines, -2 lines 0 comments Download
M ash/shell/shell_delegate_impl.cc View 1 chunk +1 line, -41 lines 0 comments Download
M ash/shell/window_type_launcher.cc View 2 chunks +2 lines, -2 lines 0 comments Download
M ash/shell_unittest.cc View 1 4 chunks +12 lines, -11 lines 0 comments Download
M ash/system/chromeos/power/power_event_observer.cc View 3 chunks +4 lines, -4 lines 0 comments Download
M ash/system/chromeos/power/power_event_observer_unittest.cc View 5 chunks +4 lines, -5 lines 0 comments Download
M ash/system/chromeos/power/tablet_power_button_controller.cc View 1 2 chunks +6 lines, -7 lines 0 comments Download
M ash/system/chromeos/power/tablet_power_button_controller_unittest.cc View 1 2 3 4 5 3 chunks +9 lines, -3 lines 0 comments Download
M ash/system/chromeos/power/video_activity_notifier.cc View 1 2 chunks +2 lines, -2 lines 0 comments Download
M ash/system/overview/overview_button_tray_unittest.cc View 2 chunks +2 lines, -2 lines 0 comments Download
M ash/test/BUILD.gn View 1 2 3 4 5 6 7 1 chunk +2 lines, -0 lines 0 comments Download
M ash/test/ash_interactive_ui_test_base.cc View 1 2 3 4 5 2 chunks +20 lines, -0 lines 0 comments Download
M ash/test/ash_test_base.h View 1 2 chunks +4 lines, -4 lines 0 comments Download
M ash/test/ash_test_base.cc View 1 2 3 4 5 6 7 8 3 chunks +21 lines, -19 lines 0 comments Download
M ash/test/ash_test_helper.h View 4 chunks +13 lines, -0 lines 0 comments Download
M ash/test/ash_test_helper.cc View 1 2 3 4 5 6 7 1 chunk +6 lines, -4 lines 0 comments Download
M ash/wm/always_on_top_controller_unittest.cc View 1 1 chunk +2 lines, -0 lines 0 comments Download
M ash/wm/ash_focus_rules_unittest.cc View 1 2 3 4 5 6 7 8 9 chunks +25 lines, -33 lines 0 comments Download
M ash/wm/event_client_impl.cc View 2 chunks +2 lines, -2 lines 0 comments Download
M ash/wm/lock_state_controller_unittest.cc View 1 5 chunks +7 lines, -7 lines 0 comments Download
M ash/wm/power_button_controller.cc View 1 2 3 4 5 6 7 4 chunks +11 lines, -11 lines 0 comments Download
M ash/wm/window_cycle_controller_unittest.cc View 1 2 chunks +4 lines, -3 lines 0 comments Download
M chrome/browser/chromeos/login/lock/screen_locker.cc View 1 2 3 2 chunks +15 lines, -7 lines 0 comments Download
M chrome/browser/chromeos/login/lock/screen_locker_browsertest.cc View 1 2 3 1 chunk +4 lines, -0 lines 0 comments Download
M chrome/browser/chromeos/login/session/user_session_manager.cc View 1 2 3 4 5 6 7 2 chunks +5 lines, -1 line 0 comments Download
M chrome/browser/chromeos/login/users/wallpaper/wallpaper_manager_browsertest.cc View 1 2 3 2 chunks +4 lines, -3 lines 0 comments Download
M chrome/browser/chromeos/system/tray_accessibility_browsertest.cc View 1 2 3 2 chunks +3 lines, -6 lines 0 comments Download
M chrome/browser/ui/ash/session_state_delegate_chromeos.h View 1 2 3 4 5 6 7 8 1 chunk +1 line, -61 lines 0 comments Download
M chrome/browser/ui/ash/session_state_delegate_chromeos.cc View 1 2 3 4 5 6 7 8 2 chunks +2 lines, -179 lines 0 comments Download
M chrome/test/base/view_event_test_platform_part_chromeos.cc View 1 2 3 4 5 2 chunks +5 lines, -3 lines 0 comments Download
M ui/aura/mus/window_tree_client.cc View 1 2 3 4 5 6 7 8 9 1 chunk +4 lines, -2 lines 0 comments Download

Messages

Total messages: 55 (39 generated)
xiyuan
Most of the change are mechanical replacement. I have added comment to behavior changes to ...
3 years, 9 months ago (2017-03-17 07:08:16 UTC) #20
James Cook
msw, can you take a look at ash/common/shelf/shelf_locking_manager.cc? Wow, epic CL! I like it. Mostly ...
3 years, 9 months ago (2017-03-17 17:14:37 UTC) #22
msw
https://codereview.chromium.org/2734933004/diff/100001/ash/common/shelf/shelf_locking_manager.cc File ash/common/shelf/shelf_locking_manager.cc (right): https://codereview.chromium.org/2734933004/diff/100001/ash/common/shelf/shelf_locking_manager.cc#newcode15 ash/common/shelf/shelf_locking_manager.cc:15: : shelf_(shelf), stored_alignment_(shelf->GetAlignment()) { On 2017/03/17 17:14:35, James Cook ...
3 years, 9 months ago (2017-03-17 18:10:46 UTC) #24
xiyuan
Already have conflicts. So no trybots results for now. :( https://codereview.chromium.org/2734933004/diff/100001/ash/accelerators/accelerator_filter_unittest.cc File ash/accelerators/accelerator_filter_unittest.cc (right): https://codereview.chromium.org/2734933004/diff/100001/ash/accelerators/accelerator_filter_unittest.cc#newcode161 ...
3 years, 9 months ago (2017-03-17 22:52:03 UTC) #27
James Cook
FYI - I'm not going to get to this before the end of the day. ...
3 years, 9 months ago (2017-03-17 22:57:06 UTC) #30
xiyuan
On 2017/03/17 22:57:06, James Cook wrote: > FYI - I'm not going to get to ...
3 years, 9 months ago (2017-03-17 23:01:14 UTC) #31
James Cook
rockot, can you answer the question about FlushForTesting in https://codereview.chromium.org/2734933004/diff/100001/chrome/browser/chromeos/login/session/chrome_session_manager.cc#newcode142 ? No need to review ...
3 years, 9 months ago (2017-03-18 18:40:06 UTC) #33
xiyuan
https://codereview.chromium.org/2734933004/diff/100001/chrome/browser/chromeos/login/session/chrome_session_manager.cc File chrome/browser/chromeos/login/session/chrome_session_manager.cc (right): https://codereview.chromium.org/2734933004/diff/100001/chrome/browser/chromeos/login/session/chrome_session_manager.cc#newcode85 chrome/browser/chromeos/login/session/chrome_session_manager.cc:85: // Restores user sessions for a crash-and-restarted chrome. On ...
3 years, 9 months ago (2017-03-19 08:48:33 UTC) #36
James Cook
Almost there! Sorry I didn't catch these before. This has been a challenging CL to ...
3 years, 9 months ago (2017-03-19 19:02:52 UTC) #39
Ken Rockot(use gerrit already)
https://codereview.chromium.org/2734933004/diff/100001/chrome/browser/chromeos/login/session/chrome_session_manager.cc File chrome/browser/chromeos/login/session/chrome_session_manager.cc (right): https://codereview.chromium.org/2734933004/diff/100001/chrome/browser/chromeos/login/session/chrome_session_manager.cc#newcode142 chrome/browser/chromeos/login/session/chrome_session_manager.cc:142: SessionControllerClient::FlushForTesting(); On 2017/03/19 at 08:48:33, xiyuan wrote: > On ...
3 years, 9 months ago (2017-03-20 15:59:26 UTC) #40
xiyuan
https://codereview.chromium.org/2734933004/diff/160001/ash/common/session/session_controller.cc File ash/common/session/session_controller.cc (right): https://codereview.chromium.org/2734933004/diff/160001/ash/common/session/session_controller.cc#newcode22 ash/common/session/session_controller.cc:22: session_manager::SessionState GetDefaultSessionState() { On 2017/03/19 19:02:51, James Cook wrote: ...
3 years, 9 months ago (2017-03-20 17:12:56 UTC) #41
James Cook
LGTM. Great CL!
3 years, 9 months ago (2017-03-20 17:47:27 UTC) #44
xiyuan
sky@, could you do owner review for: c/test/base/view_event_test_platform_part_chromeos.cc ui/aura/mus/window_tree_client.cc ? Thanks.
3 years, 9 months ago (2017-03-20 19:03:03 UTC) #48
sky
LGTM
3 years, 9 months ago (2017-03-20 20:12:59 UTC) #49
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2734933004/200001
3 years, 9 months ago (2017-03-20 20:19:30 UTC) #52
commit-bot: I haz the power
3 years, 9 months ago (2017-03-20 20:29:11 UTC) #55
Message was sent while issue was closed.
Committed patchset #10 (id:200001) as
https://chromium.googlesource.com/chromium/src/+/f1ff14d7d25d3c37239e6804a3bf...

Powered by Google App Engine
This is Rietveld 408576698