Closed Bug 885319 Opened 6 years ago Closed 6 years ago

Implement the immersive process check in DownloadIntegration

Categories

(Toolkit :: Downloads API, defect)

All
Windows 8.1
defect
Not set

Tracking

()

RESOLVED FIXED
mozilla27
Tracking Status
firefox26 + fixed
firefox27 + fixed

People

(Reporter: Paolo, Assigned: raymondlee)

References

(Blocks 1 open bug)

Details

Attachments

(1 file, 1 obsolete file)

The DownloadIntegration._isImmersiveProcess method should be implemented, to
allow using the getTemporaryDownloadsDirectory function on Windows.

This is a Windows system call that can be implemented using js-ctypes.
(In reply to Paolo Amadini [:paolo] from comment #0)
> The DownloadIntegration._isImmersiveProcess method should be implemented, to
> allow using the getTemporaryDownloadsDirectory function on Windows.
> 
> This is a Windows system call that can be implemented using js-ctypes.

You can use metro utils for this if you like - 

http://mxr.mozilla.org/mozilla-central/source/widget/nsIWinMetroUtils.idl

if that exists, can be created, and immersive returns true, you're running in metro land.
(In reply to Jim Mathies [:jimm] from comment #1)
> You can use metro utils for this if you like - 

Ah, thanks a lot! I didn't find this in my search before.

So this task turns from easy to trivial (as long as development is done on a
Windows 8 machine).
Given that we'd like the Downloads.jsm directories API to work in Firefox 26, even if initially unused, we should remove the _isImmersiveProcess stub and replace it with a simple check for:

  Services.metro && Services.metro.immersive
Assignee: nobody → raymond
Blocks: 926736
Summary: Implement DownloadIntegration._isImmersiveProcess → Implement the immersive process check in DownloadIntegration
Blocks: 929391
Comment on attachment 820897 [details] [diff] [review]
v1

Can you remove _isImmersiveProcess? I don't think we need a helper for that anymore.
Attachment #820897 - Flags: review?(paolo.mozmail)
Attachment #820897 - Attachment is obsolete: true
Attachment #821439 - Flags: review?(paolo.mozmail)
Attachment #821439 - Flags: review?(paolo.mozmail) → review+
Comment on attachment 821439 [details] [diff] [review]
bug-885319-v2.diff

[Approval Request Comment]
Bug caused by (feature/regressing bug #): 825588
User impact if declined: None (related to bug 926736)
Testing completed (on m-c, etc.): None (possible add-on only code path)
Risk to taking this patch (and alternatives if risky): Low
String or IDL/UUID changes made by this patch: None
Attachment #821439 - Flags: approval-mozilla-aurora?
Attachment #821439 - Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/02b75478ab47
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla27
OS: Windows 8 Metro → Windows 8.1
You need to log in before you can comment on or make changes to this bug.