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

Issue 12450014: Show an InfoBar when trying to start Packaged Apps from Metro mode. (Closed)

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

Description

Show an InfoBar when trying to start Packaged Apps from Metro mode. Platform Apps do not function properly while in Metro mode. This change intercepts platform app launch requests done while the browser is in metro mode, redirecting them to an infobar. If "yes" is chosen, a local pref is stored with the extension id and Profile that tried to launch it, and a relaunch of Chrome in Desktop mode is triggered. Upon restart, apps::AppLaunchOnRestartService is responsible for launching the selected app, and clearing the pref. BUG=153426 TEST=With Chrome configured for Windows 8 mode, try to start a packaged app. This can be done from NTP (if launcher not enabled), or from a taskbar shortcut, a desktop shortcut, or a pinned start page tile. InfoBar should display offering to switch to Desktop mode. If switching, selected packaged app should launch after a brief delay. Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=190306

Patch Set 1 #

Patch Set 2 : Version before the delay #

Patch Set 3 : add a 1 second delay, some nits #

Total comments: 7

Patch Set 4 : indenting, rebase #

Patch Set 5 : should look something like this #

Patch Set 6 : ProfileManager::GetProfile docuentation so misleading.. #

Patch Set 7 : handle flakiness #

Total comments: 12

Patch Set 8 : fix another corner case #

Total comments: 1

Patch Set 9 : rebase #

Total comments: 1

Patch Set 10 : rebase for DEPS #

Patch Set 11 : refactor of startup_browser_creator #

Patch Set 12 : rollback for othogonal change #

Patch Set 13 : respond to comments #

Total comments: 4

Patch Set 14 : keep strings in sync with webstore #

Patch Set 15 : feedback #

Unified diffs Side-by-side diffs Delta from patch set Stats (+237 lines, -32 lines) Patch
M apps/DEPS View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -0 lines 0 comments Download
A apps/app_launch_for_metro_restart_win.h View 1 2 3 4 5 6 7 1 chunk +26 lines, -0 lines 0 comments Download
A apps/app_launch_for_metro_restart_win.cc View 1 2 3 4 5 6 7 1 chunk +95 lines, -0 lines 0 comments Download
M apps/apps.gypi View 1 2 3 4 5 6 7 8 2 chunks +7 lines, -5 lines 0 comments Download
M apps/pref_names.h View 1 2 3 4 5 6 7 1 chunk +2 lines, -0 lines 0 comments Download
M apps/pref_names.cc View 1 2 3 4 5 6 7 1 chunk +9 lines, -0 lines 0 comments Download
M apps/prefs.cc View 1 2 3 4 5 6 7 1 chunk +5 lines, -0 lines 0 comments Download
M chrome/app/chromium_strings.grd View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +6 lines, -2 lines 0 comments Download
M chrome/app/google_chrome_strings.grd View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +6 lines, -2 lines 0 comments Download
M chrome/browser/extensions/platform_app_launcher.cc View 1 2 3 4 5 6 7 8 9 10 11 12 3 chunks +17 lines, -0 lines 0 comments Download
M chrome/browser/ui/extensions/app_metro_infobar_delegate_win.h View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +18 lines, -7 lines 0 comments Download
M chrome/browser/ui/extensions/app_metro_infobar_delegate_win.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 6 chunks +31 lines, -15 lines 0 comments Download
M chrome/browser/ui/startup/startup_browser_creator_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +10 lines, -0 lines 0 comments Download
M chrome/browser/ui/views/app_list/app_list_controller_win.cc View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +4 lines, -1 line 0 comments Download

Messages

Total messages: 21 (0 generated)
tapted
Hello Mr Wells, please take a look and let me know what you think. This ...
7 years, 9 months ago (2013-03-15 00:31:21 UTC) #1
benwells
Overall approach lg. Have not done a detailed review yet, my main question is about ...
7 years, 9 months ago (2013-03-15 00:39:04 UTC) #2
tapted
On 2013/03/15 00:39:04, benwells wrote: > my main question is about where to put the ...
7 years, 9 months ago (2013-03-15 00:51:16 UTC) #3
tapted
This [patchset 5] is the approach I'm going to try, to handle the multi-profile case. ...
7 years, 9 months ago (2013-03-15 07:04:42 UTC) #4
tapted
Hi Ben, patchset 6 is ready for review. Multi-profile cases all check out. PTAL.
7 years, 9 months ago (2013-03-18 06:27:14 UTC) #5
tapted
Code now has a little bit more necessary paranoia. https://codereview.chromium.org/12450014/diff/40001/apps/app_launch_on_restart_service_win.cc File apps/app_launch_on_restart_service_win.cc (right): https://codereview.chromium.org/12450014/diff/40001/apps/app_launch_on_restart_service_win.cc#newcode74 apps/app_launch_on_restart_service_win.cc:74: ...
7 years, 9 months ago (2013-03-18 06:54:31 UTC) #6
benwells
https://codereview.chromium.org/12450014/diff/40001/apps/app_launch_on_restart_service_win.cc File apps/app_launch_on_restart_service_win.cc (right): https://codereview.chromium.org/12450014/diff/40001/apps/app_launch_on_restart_service_win.cc#newcode32 apps/app_launch_on_restart_service_win.cc:32: g_browser_process->profile_manager()->GetProfile(profile_dir); Why not just send the profile to this ...
7 years, 9 months ago (2013-03-18 22:16:47 UTC) #7
tapted
I found another mistake, but after doing some more tracing I think this handles all ...
7 years, 9 months ago (2013-03-19 02:49:05 UTC) #8
benwells
lgtm
7 years, 9 months ago (2013-03-20 06:54:50 UTC) #9
tapted
+sky for OWNERS in c/b/ui/ [ startup/startup_browser_creator_impl.cc ] link: https://codereview.chromium.org/12450014/diff/61001/chrome/browser/ui/startup/startup_browser_creator_impl.cc
7 years, 9 months ago (2013-03-20 07:03:48 UTC) #10
sky
https://codereview.chromium.org/12450014/diff/61001/chrome/browser/ui/startup/startup_browser_creator_impl.cc File chrome/browser/ui/startup/startup_browser_creator_impl.cc (right): https://codereview.chromium.org/12450014/diff/61001/chrome/browser/ui/startup/startup_browser_creator_impl.cc#newcode562 chrome/browser/ui/startup/startup_browser_creator_impl.cc:562: if (base::win::GetVersion() >= base::win::VERSION_WIN8) { Is it possible to ...
7 years, 9 months ago (2013-03-20 14:30:00 UTC) #11
tapted
On 2013/03/20 14:30:00, sky wrote: > https://codereview.chromium.org/12450014/diff/61001/chrome/browser/ui/startup/startup_browser_creator_impl.cc > File chrome/browser/ui/startup/startup_browser_creator_impl.cc (right): > > https://codereview.chromium.org/12450014/diff/61001/chrome/browser/ui/startup/startup_browser_creator_impl.cc#newcode562 > ...
7 years, 9 months ago (2013-03-21 09:47:59 UTC) #12
sky
LGTM
7 years, 9 months ago (2013-03-21 15:34:02 UTC) #13
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/tapted@chromium.org/12450014/90001
7 years, 9 months ago (2013-03-21 22:14:29 UTC) #14
Peter Kasting
Please run all infobar-related reviews by me. Some problems here: * Making the infobar delegate ...
7 years, 9 months ago (2013-03-21 22:26:06 UTC) #15
tfarina
On Thu, Mar 21, 2013 at 7:26 PM, <pkasting@chromium.org> wrote: > Please run all infobar-related ...
7 years, 9 months ago (2013-03-21 23:02:12 UTC) #16
tapted
Thanks for catching this. PTAL. On 2013/03/21 22:26:06, Peter Kasting wrote: > Please run all ...
7 years, 9 months ago (2013-03-21 23:33:45 UTC) #17
Peter Kasting
Thanks, infobar changes LGTM. https://codereview.chromium.org/12450014/diff/104001/chrome/browser/ui/extensions/app_metro_infobar_delegate_win.cc File chrome/browser/ui/extensions/app_metro_infobar_delegate_win.cc (right): https://codereview.chromium.org/12450014/diff/104001/chrome/browser/ui/extensions/app_metro_infobar_delegate_win.cc#newcode33 chrome/browser/ui/extensions/app_metro_infobar_delegate_win.cc:33: if (!win8::IsSingleWindowMetroMode() || Nit: Simpler, ...
7 years, 9 months ago (2013-03-22 19:48:21 UTC) #18
tapted
https://codereview.chromium.org/12450014/diff/104001/chrome/browser/ui/extensions/app_metro_infobar_delegate_win.cc File chrome/browser/ui/extensions/app_metro_infobar_delegate_win.cc (right): https://codereview.chromium.org/12450014/diff/104001/chrome/browser/ui/extensions/app_metro_infobar_delegate_win.cc#newcode33 chrome/browser/ui/extensions/app_metro_infobar_delegate_win.cc:33: if (!win8::IsSingleWindowMetroMode() || On 2013/03/22 19:48:21, Peter Kasting wrote: ...
7 years, 9 months ago (2013-03-24 22:02:46 UTC) #19
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/tapted@chromium.org/12450014/117001
7 years, 9 months ago (2013-03-24 22:03:19 UTC) #20
commit-bot: I haz the power
7 years, 9 months ago (2013-03-25 00:23:35 UTC) #21
Message was sent while issue was closed.
Change committed as 190306

Powered by Google App Engine
This is Rietveld 408576698