Changeset 254101 in webkit
- Timestamp:
- Jan 6, 2020 5:06:34 PM (4 years ago)
- Location:
- trunk/Source/WebKit
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit/ChangeLog
r254098 r254101 1 2020-01-06 Per Arne Vollan <pvollan@apple.com> 2 3 [iOS] Get display level in the UI process for all iOS platforms 4 https://bugs.webkit.org/show_bug.cgi?id=205835 5 <rdar://problem/58116883> 6 7 Reviewed by Brent Fulgham. 8 9 This was previously only done for iOS, but should be done for all iOS platforms. 10 11 * UIProcess/Cocoa/WebProcessPoolCocoa.mm: 12 (WebKit::WebProcessPool::registerNotificationObservers): 13 * UIProcess/WebProcessPool.cpp: 14 (WebKit::WebProcessPool::initializeNewWebProcess): 15 * UIProcess/WebProcessPool.h: 16 * WebProcess/WebProcess.h: 17 * WebProcess/WebProcess.messages.in: 18 * WebProcess/cocoa/WebProcessCocoa.mm: 19 1 20 2020-01-06 Eric Carlson <eric.carlson@apple.com> 2 21 -
trunk/Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm
r254081 r254101 103 103 #endif 104 104 105 #if PLATFORM(IOS )105 #if PLATFORM(IOS_FAMILY) 106 106 SOFT_LINK_PRIVATE_FRAMEWORK(BackBoardServices) 107 107 SOFT_LINK(BackBoardServices, BKSDisplayBrightnessGetCurrent, float, (), ()); … … 483 483 } 484 484 485 #if PLATFORM(IOS )485 #if PLATFORM(IOS_FAMILY) 486 486 float WebProcessPool::displayBrightness() 487 487 { … … 542 542 setApplicationIsActive(false); 543 543 }]; 544 #el if PLATFORM(IOS)544 #else 545 545 CFNotificationCenterAddObserver(CFNotificationCenterGetDarwinNotifyCenter(), this, backlightLevelDidChangeCallback, static_cast<CFStringRef>(UIBacklightLevelChangedNotification), nullptr, CFNotificationSuspensionBehaviorCoalesce); 546 #if PLATFORM(IOS) 546 547 m_accessibilityEnabledObserver = [[NSNotificationCenter defaultCenter] addObserverForName:(__bridge id)kAXSApplicationAccessibilityEnabledNotification object:nil queue:[NSOperationQueue currentQueue] usingBlock:^(NSNotification *) { 547 548 for (size_t i = 0; i < m_processes.size(); ++i) 548 549 m_processes[i]->unblockAccessibilityServerIfNeeded(); 549 550 }]; 551 #endif // PLATFORM(IOS) 550 552 #endif // !PLATFORM(IOS_FAMILY) 551 553 } -
trunk/Source/WebKit/UIProcess/WebProcessPool.cpp
r254006 r254101 1063 1063 } 1064 1064 1065 #if PLATFORM(IOS )1065 #if PLATFORM(IOS_FAMILY) 1066 1066 process.send(Messages::WebProcess::BacklightLevelDidChange(displayBrightness()), 0); 1067 1067 #endif -
trunk/Source/WebKit/UIProcess/WebProcessPool.h
r254006 r254101 606 606 void updateBackForwardCacheCapacity(); 607 607 608 #if PLATFORM(IOS )608 #if PLATFORM(IOS_FAMILY) 609 609 static float displayBrightness(); 610 610 static void backlightLevelDidChangeCallback(CFNotificationCenterRef, void *observer, CFStringRef name, const void *, CFDictionaryRef userInfo); -
trunk/Source/WebKit/WebProcess/WebProcess.h
r253990 r254101 289 289 #endif 290 290 291 #if PLATFORM(IOS )291 #if PLATFORM(IOS_FAMILY) 292 292 float backlightLevel() const { return m_backlightLevel; } 293 293 #endif … … 462 462 #endif 463 463 464 #if PLATFORM(IOS )464 #if PLATFORM(IOS_FAMILY) 465 465 void backlightLevelDidChange(float backlightLevel); 466 #endif 467 468 #if PLATFORM(IOS_FAMILY) 466 469 467 bool shouldFreezeOnSuspension() const; 470 468 void updateFreezerStatus(); … … 594 592 #endif 595 593 596 #if PLATFORM(IOS )594 #if PLATFORM(IOS_FAMILY) 597 595 float m_backlightLevel { 0 }; 598 596 #endif -
trunk/Source/WebKit/WebProcess/WebProcess.messages.in
r252655 r254101 126 126 #endif 127 127 128 #if PLATFORM(IOS )128 #if PLATFORM(IOS_FAMILY) 129 129 BacklightLevelDidChange(float backlightLevel) 130 130 #endif -
trunk/Source/WebKit/WebProcess/cocoa/WebProcessCocoa.mm
r254087 r254101 81 81 82 82 #if PLATFORM(IOS) 83 #import <WebCore/ParentalControlsContentFilter.h> 84 #endif 85 86 #if PLATFORM(IOS_FAMILY) 83 87 #import "UIKitSPI.h" 84 #import <WebCore/ParentalControlsContentFilter.h> 85 #endif 86 87 #if PLATFORM(IOS_FAMILY) 88 #include <bmalloc/MemoryStatusSPI.h> 88 #import <bmalloc/MemoryStatusSPI.h> 89 89 #endif 90 90 … … 816 816 #endif 817 817 818 #if PLATFORM(IOS )818 #if PLATFORM(IOS_FAMILY) 819 819 static float currentBacklightLevel() 820 820 {
Note: See TracChangeset
for help on using the changeset viewer.