| Summary: | Add a class that tracks whether we're a background or foreground application | ||||||
|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Anders Carlsson <andersca> | ||||
| Component: | New Bugs | Assignee: | Anders Carlsson <andersca> | ||||
| Status: | RESOLVED FIXED | ||||||
| Severity: | Normal | CC: | barraclough, commit-queue, sam | ||||
| Priority: | P2 | ||||||
| Version: | 528+ (Nightly build) | ||||||
| Hardware: | Unspecified | ||||||
| OS: | Unspecified | ||||||
| Attachments: |
|
||||||
|
Description
Anders Carlsson
2015-06-23 16:35:35 PDT
Created attachment 255448 [details]
Patch
Attachment 255448 [details] did not pass style-queue:
ERROR: Source/WebKit2/UIProcess/ApplicationStateTracker.mm:51: Place brace on its own line for function definitions. [whitespace/braces] [4]
ERROR: Source/WebKit2/UIProcess/ApplicationStateTracker.mm:55: Place brace on its own line for function definitions. [whitespace/braces] [4]
Total errors found: 2 in 6 files
If any of these errors are false positives, please file a bug against check-webkit-style.
Comment on attachment 255448 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=255448&action=review > Source/WebKit2/UIProcess/ApplicationStateTracker.h:45 > + void addListener(id, SEL willEnterForegroundSelector, SEL didEnterBackgroundSelector); Why not blocks instead of id/SEL? > Source/WebKit2/UIProcess/ios/WKContentView.mm:213 > + ApplicationStateTracker::singleton().addListener(self, @selector(_applicationDidEnterBackground), @selector(_applicationWillEnterForeground)); Need WebCore:: here or in a using above. (In reply to comment #3) > Comment on attachment 255448 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=255448&action=review > > > Source/WebKit2/UIProcess/ApplicationStateTracker.h:45 > > + void addListener(id, SEL willEnterForegroundSelector, SEL didEnterBackgroundSelector); > > Why not blocks instead of id/SEL? Because I didn't want to have to think about retain cycles and figure out a way to remove the observers. (That's done automatically). > > > Source/WebKit2/UIProcess/ios/WKContentView.mm:213 > > + ApplicationStateTracker::singleton().addListener(self, @selector(_applicationDidEnterBackground), @selector(_applicationWillEnterForeground)); > > Need WebCore:: here or in a using above. Yes (Well, WebKit::). Committed r185894: <http://trac.webkit.org/changeset/185894> |