Prepare chrome/browser/renderer_host/pepper/pepper_flash_browser_host.cc for 10.8 deployment target. |
||||
Issue descriptionUpdateSystemActivity has been deprecated since 10.8. It looks like it's used to disable sleep, and that IOKit should be able to do similar. http://stackoverflow.com/a/27426333
,
Oct 3 2016
,
Oct 3 2016
I looked into the documentation. UpdateSystemActivity() prevented sleep if it was called every 30 seconds. It looks like the IOKit function IOPMAssertionDeclareUserActivity (https://developer.apple.com/reference/iokit/1557127-iopmassertiondeclareuseractivity) is the most suitable replacement. I think pmset -g assertions should show an assertion named com.apple.system.powermanagement.disableappsleep.PID if this succeeds.
,
Oct 4 2016
It looks like the assertion is set with the new API: pid 16125(Google Chrome): [0x000fac650009269f] 00:00:02 UserIsActive named: "PepperFlashBrowserHost preventing screensaver."
,
Oct 4 2016
Presumably we're disabling sleep for non-Pepper video, so we just need to unify the two calls.
,
Oct 4 2016
device/power_save_blocker/power_save_blocker_mac.cc
,
Oct 4 2016
Good point, would that be this code that uses the PowerSaveBlocker which seems to have abstracted out the implementation details across platforms? https://cs.chromium.org/chromium/src/content/browser/media/media_web_contents_observer.cc?q=PowerSaveBlocker::kPowerSaveBlockPreventDisplaySleep&sq=package:chromium&dr=C&l=190
,
Oct 4 2016
Yup, exactly. The interface from Flash is ill-defined because it just says "call this function 'pretty often' and things should be okay". I'll create something that creates one of those objects and keeps it alive for another 30 (or maybe 60) seconds every time it's called.
,
Oct 4 2016
Thanks. I did notice that the flash interface was odd, and I'll leave this to you now.
,
Oct 14 2016
(looks like this might be the last remaining blocker for bumping up the deployment target)
,
Oct 14 2016
yeah, I've been pinging ccameron and bbudge to try to get it moving.
,
Oct 18 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/04c2bac53d96749f85f9046d9923810df58d41c1 commit 04c2bac53d96749f85f9046d9923810df58d41c1 Author: ccameron <ccameron@chromium.org> Date: Tue Oct 18 01:06:27 2016 Flash: Use better APIs for preventing sleep The API that this was using on Mac has been deprecated, and is preventing us from upgrading our SDK version. We have a cross-platform sleep-preventation API. Use that instead. The Flash API for preventing power is a bit idiosyncratic in that it doesn't create and destroy power blockers, but rather says "please don't go to sleep for a while", where "a while" is not defined. Empirically, twitch.tv called this method every 10 seconds. Use a timeout of 45 seconds to be safe. BUG= 650797 Review-Url: https://codereview.chromium.org/2388313004 Cr-Commit-Position: refs/heads/master@{#425843} [modify] https://crrev.com/04c2bac53d96749f85f9046d9923810df58d41c1/chrome/browser/BUILD.gn [modify] https://crrev.com/04c2bac53d96749f85f9046d9923810df58d41c1/chrome/browser/DEPS [modify] https://crrev.com/04c2bac53d96749f85f9046d9923810df58d41c1/chrome/browser/renderer_host/pepper/pepper_flash_browser_host.cc [modify] https://crrev.com/04c2bac53d96749f85f9046d9923810df58d41c1/chrome/browser/renderer_host/pepper/pepper_flash_browser_host.h
,
Oct 19 2016
|
||||
►
Sign in to add a comment |
||||
Comment 1 by erikc...@chromium.org
, Sep 27 2016