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

Issue 12623005: [mac] App shims (Closed)

Created:
7 years, 9 months ago by jeremya
Modified:
7 years, 9 months ago
CC:
chromium-reviews, darin-cc_chromium.org, jam, sail+watch_chromium.org, chrome-apps-syd-reviews_chromium.org
Visibility:
Public.

Description

[mac] App shims The AppShimHostController uses an IPC::ChannelFactory to listen on a socket for app shims connecting. App shims send a launch message when they start, so we translate that into actually launching the app. I changed chrome_main_app_mode_mac.mm to use the IPC channel instead of sending an Apple Event as before, and added an event loop and an IO thread. BUG=138733 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=188675

Patch Set 1 #

Total comments: 40

Patch Set 2 : comments #

Total comments: 45

Patch Set 3 : jeremy@'s comments #

Total comments: 27

Patch Set 4 : nits #

Patch Set 5 : use ProfileInfoCache to verify profile path #

Total comments: 5

Patch Set 6 : comments #

Patch Set 7 : Add a test; split out and refactor AppShimHost to be more testable. #

Patch Set 8 : Move app_shim code to apps/ #

Total comments: 45

Patch Set 9 : comments #

Patch Set 10 : koz_comments #

Patch Set 11 : -> _mac #

Unified diffs Side-by-side diffs Delta from patch set Stats (+772 lines, -71 lines) Patch
M apps/DEPS View 1 2 3 4 5 6 7 1 chunk +4 lines, -0 lines 0 comments Download
A apps/app_shim/OWNERS View 1 2 3 4 5 6 7 1 chunk +1 line, -0 lines 0 comments Download
A apps/app_shim/app_shim_host_mac.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +81 lines, -0 lines 0 comments Download
A apps/app_shim/app_shim_host_mac.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +153 lines, -0 lines 0 comments Download
A apps/app_shim/app_shim_host_mac_unittest.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +124 lines, -0 lines 0 comments Download
A apps/app_shim/app_shim_host_manager_mac.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +40 lines, -0 lines 0 comments Download
A apps/app_shim/app_shim_host_manager_mac.mm View 1 2 3 4 5 6 7 8 9 10 1 chunk +71 lines, -0 lines 0 comments Download
A apps/app_shim/app_shim_messages.h View 1 2 3 4 5 6 7 1 chunk +22 lines, -0 lines 0 comments Download
M apps/apps.gypi View 1 2 3 4 5 6 7 8 9 10 1 chunk +4 lines, -0 lines 0 comments Download
M chrome/app/DEPS View 1 2 3 4 5 6 7 1 chunk +1 line, -0 lines 0 comments Download
M chrome/app/chrome_main_app_mode_mac.mm View 1 2 3 4 5 6 7 4 chunks +234 lines, -27 lines 0 comments Download
M chrome/browser/app_controller_mac.mm View 1 3 chunks +0 lines, -39 lines 0 comments Download
M chrome/browser/browser_process_impl.h View 1 2 3 4 5 6 7 8 9 2 chunks +9 lines, -0 lines 0 comments Download
M chrome/browser/browser_process_impl.cc View 1 2 3 4 5 6 7 8 9 10 3 chunks +12 lines, -0 lines 0 comments Download
M chrome/chrome_common.gypi View 1 2 3 4 5 6 7 1 chunk +1 line, -0 lines 0 comments Download
M chrome/chrome_tests_unit.gypi View 1 2 3 4 5 6 7 8 9 10 1 chunk +1 line, -0 lines 0 comments Download
M chrome/common/DEPS View 1 2 3 4 5 6 7 1 chunk +1 line, -0 lines 0 comments Download
M chrome/common/common_message_generator.h View 1 2 3 4 5 6 7 1 chunk +1 line, -0 lines 0 comments Download
M chrome/common/mac/app_mode_common.h View 1 chunk +9 lines, -5 lines 0 comments Download
M chrome/common/mac/app_mode_common.mm View 1 chunk +2 lines, -0 lines 0 comments Download
M ipc/ipc_message_start.h View 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 25 (0 generated)
jeremya
7 years, 9 months ago (2013-03-08 04:54:35 UTC) #1
Mark Mentovai
https://codereview.chromium.org/12623005/diff/1/chrome/app/chrome_main_app_mode_mac.mm File chrome/app/chrome_main_app_mode_mac.mm (right): https://codereview.chromium.org/12623005/diff/1/chrome/app/chrome_main_app_mode_mac.mm#newcode44 chrome/app/chrome_main_app_mode_mac.mm:44: }; DISALLOW_COPY_AND_ASSIGN? https://codereview.chromium.org/12623005/diff/1/chrome/app/chrome_main_app_mode_mac.mm#newcode46 chrome/app/chrome_main_app_mode_mac.mm:46: AppShimController::AppShimController() { There’s enough stuff ...
7 years, 9 months ago (2013-03-08 16:50:17 UTC) #2
jeremya
https://codereview.chromium.org/12623005/diff/1/chrome/app/chrome_main_app_mode_mac.mm File chrome/app/chrome_main_app_mode_mac.mm (right): https://codereview.chromium.org/12623005/diff/1/chrome/app/chrome_main_app_mode_mac.mm#newcode44 chrome/app/chrome_main_app_mode_mac.mm:44: }; On 2013/03/08 16:50:17, Mark Mentovai wrote: > DISALLOW_COPY_AND_ASSIGN? ...
7 years, 9 months ago (2013-03-11 02:47:33 UTC) #3
jeremy
https://codereview.chromium.org/12623005/diff/8001/chrome/app/chrome_main_app_mode_mac.mm File chrome/app/chrome_main_app_mode_mac.mm (right): https://codereview.chromium.org/12623005/diff/8001/chrome/app/chrome_main_app_mode_mac.mm#newcode30 chrome/app/chrome_main_app_mode_mac.mm:30: base::Thread* g_io_thread = NULL; Wrap these in an anon ...
7 years, 9 months ago (2013-03-11 06:49:59 UTC) #4
jeremya
Also I've removed the WeakPtr stuff I had in AppShimHostController for now, since I was ...
7 years, 9 months ago (2013-03-11 08:42:26 UTC) #5
jeremy
Is there a test that covers this somewhere? https://codereview.chromium.org/12623005/diff/16001/chrome/app/chrome_main_app_mode_mac.mm File chrome/app/chrome_main_app_mode_mac.mm (right): https://codereview.chromium.org/12623005/diff/16001/chrome/app/chrome_main_app_mode_mac.mm#newcode47 chrome/app/chrome_main_app_mode_mac.mm:47: virtual ...
7 years, 9 months ago (2013-03-11 09:32:04 UTC) #6
Mark Mentovai
https://codereview.chromium.org/12623005/diff/1/chrome/browser/web_applications/app_shim_host_controller.h File chrome/browser/web_applications/app_shim_host_controller.h (right): https://codereview.chromium.org/12623005/diff/1/chrome/browser/web_applications/app_shim_host_controller.h#newcode25 chrome/browser/web_applications/app_shim_host_controller.h:25: void InitOnFile(); jeremya wrote: > On 2013/03/08 16:50:17, Mark ...
7 years, 9 months ago (2013-03-11 12:40:37 UTC) #7
palmer
https://codereview.chromium.org/12623005/diff/16001/chrome/browser/web_applications/app_shim_host_controller.mm File chrome/browser/web_applications/app_shim_host_controller.mm (right): https://codereview.chromium.org/12623005/diff/16001/chrome/browser/web_applications/app_shim_host_controller.mm#newcode55 chrome/browser/web_applications/app_shim_host_controller.mm:55: bool LaunchAppImpl(const std::string& app_id, const std::string& profile_dir); The app_id ...
7 years, 9 months ago (2013-03-11 19:28:18 UTC) #8
jeremya
https://codereview.chromium.org/12623005/diff/16001/chrome/app/chrome_main_app_mode_mac.mm File chrome/app/chrome_main_app_mode_mac.mm (right): https://codereview.chromium.org/12623005/diff/16001/chrome/app/chrome_main_app_mode_mac.mm#newcode47 chrome/app/chrome_main_app_mode_mac.mm:47: virtual bool OnMessageReceived(const IPC::Message& message); On 2013/03/11 09:32:04, jeremy ...
7 years, 9 months ago (2013-03-12 03:45:35 UTC) #9
jeremya
+thakis for chrome/browser/app_controller_mac.mm and chrome/app/chrome_main_app_mode_mac.mm and general chrome/ OWNERS :)
7 years, 9 months ago (2013-03-12 04:39:27 UTC) #10
jeremya
Also: made a change to use ProfileInfoCache to verify the path name that comes off ...
7 years, 9 months ago (2013-03-12 04:40:16 UTC) #11
jeremy
LGTM with minor comments. https://codereview.chromium.org/12623005/diff/36001/chrome/app/chrome_main_app_mode_mac.mm File chrome/app/chrome_main_app_mode_mac.mm (right): https://codereview.chromium.org/12623005/diff/36001/chrome/app/chrome_main_app_mode_mac.mm#newcode48 chrome/app/chrome_main_app_mode_mac.mm:48: virtual void OnChannelError(); Also OVERRIDE ...
7 years, 9 months ago (2013-03-12 12:12:31 UTC) #12
Mark Mentovai
LGTM too. https://codereview.chromium.org/12623005/diff/36001/chrome/app/chrome_main_app_mode_mac.mm File chrome/app/chrome_main_app_mode_mac.mm (right): https://codereview.chromium.org/12623005/diff/36001/chrome/app/chrome_main_app_mode_mac.mm#newcode14 chrome/app/chrome_main_app_mode_mac.mm:14: #include "base/threading/thread.h" Sort.
7 years, 9 months ago (2013-03-12 20:30:40 UTC) #13
jeremya
Comments addressed; though I left the ReplyEventHandler comments generic rather than referring to the Chrome ...
7 years, 9 months ago (2013-03-12 23:51:44 UTC) #14
jeremya
Added a test and refactored. PTAL :)
7 years, 9 months ago (2013-03-14 07:40:06 UTC) #15
jeremya
+koz for apps/ review.
7 years, 9 months ago (2013-03-14 08:32:49 UTC) #16
Nico
lgtm!
7 years, 9 months ago (2013-03-14 15:18:58 UTC) #17
palmer
https://codereview.chromium.org/12623005/diff/59001/apps/app_shim/app_shim_host.cc File apps/app_shim/app_shim_host.cc (right): https://codereview.chromium.org/12623005/diff/59001/apps/app_shim/app_shim_host.cc#newcode56 apps/app_shim/app_shim_host.cc:56: Send(new AppShimMsg_LaunchApp_Done(success)); Please pardon my ignorance: How is this ...
7 years, 9 months ago (2013-03-14 19:05:04 UTC) #18
jeremya
https://codereview.chromium.org/12623005/diff/59001/apps/app_shim/app_shim_host.cc File apps/app_shim/app_shim_host.cc (right): https://codereview.chromium.org/12623005/diff/59001/apps/app_shim/app_shim_host.cc#newcode56 apps/app_shim/app_shim_host.cc:56: Send(new AppShimMsg_LaunchApp_Done(success)); On 2013/03/14 19:05:04, Chris P. wrote: > ...
7 years, 9 months ago (2013-03-14 23:33:00 UTC) #19
koz (OOO until 15th September)
https://codereview.chromium.org/12623005/diff/59001/apps/app_shim/app_shim_host.cc File apps/app_shim/app_shim_host.cc (right): https://codereview.chromium.org/12623005/diff/59001/apps/app_shim/app_shim_host.cc#newcode28 apps/app_shim/app_shim_host.cc:28: delete channel_; scoped_ptr<> to hold channel_? https://codereview.chromium.org/12623005/diff/59001/apps/app_shim/app_shim_host.cc#newcode33 apps/app_shim/app_shim_host.cc:33: channel_ ...
7 years, 9 months ago (2013-03-14 23:51:05 UTC) #20
palmer
LGTM
7 years, 9 months ago (2013-03-15 01:41:27 UTC) #21
jeremya
https://codereview.chromium.org/12623005/diff/59001/apps/app_shim/app_shim_host.cc File apps/app_shim/app_shim_host.cc (right): https://codereview.chromium.org/12623005/diff/59001/apps/app_shim/app_shim_host.cc#newcode28 apps/app_shim/app_shim_host.cc:28: delete channel_; On 2013/03/14 23:51:05, koz wrote: > scoped_ptr<> ...
7 years, 9 months ago (2013-03-15 02:24:14 UTC) #22
koz (OOO until 15th September)
lgtm
7 years, 9 months ago (2013-03-15 03:59:04 UTC) #23
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/jeremya@chromium.org/12623005/78001
7 years, 9 months ago (2013-03-18 02:19:35 UTC) #24
commit-bot: I haz the power
7 years, 9 months ago (2013-03-18 05:54:52 UTC) #25
Message was sent while issue was closed.
Change committed as 188675

Powered by Google App Engine
This is Rietveld 408576698