MacPWAs: Merge LoadAndLaunchApp calls
There are four places where we do basically the same thing, namely, find a profile (or profiles) to launch, and either launch or, if they are already open, focus them. They are - OnShimProcessConnected: When an app shim launches - OnShimOpenedFiles: When files are opened - OnShimSelectedProfile: When the profile menu selects a profile - OnShimReopen: Coming soon for the new x behavior Update OnShimOpenedFiles and OnShimSelectedProfile to use the new path. To enable this, break out a new sub-function LoadAndLaunchApp_TryExistingProfileStates from LoadAndLaunchApp. This function is used to short-circuit loading all profiles for an app, if the app is already open. Bug: 1080729 Change-Id: I314e4d0d80ae8e8b84f605fb16ff23c2680f8b4b Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2407976 Commit-Queue: ccameron <ccameron@chromium.org> Reviewed-by:Daniel Murphy <dmurph@chromium.org> Cr-Commit-Position: refs/heads/master@{#807113}
Showing
Please register or sign in to comment