Closed Bug 745924 Opened 12 years ago Closed 12 years ago

Allow launching installed native apps from WebappsInstaller

Categories

(Firefox Graveyard :: Web Apps, enhancement, P1)

enhancement

Tracking

(blocking-kilimanjaro:+)

RESOLVED DUPLICATE of bug 772600
blocking-kilimanjaro +

People

(Reporter: Mardak, Unassigned)

References

(Blocks 1 open bug)

Details

Bug 740922 removes the pinned tab behavior of launching apps, but the desired behavior is to launch the native app. After the native installers for windows bug 731541 and os x bug 739636, WebappsInstaller could expose a way to launch a manifest if it's natively installed.

Felipe has pointed out that there might be multiple installs of the same app (perhaps across users?) so each Firefox profile needs to keep track of which app (and associated receipts) to launch.

Dan has pointed out that OS X allows the user to move the apps anywhere so launching by bundle id is the correct approach, but I'm not sure how that ties in with Felipe's concern of multiple installations.
One way to launch from OS X is with Apple Script using Finder. But this doesn't deal with deleted app files or duplicate native app installs.

let process = Cc["@mozilla.org/process/util;1"].createInstance(Ci.nsIProcess);
let file = Cc["@mozilla.org/file/local;1"].createInstance(Ci.nsILocalFile); file.initWithPath("/usr/bin/osascript");
process.init(file);
process.runAsync(['-e', 'tell application "Finder" to open application file id "http://marblerun.at"'], 2);

Where http://marblerun.at is the CFBundleIdentifier from <string>' + escapeXML(this.launchURI.prePath) + '</string>
Flagging as enhancement - This does sound important, although not required for FF 14.
Severity: normal → enhancement
So by putting together the two requirements I think the correct thing to do is to, upon install, store the platform-specific "path" into the webapps.json file (through DOMApplicationRegistry).
On OSX for example, the "path" would be the bundle id that is to be used to launch the app.
Right now that means we don't support having more than 1 app with the same name, but the could will already be correct whenever the generated bundle ids support this
Whiteboard: [marketplace-beta-]
felipe, in OSX, app names are purely user-facing.  App identification is done the with BundleID.  So you could actually have many apps with the same name.  If they also have the same BundleID, then which one is launched is up to the OS.
Nominating for k9o, as this is likely going to be needed for new tab and awesome bar integration for firefox integration with web apps. This feature would allow launching a native application within firefox in other words.
blocking-kilimanjaro: --- → ?
Blocks: 748959
Blocks: 748962
blocking-kilimanjaro: ? → +
Whiteboard: [marketplace-beta-]
Target Milestone: --- → Future
Blocks: 748977
No longer blocks: 748962
Priority: -- → P1
Blocks: 748962
Blocks: k9o-webrt
Target Milestone: Future → ---
Depends on: 763740
Making this the meta bug - we'll build separate bugs for each implementation of this - OS X already exists as bug 763740.
Keywords: meta
Depends on: 763786
Depends on: 763789
Marking for security review, per discussions with rs and myk, and per [1].

Security team: This meta bug and its implementation bugs involve Firefox launching processes on the user's machine.  It seems wise to review whether we're doing this securely.

[1] https://wiki.mozilla.org/Security/Reviews/Review_Request_Form#Security_Assurance_Security_Review_Request
Blocks: 710062
QA Contact: jsmith
Whiteboard: [sec-assigned:curtisk]
Depends on: 772600
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → DUPLICATE
No longer depends on: 773040
Moving the sec flags to bug 772600 (the dup of this bug).
Whiteboard: [sec-assigned:curtisk]
No longer depends on: 772600
Product: Firefox → Firefox Graveyard
You need to log in before you can comment on or make changes to this bug.