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

Issue 14579006: Start app shim when app launched. (Closed)

Created:
7 years, 7 months ago by jackhou1
Modified:
7 years, 6 months ago
CC:
chromium-reviews, tfarina, Aaron Boodman, sail+watch_chromium.org, chromium-apps-reviews_chromium.org
Visibility:
Public.

Description

Start app shim when app launched. ExtensionAppShimHandler launches the relevant shim in response to NOTIFICATION_EXTENSION_HOST_CREATED. A new field is added to the LaunchApp IPC message: launch_now. This indicates whether to launch the app immediately. This prevents the shim launching the app again. BUG=168080 TEST=Find an app that has an app shim bundle. Launch it from the launcher or new tab page. The shim should start. Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=203309

Patch Set 1 #

Total comments: 22

Patch Set 2 : Simplify by using web_app functionality and remove app_shim_util stuff. #

Total comments: 14

Patch Set 3 : Address comments #

Total comments: 8

Patch Set 4 : Sync and rebase #

Patch Set 5 : Sync and rebase #

Patch Set 6 : Add extra parameter to LaunchApp message indicating whether to launch the app. #

Patch Set 7 : Sync and rebase #

Total comments: 10

Patch Set 8 : Address comments #

Total comments: 6

Patch Set 9 : Address comments #

Total comments: 2

Patch Set 10 : Sync and rebase #

Patch Set 11 : Address comments #

Total comments: 2

Patch Set 12 : Address comment #

Total comments: 8

Patch Set 13 : Address comments and fix tests #

Patch Set 14 : Missed a file #

Total comments: 4

Patch Set 15 : Address comments. Use IPC_ENUM_TRAITS macro. #

Patch Set 16 : Sync and rebase #

Total comments: 2

Patch Set 17 : Address comment #

Unified diffs Side-by-side diffs Delta from patch set Stats (+210 lines, -73 lines) Patch
M apps/DEPS View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +1 line, -0 lines 0 comments Download
M apps/app_shim/app_shim_handler_mac.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 2 chunks +5 lines, -2 lines 0 comments Download
M apps/app_shim/app_shim_host_mac.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 3 chunks +9 lines, -6 lines 0 comments Download
M apps/app_shim/app_shim_host_mac.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 3 chunks +18 lines, -13 lines 0 comments Download
M apps/app_shim/app_shim_host_mac_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 7 chunks +43 lines, -21 lines 0 comments Download
A apps/app_shim/app_shim_launch.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +20 lines, -0 lines 0 comments Download
M apps/app_shim/app_shim_messages.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +13 lines, -6 lines 0 comments Download
M apps/app_shim/extension_app_shim_handler_mac.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 4 chunks +10 lines, -2 lines 0 comments Download
M apps/app_shim/extension_app_shim_handler_mac.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 6 chunks +38 lines, -10 lines 0 comments Download
M apps/app_shim/extension_app_shim_handler_mac_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 3 chunks +9 lines, -6 lines 0 comments Download
M chrome/app/chrome_main_app_mode_mac.mm View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 5 chunks +7 lines, -4 lines 0 comments Download
M chrome/browser/ui/app_list/app_list_service_mac.mm View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 2 chunks +4 lines, -2 lines 0 comments Download
M chrome/browser/ui/app_list/app_list_service_mac_browsertest.mm View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +2 lines, -1 line 0 comments Download
M chrome/browser/web_applications/web_app_mac.h View 1 2 3 4 5 6 7 8 1 chunk +3 lines, -0 lines 0 comments Download
M chrome/browser/web_applications/web_app_mac.mm View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 3 chunks +21 lines, -0 lines 0 comments Download
M chrome/chrome_common.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +1 line, -0 lines 0 comments Download
M chrome/common/mac/app_mode_common.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +4 lines, -0 lines 0 comments Download
M chrome/common/mac/app_mode_common.mm View 1 1 chunk +2 lines, -0 lines 0 comments Download

Messages

Total messages: 30 (0 generated)
tapted
some initial thoughts https://chromiumcodereview.appspot.com/14579006/diff/1/apps/app_shim/app_shim_util.h File apps/app_shim/app_shim_util.h (right): https://chromiumcodereview.appspot.com/14579006/diff/1/apps/app_shim/app_shim_util.h#newcode5 apps/app_shim/app_shim_util.h:5: #ifndef APPS_APP_SHIM_APP_SHIM_UTIL_H_ this should have a ...
7 years, 7 months ago (2013-05-16 04:51:00 UTC) #1
jackhou1
I've removed all the duplicate functionality that was in app_shim_util so now it just uses ...
7 years, 7 months ago (2013-05-17 05:45:36 UTC) #2
jackhou1
Questions for benwells. https://codereview.chromium.org/14579006/diff/8001/chrome/browser/extensions/platform_app_launcher.cc File chrome/browser/extensions/platform_app_launcher.cc (right): https://codereview.chromium.org/14579006/diff/8001/chrome/browser/extensions/platform_app_launcher.cc#newcode102 chrome/browser/extensions/platform_app_launcher.cc:102: web_app::LaunchShim(profile, extension, base::Bind(&DoNothing)); Should we just ...
7 years, 7 months ago (2013-05-17 05:49:33 UTC) #3
benwells
https://codereview.chromium.org/14579006/diff/8001/chrome/browser/extensions/platform_app_launcher.cc File chrome/browser/extensions/platform_app_launcher.cc (right): https://codereview.chromium.org/14579006/diff/8001/chrome/browser/extensions/platform_app_launcher.cc#newcode102 chrome/browser/extensions/platform_app_launcher.cc:102: web_app::LaunchShim(profile, extension, base::Bind(&DoNothing)); On 2013/05/17 05:49:33, jackhou1 wrote: > ...
7 years, 7 months ago (2013-05-17 05:59:41 UTC) #4
tapted
https://codereview.chromium.org/14579006/diff/8001/chrome/browser/extensions/platform_app_launcher.cc File chrome/browser/extensions/platform_app_launcher.cc (right): https://codereview.chromium.org/14579006/diff/8001/chrome/browser/extensions/platform_app_launcher.cc#newcode102 chrome/browser/extensions/platform_app_launcher.cc:102: web_app::LaunchShim(profile, extension, base::Bind(&DoNothing)); On 2013/05/17 05:59:41, benwells wrote: > ...
7 years, 7 months ago (2013-05-17 06:44:00 UTC) #5
jackhou1
https://codereview.chromium.org/14579006/diff/8001/chrome/browser/web_applications/web_app.h File chrome/browser/web_applications/web_app.h (right): https://codereview.chromium.org/14579006/diff/8001/chrome/browser/web_applications/web_app.h#newcode102 chrome/browser/web_applications/web_app.h:102: void LaunchShim(Profile* profile, I just if-defined this into a ...
7 years, 7 months ago (2013-05-21 03:13:22 UTC) #6
benwells
Arg sorry I wrote this on Monday morning but didn't publish it :-/ https://codereview.chromium.org/14579006/diff/8001/chrome/browser/extensions/platform_app_launcher.cc File ...
7 years, 7 months ago (2013-05-21 03:14:47 UTC) #7
tapted
https://codereview.chromium.org/14579006/diff/19001/chrome/app/chrome_main_app_mode_mac.mm File chrome/app/chrome_main_app_mode_mac.mm (right): https://codereview.chromium.org/14579006/diff/19001/chrome/app/chrome_main_app_mode_mac.mm#newcode91 chrome/app/chrome_main_app_mode_mac.mm:91: return; Since we're going down this path, it still ...
7 years, 7 months ago (2013-05-21 08:33:25 UTC) #8
jackhou1
PTAL The LaunchApp IPC message now includes whether to launch the app. Also, the shim ...
7 years, 7 months ago (2013-05-28 06:50:33 UTC) #9
tapted
Also, make sure you update the CL description, BUG=, TEST= https://codereview.chromium.org/14579006/diff/40001/apps/app_shim/app_shim_messages.h File apps/app_shim/app_shim_messages.h (right): https://codereview.chromium.org/14579006/diff/40001/apps/app_shim/app_shim_messages.h#newcode18 ...
7 years, 6 months ago (2013-05-29 04:20:30 UTC) #10
jackhou1
https://codereview.chromium.org/14579006/diff/40001/apps/app_shim/app_shim_messages.h File apps/app_shim/app_shim_messages.h (right): https://codereview.chromium.org/14579006/diff/40001/apps/app_shim/app_shim_messages.h#newcode18 apps/app_shim/app_shim_messages.h:18: // Signals to the main Chrome process that a ...
7 years, 6 months ago (2013-05-29 05:53:04 UTC) #11
tapted
https://codereview.chromium.org/14579006/diff/40001/chrome/browser/web_applications/web_app.h File chrome/browser/web_applications/web_app.h (right): https://codereview.chromium.org/14579006/diff/40001/chrome/browser/web_applications/web_app.h#newcode102 chrome/browser/web_applications/web_app.h:102: void MaybeLaunchShortcut(Profile* profile, On 2013/05/29 05:53:04, jackhou1 wrote: > ...
7 years, 6 months ago (2013-05-29 06:16:01 UTC) #12
jackhou1
Updated description. https://codereview.chromium.org/14579006/diff/53001/chrome/browser/web_applications/web_app_mac.mm File chrome/browser/web_applications/web_app_mac.mm (right): https://codereview.chromium.org/14579006/diff/53001/chrome/browser/web_applications/web_app_mac.mm#newcode21 chrome/browser/web_applications/web_app_mac.mm:21: #include "chrome/common/chrome_switches.h" On 2013/05/29 06:16:01, tapted wrote: ...
7 years, 6 months ago (2013-05-29 07:36:06 UTC) #13
tapted
lgtm with a nit We will need an IPC security review here too. And some ...
7 years, 6 months ago (2013-05-29 07:48:15 UTC) #14
jackhou1
https://codereview.chromium.org/14579006/diff/58001/chrome/common/mac/app_mode_common.h File chrome/common/mac/app_mode_common.h (right): https://codereview.chromium.org/14579006/diff/58001/chrome/common/mac/app_mode_common.h#newcode32 chrome/common/mac/app_mode_common.h:32: // Instructs the app shim not to send a ...
7 years, 6 months ago (2013-05-29 07:58:14 UTC) #15
benwells
apps\DEPS lgtm
7 years, 6 months ago (2013-05-29 08:00:57 UTC) #16
jackhou1
Adding extra reviewers: benwells, for OWNERS in apps/, chrome/browser/web_applications thakis, for OWNERS in chrome/app/, chrome/common/mac ...
7 years, 6 months ago (2013-05-29 08:03:30 UTC) #17
benwells
chrome/browser/web_applications lgtm.
7 years, 6 months ago (2013-05-29 08:13:17 UTC) #18
palmer
https://codereview.chromium.org/14579006/diff/69001/apps/app_shim/app_shim_host_mac.cc File apps/app_shim/app_shim_host_mac.cc (right): https://codereview.chromium.org/14579006/diff/69001/apps/app_shim/app_shim_host_mac.cc#newcode76 apps/app_shim/app_shim_host_mac.cc:76: if (!(profile_ = FetchProfileForDirectory(profile_dir))) { Can |profile_dir| just be ...
7 years, 6 months ago (2013-05-29 21:20:43 UTC) #19
jackhou1
https://codereview.chromium.org/14579006/diff/69001/apps/app_shim/app_shim_host_mac.cc File apps/app_shim/app_shim_host_mac.cc (right): https://codereview.chromium.org/14579006/diff/69001/apps/app_shim/app_shim_host_mac.cc#newcode76 apps/app_shim/app_shim_host_mac.cc:76: if (!(profile_ = FetchProfileForDirectory(profile_dir))) { On 2013/05/29 21:20:43, Chromium ...
7 years, 6 months ago (2013-05-30 00:06:28 UTC) #20
Nico
Looks mostly good. https://codereview.chromium.org/14579006/diff/75001/chrome/app/chrome_main_app_mode_mac.mm File chrome/app/chrome_main_app_mode_mac.mm (right): https://codereview.chromium.org/14579006/diff/75001/chrome/app/chrome_main_app_mode_mac.mm#newcode79 chrome/app/chrome_main_app_mode_mac.mm:79: LOG(ERROR) << "Cannot get user data ...
7 years, 6 months ago (2013-05-30 00:14:44 UTC) #21
jackhou1
Added a file for the enum because it's used in both the IPC interface and ...
7 years, 6 months ago (2013-05-30 01:43:30 UTC) #22
tapted
Some thoughts: I'm not sure there's precedent for sending enums over IPC - an int ...
7 years, 6 months ago (2013-05-30 03:25:06 UTC) #23
jackhou1
There was one case that used SimilarTypeTraits, but after looking around a bit, it seems ...
7 years, 6 months ago (2013-05-30 05:10:05 UTC) #24
tapted
lgtm
7 years, 6 months ago (2013-05-30 05:41:34 UTC) #25
palmer
LGTM https://codereview.chromium.org/14579006/diff/105004/apps/app_shim/app_shim_launch.h File apps/app_shim/app_shim_launch.h (right): https://codereview.chromium.org/14579006/diff/105004/apps/app_shim/app_shim_launch.h#newcode8 apps/app_shim/app_shim_launch.h:8: #include "ipc/ipc_param_traits.h" I don't know, but is actually ...
7 years, 6 months ago (2013-05-30 20:51:44 UTC) #26
jackhou1
https://codereview.chromium.org/14579006/diff/105004/apps/app_shim/app_shim_launch.h File apps/app_shim/app_shim_launch.h (right): https://codereview.chromium.org/14579006/diff/105004/apps/app_shim/app_shim_launch.h#newcode8 apps/app_shim/app_shim_launch.h:8: #include "ipc/ipc_param_traits.h" On 2013/05/30 20:51:44, Chromium Palmer wrote: > ...
7 years, 6 months ago (2013-05-30 22:58:56 UTC) #27
Nico
chrome/ lgtm
7 years, 6 months ago (2013-05-30 23:02:06 UTC) #28
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/jackhou@chromium.org/14579006/51003
7 years, 6 months ago (2013-05-30 23:24:35 UTC) #29
commit-bot: I haz the power
7 years, 6 months ago (2013-05-31 02:09:41 UTC) #30
Message was sent while issue was closed.
Change committed as 203309

Powered by Google App Engine
This is Rietveld 408576698