Closed Bug 768701 Opened 12 years ago Closed 12 years ago

take screenshot in chrome but don't save it from chrome

Categories

(Firefox OS Graveyard :: General, defect)

x86
All
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
DeveloperPhone

People

(Reporter: djf, Assigned: djf)

References

Details

Attachments

(1 file)

The current screenshot code in b2g/chrome/content/shell.js does not work because after generating the screenshot it attempts to save it to device storage, which fails when called from chrome.

There is an open bug to make device storage work in chrome, but as Fabrice said... "it is a web API and you're trying to use it in chrome".  So instead of waiting for a fix, I've instead modified the screenshot code so that it generates the screenshot in chrome and sends the image as a blob back to the gaia system app which can save it itself.

In a lot of ways this is a nicer solution anyway.  Patch is attached, and has been tested on Otoroa.  I'll do a match pull request for the Gaia end of things.

Vivien, I'm asking you to review this.  Fabrice, I've cc'ed you because the device storage from chrome bug is assigned to you, and if this patch lands, there's not much urgency for that one, at least not from me.

Note that this patch does not work without https://bugzilla.mozilla.org/show_bug.cgi?id=768696
Attachment #636922 - Flags: review?(21)
Here is the matching Gaia pull request: https://github.com/mozilla-b2g/gaia/pull/1959
Comment on attachment 636922 [details] [diff] [review]
enable screenshots

Review of attachment 636922 [details] [diff] [review]:
-----------------------------------------------------------------

The less code the better!
Attachment #636922 - Flags: review?(21) → review+
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/50cb8318cf50
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: