Chromium Code Reviews
[email protected] (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(986)

Issue 12566039: [win8] Show a prompt before relaunching Chrome in Windows 8 mode while packaged apps are running. (Closed)

Created:
7 years, 9 months ago by tapted
Modified:
7 years, 8 months ago
CC:
chromium-reviews, Aaron Boodman, jeremya+watch_chromium.org, chromium-apps-reviews_chromium.org, chrome-apps-syd-reviews_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Visibility:
Public.

Description

[win8] Show a prompt before relaunching Chrome in Windows 8 mode while packaged apps are running. Introduces ShellWindowRegistry::IsShellWindowRegisteredInAnyProfile to help determine if packaged apps are currently running. Intercepts the IDC_WIN8_METRO_RESTART command and shows a modal dialog box if packaged apps are running to confirm that the user is OK with their packaged apps closing. Ensures apps with a relaunch handler are not relaunched when restarting in metro mode. BUG=222297 TEST=Launch a packaged app in desktop mode and select 'Relaunch Chrome in Windows 8 mode' from the hotdog menu. A prompt should appear confirming that your Chrome apps will close if you continue. If no packaged apps are running, no prompt should appear. Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=192240

Patch Set 1 #

Total comments: 10

Patch Set 2 : respond to comments #

Total comments: 2

Patch Set 3 : comments, moved logic to app_restore_service #

Patch Set 4 : decouple #

Patch Set 5 : rebase #

Patch Set 6 : UI review expressed a preference for OK/Cancel #

Patch Set 7 : remove unused code #

Total comments: 6

Patch Set 8 : respond to comments #

Total comments: 3

Patch Set 9 : static function #

Total comments: 4

Patch Set 10 : document ownership #

Unified diffs Side-by-side diffs Delta from patch set Stats (+176 lines, -36 lines) Patch
M apps/app_restore_service.h View 1 2 3 4 5 6 7 8 1 chunk +4 lines, -0 lines 0 comments Download
M apps/app_restore_service.cc View 1 2 3 4 5 6 7 8 2 chunks +18 lines, -0 lines 0 comments Download
M chrome/app/generated_resources.grd View 1 chunk +4 lines, -0 lines 0 comments Download
M chrome/browser/extensions/shell_window_registry.h View 1 2 chunks +6 lines, -1 line 0 comments Download
M chrome/browser/extensions/shell_window_registry.cc View 1 4 chunks +39 lines, -8 lines 0 comments Download
M chrome/browser/ui/browser_command_controller.cc View 1 2 3 4 5 6 7 8 9 4 chunks +10 lines, -5 lines 0 comments Download
M chrome/browser/ui/cocoa/simple_message_box_mac.mm View 1 2 3 4 5 6 1 chunk +3 lines, -0 lines 0 comments Download
A chrome/browser/ui/extensions/apps_metro_handler_win.h View 1 2 3 4 5 6 7 1 chunk +20 lines, -0 lines 0 comments Download
A chrome/browser/ui/extensions/apps_metro_handler_win.cc View 1 2 3 4 5 6 7 1 chunk +31 lines, -0 lines 0 comments Download
M chrome/browser/ui/extensions/shell_window.h View 1 2 3 4 1 chunk +4 lines, -3 lines 0 comments Download
M chrome/browser/ui/gtk/simple_message_box_gtk.cc View 1 2 3 4 5 6 1 chunk +3 lines, -0 lines 0 comments Download
M chrome/browser/ui/simple_message_box.h View 1 2 3 4 5 6 1 chunk +7 lines, -7 lines 0 comments Download
M chrome/browser/ui/startup/startup_browser_creator_impl.cc View 1 2 3 4 5 6 7 8 1 chunk +5 lines, -8 lines 0 comments Download
M chrome/browser/ui/views/simple_message_box_views.cc View 1 2 3 4 5 2 chunks +10 lines, -1 line 0 comments Download
M chrome/browser/ui/views/simple_message_box_win.cc View 1 2 3 4 5 6 7 1 chunk +10 lines, -3 lines 0 comments Download
M chrome/chrome_browser_ui.gypi View 1 2 3 4 5 6 1 chunk +2 lines, -0 lines 0 comments Download

Messages

Total messages: 23 (0 generated)
tapted
benwells for initial review. Showing a dialog was initially pulling a lot of dependencies into ...
7 years, 9 months ago (2013-03-20 05:51:37 UTC) #1
benwells
looks pretty good overall. https://codereview.chromium.org/12566039/diff/1/chrome/browser/extensions/shell_window_registry.h File chrome/browser/extensions/shell_window_registry.h (right): https://codereview.chromium.org/12566039/diff/1/chrome/browser/extensions/shell_window_registry.h#newcode100 chrome/browser/extensions/shell_window_registry.h:100: static int GetShellWindowCountAllProfiles(int window_type_mask); Should ...
7 years, 9 months ago (2013-03-20 07:06:18 UTC) #2
koz (OOO until 15th September)
https://codereview.chromium.org/12566039/diff/1/chrome/browser/ui/browser_command_controller.cc File chrome/browser/ui/browser_command_controller.cc (right): https://codereview.chromium.org/12566039/diff/1/chrome/browser/ui/browser_command_controller.cc#newcode91 chrome/browser/ui/browser_command_controller.cc:91: class SwitchToMetroUIHandler lol, I made the same mistake you ...
7 years, 9 months ago (2013-03-20 20:42:15 UTC) #3
tapted
(sorry there's a tiny bit of rebase mixed in.) https://codereview.chromium.org/12566039/diff/1/chrome/browser/extensions/shell_window_registry.h File chrome/browser/extensions/shell_window_registry.h (right): https://codereview.chromium.org/12566039/diff/1/chrome/browser/extensions/shell_window_registry.h#newcode100 chrome/browser/extensions/shell_window_registry.h:100: ...
7 years, 9 months ago (2013-03-21 10:31:14 UTC) #4
benwells
lgtm with dud function decl reoved. i would slightly prefer to have a ShellWindowRegistry function ...
7 years, 9 months ago (2013-03-21 23:44:06 UTC) #5
tapted
koz/benwells could you take another look. It didn't feel right having logic for whether apps ...
7 years, 9 months ago (2013-03-22 06:15:56 UTC) #6
benwells
Slgtm
7 years, 9 months ago (2013-03-22 06:42:43 UTC) #7
benwells
Slgtm
7 years, 9 months ago (2013-03-22 06:43:57 UTC) #8
benwells
Slgtm
7 years, 9 months ago (2013-03-22 06:44:49 UTC) #9
koz_google.com
I'm not a big fan of this logic being here - it makes this class ...
7 years, 9 months ago (2013-03-22 06:46:07 UTC) #10
tapted
On 2013/03/22 06:46:07, koz_google.com wrote: > I'm not a big fan of this logic being ...
7 years, 9 months ago (2013-03-22 09:23:03 UTC) #11
tapted
+sky for owners in c/b/ui benwells: UI review were OK with the modal dialog, but ...
7 years, 9 months ago (2013-03-28 03:09:17 UTC) #12
benwells
https://codereview.chromium.org/12566039/diff/79001/chrome/browser/ui/browser_command_controller.cc File chrome/browser/ui/browser_command_controller.cc (right): https://codereview.chromium.org/12566039/diff/79001/chrome/browser/ui/browser_command_controller.cc#newcode456 chrome/browser/ui/browser_command_controller.cc:456: window()->GetNativeWindow())) { Can we put this whole block into ...
7 years, 9 months ago (2013-03-28 03:38:58 UTC) #13
tapted
https://codereview.chromium.org/12566039/diff/79001/chrome/browser/ui/browser_command_controller.cc File chrome/browser/ui/browser_command_controller.cc (right): https://codereview.chromium.org/12566039/diff/79001/chrome/browser/ui/browser_command_controller.cc#newcode456 chrome/browser/ui/browser_command_controller.cc:456: window()->GetNativeWindow())) { On 2013/03/28 03:38:58, benwells wrote: > Can ...
7 years, 9 months ago (2013-03-28 06:21:20 UTC) #14
koz (OOO until 15th September)
https://codereview.chromium.org/12566039/diff/86001/apps/app_restore_service.cc File apps/app_restore_service.cc (right): https://codereview.chromium.org/12566039/diff/86001/apps/app_restore_service.cc#newcode56 apps/app_restore_service.cc:56: PerformStartupTasks(should_restore_apps); What I had in mind was that AppRestoreService ...
7 years, 8 months ago (2013-04-01 15:56:12 UTC) #15
tapted
On 2013/03/28 03:09:17, tapted wrote: > UI review were OK with the modal dialog, but ...
7 years, 8 months ago (2013-04-02 11:38:30 UTC) #16
koz (OOO until 15th September)
lgtm https://codereview.chromium.org/12566039/diff/86001/apps/app_restore_service.cc File apps/app_restore_service.cc (right): https://codereview.chromium.org/12566039/diff/86001/apps/app_restore_service.cc#newcode56 apps/app_restore_service.cc:56: PerformStartupTasks(should_restore_apps); On 2013/04/02 11:38:30, tapted wrote: > On ...
7 years, 8 months ago (2013-04-02 20:16:52 UTC) #17
tapted
sky, can I trouble you for OWNERS in: - c/b/ui/browser_command_controller.cc - c/b/ui/simple_message_box.h - c/b/ui/startup/startup_browser_creator_impl.cc - ...
7 years, 8 months ago (2013-04-03 09:09:58 UTC) #18
sky
https://codereview.chromium.org/12566039/diff/100001/chrome/browser/ui/browser_command_controller.cc File chrome/browser/ui/browser_command_controller.cc (right): https://codereview.chromium.org/12566039/diff/100001/chrome/browser/ui/browser_command_controller.cc#newcode454 chrome/browser/ui/browser_command_controller.cc:454: new SwitchToMetroUIHandler; Document who owns this. https://codereview.chromium.org/12566039/diff/100001/chrome/browser/ui/startup/startup_browser_creator_impl.cc File chrome/browser/ui/startup/startup_browser_creator_impl.cc ...
7 years, 8 months ago (2013-04-03 13:46:30 UTC) #19
tapted
https://codereview.chromium.org/12566039/diff/100001/chrome/browser/ui/browser_command_controller.cc File chrome/browser/ui/browser_command_controller.cc (right): https://codereview.chromium.org/12566039/diff/100001/chrome/browser/ui/browser_command_controller.cc#newcode454 chrome/browser/ui/browser_command_controller.cc:454: new SwitchToMetroUIHandler; On 2013/04/03 13:46:31, sky wrote: > Document ...
7 years, 8 months ago (2013-04-03 22:03:23 UTC) #20
sky
LGTM
7 years, 8 months ago (2013-04-03 23:12:19 UTC) #21
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/[email protected]/12566039/108001
7 years, 8 months ago (2013-04-04 01:19:29 UTC) #22
commit-bot: I haz the power
7 years, 8 months ago (2013-04-04 08:32:43 UTC) #23
Message was sent while issue was closed.
Change committed as 192240

Powered by Google App Engine
This is Rietveld 408576698