Changeset 253357 in webkit
- Timestamp:
- Dec 10, 2019, 5:35:14 PM (7 years ago)
- Location:
- trunk/Source
- Files:
-
- 17 edited
-
WebCore/ChangeLog (modified) (1 diff)
-
WebCore/dom/Document.cpp (modified) (1 diff)
-
WebCore/platform/ios/DeviceMotionClientIOS.h (modified) (3 diffs)
-
WebCore/platform/ios/DeviceMotionClientIOS.mm (modified) (4 diffs)
-
WebCore/platform/ios/DeviceOrientationClientIOS.mm (modified) (3 diffs)
-
WebCore/platform/ios/DeviceOrientationUpdateProvider.h (modified) (1 diff)
-
WebCore/platform/ios/MotionManagerClient.h (modified) (1 diff)
-
WebCore/platform/ios/WebCoreMotionManager.h (modified) (2 diffs)
-
WebCore/platform/ios/WebCoreMotionManager.mm (modified) (4 diffs)
-
WebKit/ChangeLog (modified) (1 diff)
-
WebKit/Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb (modified) (1 diff)
-
WebKit/UIProcess/ios/WebDeviceOrientationUpdateProviderProxy.h (modified) (1 diff)
-
WebKit/UIProcess/ios/WebDeviceOrientationUpdateProviderProxy.messages.in (modified) (1 diff)
-
WebKit/UIProcess/ios/WebDeviceOrientationUpdateProviderProxy.mm (modified) (2 diffs)
-
WebKit/WebProcess/WebCoreSupport/WebDeviceOrientationUpdateProvider.cpp (modified) (1 diff)
-
WebKit/WebProcess/WebCoreSupport/WebDeviceOrientationUpdateProvider.h (modified) (3 diffs)
-
WebKit/WebProcess/WebCoreSupport/WebDeviceOrientationUpdateProvider.messages.in (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r253353 r253357 1 2019-12-10 Per Arne Vollan <pvollan@apple.com> 2 3 [iOS] Calls to the device motion API should be done in the UI process 4 https://bugs.webkit.org/show_bug.cgi?id=204770 5 6 Reviewed by Brent Fulgham. 7 8 The device motion API on iOS is communicating with iohideventsystem. Since mach lookup to this daemon 9 will be closed, the calls to this API should be moved from the WebContent process to the UI process. 10 This patch implements forwarding of the device orientation requests to the UI process through the 11 class, DeviceOrientationUpdateProvider, which is subclassed by WebDeviceOrientationUpdateProvider in 12 modern WebKit. This class implements forwarding of the requests to the UI process, and receives 13 device orientation updates from the UI process. An instance of this class will be shared by all 14 device orientation clients on a page, and passed as part of the page configuration parameters. On 15 the UI process side, the class WebDeviceOrientationUpdateProviderProxy attached to the Web page 16 proxy is taking care of calling the device orientation API through the existing WebCoreMotionManager 17 Objective-C class, and send device orientation updates back to the Web process. Also, use a weak 18 hash set of clients in WebDeviceOrientationUpdateProvider. 19 20 No new tests, covered by existing tests. 21 22 * dom/Document.cpp: 23 * platform/ios/DeviceMotionClientIOS.h: 24 * platform/ios/DeviceMotionClientIOS.mm: 25 (WebCore::DeviceMotionClientIOS::DeviceMotionClientIOS): 26 (WebCore::DeviceMotionClientIOS::startUpdating): 27 (WebCore::DeviceMotionClientIOS::stopUpdating): 28 (WebCore::DeviceMotionClientIOS::deviceMotionControllerDestroyed): 29 * platform/ios/DeviceOrientationClientIOS.mm: 30 (WebCore::DeviceOrientationClientIOS::startUpdating): 31 (WebCore::DeviceOrientationClientIOS::stopUpdating): 32 (WebCore::DeviceOrientationClientIOS::deviceOrientationControllerDestroyed): 33 * platform/ios/DeviceOrientationUpdateProvider.h: 34 * platform/ios/MotionManagerClient.h: 35 (WebCore::MotionManagerClient::orientationChanged): 36 (WebCore::MotionManagerClient::motionChanged): 37 * platform/ios/WebCoreMotionManager.h: 38 * platform/ios/WebCoreMotionManager.mm: 39 (-[WebCoreMotionManager addMotionClient:]): 40 (-[WebCoreMotionManager removeMotionClient:]): 41 (-[WebCoreMotionManager checkClientStatus]): 42 (-[WebCoreMotionManager sendAccelerometerData:]): 43 (-[WebCoreMotionManager sendMotionData:withHeading:]): 44 1 45 2019-12-10 Per Arne Vollan <pvollan@apple.com> 2 46 -
trunk/Source/WebCore/dom/Document.cpp
r253308 r253357 564 564 , m_loadEventDelayTimer(*this, &Document::loadEventDelayTimerFired) 565 565 #if PLATFORM(IOS_FAMILY) && ENABLE(DEVICE_ORIENTATION) 566 , m_deviceMotionClient(makeUnique<DeviceMotionClientIOS>( ))566 , m_deviceMotionClient(makeUnique<DeviceMotionClientIOS>(page() ? page()->deviceOrientationUpdateProvider() : nullptr)) 567 567 , m_deviceMotionController(makeUnique<DeviceMotionController>(*m_deviceMotionClient)) 568 568 , m_deviceOrientationClient(makeUnique<DeviceOrientationClientIOS>(page() ? page()->deviceOrientationUpdateProvider() : nullptr)) -
trunk/Source/WebCore/platform/ios/DeviceMotionClientIOS.h
r237266 r253357 31 31 #include "DeviceMotionController.h" 32 32 #include "DeviceMotionData.h" 33 #include "DeviceOrientationUpdateProvider.h" 34 #include "MotionManagerClient.h" 33 35 #include <wtf/RefPtr.h> 34 36 … … 37 39 namespace WebCore { 38 40 39 class DeviceMotionClientIOS : public DeviceMotionClient {41 class DeviceMotionClientIOS : public DeviceMotionClient, public MotionManagerClient { 40 42 public: 41 DeviceMotionClientIOS( );43 DeviceMotionClientIOS(RefPtr<DeviceOrientationUpdateProvider>&&); 42 44 ~DeviceMotionClientIOS() override; 43 45 void setController(DeviceMotionController*) override; … … 47 49 void deviceMotionControllerDestroyed() override; 48 50 49 void motionChanged(double, double, double, double, double, double, double, double, double) ;51 void motionChanged(double, double, double, double, double, double, double, double, double) override; 50 52 51 53 private: 52 WebCoreMotionManager* m_motionManager ;53 DeviceMotionController* m_controller ;54 WebCoreMotionManager* m_motionManager { nullptr }; 55 DeviceMotionController* m_controller { nullptr }; 54 56 RefPtr<DeviceMotionData> m_currentDeviceMotionData; 55 bool m_updating; 57 RefPtr<DeviceOrientationUpdateProvider> m_deviceOrientationUpdateProvider; 58 bool m_updating { false }; 56 59 }; 57 60 -
trunk/Source/WebCore/platform/ios/DeviceMotionClientIOS.mm
r237266 r253357 34 34 namespace WebCore { 35 35 36 DeviceMotionClientIOS::DeviceMotionClientIOS( )36 DeviceMotionClientIOS::DeviceMotionClientIOS(RefPtr<DeviceOrientationUpdateProvider>&& deviceOrientationUpdateProvider) 37 37 : DeviceMotionClient() 38 , m_motionManager(nullptr) 39 , m_updating(0) 38 , m_deviceOrientationUpdateProvider(WTFMove(deviceOrientationUpdateProvider)) 40 39 { 41 40 } … … 54 53 m_updating = true; 55 54 55 if (m_deviceOrientationUpdateProvider) { 56 m_deviceOrientationUpdateProvider->startUpdatingDeviceMotion(*this); 57 return; 58 } 59 56 60 if (!m_motionManager) 57 61 m_motionManager = [WebCoreMotionManager sharedManager]; … … 63 67 { 64 68 m_updating = false; 69 70 if (m_deviceOrientationUpdateProvider) { 71 m_deviceOrientationUpdateProvider->stopUpdatingDeviceMotion(*this); 72 return; 73 } 65 74 66 75 // Remove ourselves as the motion client so we won't get updates. … … 75 84 void DeviceMotionClientIOS::deviceMotionControllerDestroyed() 76 85 { 86 if (m_deviceOrientationUpdateProvider) { 87 m_deviceOrientationUpdateProvider->stopUpdatingDeviceMotion(*this); 88 return; 89 } 90 77 91 [m_motionManager removeMotionClient:this]; 78 92 } -
trunk/Source/WebCore/platform/ios/DeviceOrientationClientIOS.mm
r253231 r253357 54 54 55 55 if (m_deviceOrientationUpdateProvider) { 56 m_deviceOrientationUpdateProvider->startUpdating (*this);56 m_deviceOrientationUpdateProvider->startUpdatingDeviceOrientation(*this); 57 57 return; 58 58 } … … 69 69 70 70 if (m_deviceOrientationUpdateProvider) { 71 m_deviceOrientationUpdateProvider->stopUpdating (*this);71 m_deviceOrientationUpdateProvider->stopUpdatingDeviceOrientation(*this); 72 72 return; 73 73 } … … 85 85 { 86 86 if (m_deviceOrientationUpdateProvider) { 87 m_deviceOrientationUpdateProvider->stopUpdating (*this);87 m_deviceOrientationUpdateProvider->stopUpdatingDeviceOrientation(*this); 88 88 return; 89 89 } -
trunk/Source/WebCore/platform/ios/DeviceOrientationUpdateProvider.h
r253231 r253357 38 38 virtual ~DeviceOrientationUpdateProvider() { } 39 39 40 virtual void startUpdating(MotionManagerClient&) = 0; 41 virtual void stopUpdating(MotionManagerClient&) = 0; 40 virtual void startUpdatingDeviceOrientation(MotionManagerClient&) = 0; 41 virtual void stopUpdatingDeviceOrientation(MotionManagerClient&) = 0; 42 43 virtual void startUpdatingDeviceMotion(MotionManagerClient&) = 0; 44 virtual void stopUpdatingDeviceMotion(MotionManagerClient&) = 0; 42 45 43 46 virtual void deviceOrientationChanged(double, double, double, double, double) = 0; 47 virtual void deviceMotionChanged(double, double, double, double, double, double, double, double, double) = 0; 44 48 45 49 protected: -
trunk/Source/WebCore/platform/ios/MotionManagerClient.h
r253231 r253357 36 36 virtual ~MotionManagerClient() { }; 37 37 38 virtual void orientationChanged(double, double, double, double, double) = 0; 38 virtual void orientationChanged(double, double, double, double, double) { } 39 virtual void motionChanged(double, double, double, double, double, double, double, double, double) { } 39 40 }; 40 41 -
trunk/Source/WebCore/platform/ios/WebCoreMotionManager.h
r253231 r253357 44 44 CMMotionManager* m_motionManager; 45 45 CLLocationManager* m_locationManager; 46 HashSet<WebCore::DeviceMotionClientIOS*> m_deviceMotionClients;46 WeakHashSet<WebCore::MotionManagerClient> m_deviceMotionClients; 47 47 WeakHashSet<WebCore::MotionManagerClient> m_deviceOrientationClients; 48 48 NSTimer* m_updateTimer; … … 53 53 54 54 + (WebCoreMotionManager *)sharedManager; 55 - (void)addMotionClient:(WebCore:: DeviceMotionClientIOS*)client;56 - (void)removeMotionClient:(WebCore:: DeviceMotionClientIOS*)client;55 - (void)addMotionClient:(WebCore::MotionManagerClient *)client; 56 - (void)removeMotionClient:(WebCore::MotionManagerClient *)client; 57 57 - (void)addOrientationClient:(WebCore::MotionManagerClient *)client; 58 58 - (void)removeOrientationClient:(WebCore::MotionManagerClient *)client; -
trunk/Source/WebCore/platform/ios/WebCoreMotionManager.mm
r253296 r253357 101 101 } 102 102 103 - (void)addMotionClient:(WebCore:: DeviceMotionClientIOS*)client104 { 105 m_deviceMotionClients.add( client);103 - (void)addMotionClient:(WebCore::MotionManagerClient *)client 104 { 105 m_deviceMotionClients.add(*client); 106 106 if (m_initialized) 107 107 [self checkClientStatus]; 108 108 } 109 109 110 - (void)removeMotionClient:(WebCore:: DeviceMotionClientIOS*)client111 { 112 m_deviceMotionClients.remove( client);110 - (void)removeMotionClient:(WebCore::MotionManagerClient *)client 111 { 112 m_deviceMotionClients.remove(*client); 113 113 if (m_initialized) 114 114 [self checkClientStatus]; … … 172 172 ASSERT(m_motionManager); 173 173 174 if (m_deviceMotionClients. size() || m_deviceOrientationClients.computeSize()) {174 if (m_deviceMotionClients.computeSize() || m_deviceOrientationClients.computeSize()) { 175 175 if (m_gyroAvailable) 176 176 [m_motionManager startDeviceMotionUpdates]; … … 226 226 CMAcceleration accel = newAcceleration.acceleration; 227 227 228 for (auto& client : copyToVector(m_deviceMotionClients)) 229 client->motionChanged(0, 0, 0, accel.x * kGravity, accel.y * kGravity, accel.z * kGravity, 0, 0, 0); 228 Vector<WeakPtr<WebCore::MotionManagerClient>> motionClients; 229 motionClients.reserveInitialCapacity(m_deviceMotionClients.computeSize()); 230 for (auto& client : m_deviceMotionClients) 231 motionClients.uncheckedAppend(makeWeakPtr(&client)); 232 233 for (auto& client : motionClients) { 234 if (client) 235 client->motionChanged(0, 0, 0, accel.x * kGravity, accel.y * kGravity, accel.z * kGravity, 0, 0, 0); 236 } 230 237 }); 231 238 } … … 244 251 CMRotationRate rotationRate = newMotion.rotationRate; 245 252 246 for (auto& client : copyToVector(m_deviceMotionClients)) 247 client->motionChanged(userAccel.x * kGravity, userAccel.y * kGravity, userAccel.z * kGravity, totalAccel.x * kGravity, totalAccel.y * kGravity, totalAccel.z * kGravity, rad2deg(rotationRate.x), rad2deg(rotationRate.y), rad2deg(rotationRate.z)); 253 Vector<WeakPtr<WebCore::MotionManagerClient>> motionClients; 254 motionClients.reserveInitialCapacity(m_deviceMotionClients.computeSize()); 255 for (auto& client : m_deviceMotionClients) 256 motionClients.uncheckedAppend(makeWeakPtr(&client)); 257 258 for (auto& client : motionClients) { 259 if (client) 260 client->motionChanged(userAccel.x * kGravity, userAccel.y * kGravity, userAccel.z * kGravity, totalAccel.x * kGravity, totalAccel.y * kGravity, totalAccel.z * kGravity, rad2deg(rotationRate.x), rad2deg(rotationRate.y), rad2deg(rotationRate.z)); 261 } 248 262 249 263 CMAttitude* attitude = newMotion.attitude; -
trunk/Source/WebKit/ChangeLog
r253354 r253357 1 2019-12-10 Per Arne Vollan <pvollan@apple.com> 2 3 [iOS] Calls to the device motion API should be done in the UI process 4 https://bugs.webkit.org/show_bug.cgi?id=204770 5 6 Reviewed by Brent Fulgham. 7 8 The class WebDeviceOrientationUpdateProviderProxy will handle messages to start and stop updating device motion 9 in the UI process. Also, add a message to update the device motion in the WebContent process. In the UI process, 10 the device motion API is called through the already existing WebCoreMotionManager class. 11 12 * Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb: 13 * UIProcess/ios/WebDeviceOrientationUpdateProviderProxy.h: 14 * UIProcess/ios/WebDeviceOrientationUpdateProviderProxy.messages.in: 15 * UIProcess/ios/WebDeviceOrientationUpdateProviderProxy.mm: 16 (WebKit::WebDeviceOrientationUpdateProviderProxy::startUpdatingDeviceMotion): 17 (WebKit::WebDeviceOrientationUpdateProviderProxy::stopUpdatingDeviceMotion): 18 (WebKit::WebDeviceOrientationUpdateProviderProxy::motionChanged): 19 * WebProcess/WebCoreSupport/WebDeviceOrientationUpdateProvider.cpp: 20 (WebKit::WebDeviceOrientationUpdateProvider::startUpdatingDeviceOrientation): 21 (WebKit::WebDeviceOrientationUpdateProvider::stopUpdatingDeviceOrientation): 22 (WebKit::WebDeviceOrientationUpdateProvider::startUpdatingDeviceMotion): 23 (WebKit::WebDeviceOrientationUpdateProvider::stopUpdatingDeviceMotion): 24 (WebKit::WebDeviceOrientationUpdateProvider::deviceOrientationChanged): 25 (WebKit::WebDeviceOrientationUpdateProvider::deviceMotionChanged): 26 (WebKit::WebDeviceOrientationUpdateProvider::startUpdating): Deleted. 27 (WebKit::WebDeviceOrientationUpdateProvider::stopUpdating): Deleted. 28 * WebProcess/WebCoreSupport/WebDeviceOrientationUpdateProvider.h: 29 * WebProcess/WebCoreSupport/WebDeviceOrientationUpdateProvider.messages.in: 30 1 31 2019-12-10 Chris Dumez <cdumez@apple.com> 2 32 -
trunk/Source/WebKit/Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb
r253351 r253357 113 113 114 114 (define-once (location-services) 115 (allow mach-lookup 115 (allow mach-lookup (with report) (with telemetry) 116 116 (global-name "com.apple.locationd.registration")) 117 117 (allow-carrier-bundle) ;; <rdar://problem/21192365> -
trunk/Source/WebKit/UIProcess/ios/WebDeviceOrientationUpdateProviderProxy.h
r253256 r253357 43 43 void startUpdatingDeviceOrientation(); 44 44 void stopUpdatingDeviceOrientation(); 45 45 46 void startUpdatingDeviceMotion(); 47 void stopUpdatingDeviceMotion(); 48 46 49 private: 47 50 // WebCore::WebCoreMotionManagerClient 48 51 void orientationChanged(double, double, double, double, double) final; 49 52 void motionChanged(double, double, double, double, double, double, double, double, double) final; 53 50 54 // IPC::MessageReceiver 51 55 void didReceiveMessage(IPC::Connection&, IPC::Decoder&) override; -
trunk/Source/WebKit/UIProcess/ios/WebDeviceOrientationUpdateProviderProxy.messages.in
r253231 r253357 25 25 StartUpdatingDeviceOrientation(); 26 26 StopUpdatingDeviceOrientation(); 27 StartUpdatingDeviceMotion(); 28 StopUpdatingDeviceMotion(); 27 29 } 28 30 #endif -
trunk/Source/WebKit/UIProcess/ios/WebDeviceOrientationUpdateProviderProxy.mm
r253231 r253357 58 58 } 59 59 60 void WebDeviceOrientationUpdateProviderProxy::startUpdatingDeviceMotion() 61 { 62 [[WebCoreMotionManager sharedManager] addMotionClient:this]; 63 } 64 65 void WebDeviceOrientationUpdateProviderProxy::stopUpdatingDeviceMotion() 66 { 67 [[WebCoreMotionManager sharedManager] removeMotionClient:this]; 68 } 69 60 70 void WebDeviceOrientationUpdateProviderProxy::orientationChanged(double alpha, double beta, double gamma, double compassHeading, double compassAccuracy) 61 71 { … … 63 73 } 64 74 75 void WebDeviceOrientationUpdateProviderProxy::motionChanged(double xAcceleration, double yAcceleration, double zAcceleration, double xAccelerationIncludingGravity, double yAccelerationIncludingGravity, double zAccelerationIncludingGravity, double xRotationRate, double yRotationRate, double zRotationRate) 76 { 77 m_page.send(Messages::WebDeviceOrientationUpdateProvider::DeviceMotionChanged(xAcceleration, yAcceleration, zAcceleration, xAccelerationIncludingGravity, yAccelerationIncludingGravity, zAccelerationIncludingGravity, xRotationRate, yRotationRate, zRotationRate)); 78 } 79 65 80 } // namespace WebKit 66 81 -
trunk/Source/WebKit/WebProcess/WebCoreSupport/WebDeviceOrientationUpdateProvider.cpp
r253256 r253357 50 50 } 51 51 52 void WebDeviceOrientationUpdateProvider::startUpdating (WebCore::MotionManagerClient& client)52 void WebDeviceOrientationUpdateProvider::startUpdatingDeviceOrientation(WebCore::MotionManagerClient& client) 53 53 { 54 if (m_ clients.isEmpty() && m_page)54 if (m_deviceOrientationClients.computesEmpty() && m_page) 55 55 m_page->send(Messages::WebDeviceOrientationUpdateProviderProxy::StartUpdatingDeviceOrientation()); 56 m_ clients.add(&client);56 m_deviceOrientationClients.add(client); 57 57 } 58 58 59 void WebDeviceOrientationUpdateProvider::stopUpdating (WebCore::MotionManagerClient& client)59 void WebDeviceOrientationUpdateProvider::stopUpdatingDeviceOrientation(WebCore::MotionManagerClient& client) 60 60 { 61 if (m_ clients.isEmpty())61 if (m_deviceOrientationClients.computesEmpty()) 62 62 return; 63 m_ clients.remove(&client);64 if (m_ clients.isEmpty() && m_page)63 m_deviceOrientationClients.remove(client); 64 if (m_deviceOrientationClients.computesEmpty() && m_page) 65 65 m_page->send(Messages::WebDeviceOrientationUpdateProviderProxy::StopUpdatingDeviceOrientation()); 66 } 67 68 void WebDeviceOrientationUpdateProvider::startUpdatingDeviceMotion(WebCore::MotionManagerClient& client) 69 { 70 if (m_deviceMotionClients.computesEmpty() && m_page) 71 m_page->send(Messages::WebDeviceOrientationUpdateProviderProxy::StartUpdatingDeviceMotion()); 72 m_deviceMotionClients.add(client); 73 } 74 75 void WebDeviceOrientationUpdateProvider::stopUpdatingDeviceMotion(WebCore::MotionManagerClient& client) 76 { 77 if (m_deviceMotionClients.computesEmpty()) 78 return; 79 m_deviceMotionClients.remove(client); 80 if (m_deviceMotionClients.computesEmpty() && m_page) 81 m_page->send(Messages::WebDeviceOrientationUpdateProviderProxy::StopUpdatingDeviceMotion()); 66 82 } 67 83 68 84 void WebDeviceOrientationUpdateProvider::deviceOrientationChanged(double alpha, double beta, double gamma, double compassHeading, double compassAccuracy) 69 85 { 70 for (auto* client : copyToVector(m_clients)) 71 client->orientationChanged(alpha, beta, gamma, compassHeading, compassAccuracy); 86 Vector<WeakPtr<WebCore::MotionManagerClient>> clients; 87 for (auto& client : m_deviceOrientationClients) 88 clients.append(makeWeakPtr(&client)); 89 90 for (auto& client : clients) { 91 if (client) 92 client->orientationChanged(alpha, beta, gamma, compassHeading, compassAccuracy); 93 } 94 } 95 96 void WebDeviceOrientationUpdateProvider::deviceMotionChanged(double xAcceleration, double yAcceleration, double zAcceleration, double xAccelerationIncludingGravity, double yAccelerationIncludingGravity, double zAccelerationIncludingGravity, double xRotationRate, double yRotationRate, double zRotationRate) 97 { 98 Vector<WeakPtr<WebCore::MotionManagerClient>> clients; 99 for (auto& client : m_deviceMotionClients) 100 clients.append(makeWeakPtr(&client)); 101 102 for (auto& client : clients) { 103 if (client) 104 client->motionChanged(xAcceleration, yAcceleration, zAcceleration, xAccelerationIncludingGravity, yAccelerationIncludingGravity, zAccelerationIncludingGravity, xRotationRate, yRotationRate, zRotationRate); 105 } 72 106 } 73 107 -
trunk/Source/WebKit/WebProcess/WebCoreSupport/WebDeviceOrientationUpdateProvider.h
r253256 r253357 31 31 #include <WebCore/DeviceOrientationUpdateProvider.h> 32 32 33 #include <wtf/ HashSet.h>33 #include <wtf/WeakHashSet.h> 34 34 #include <wtf/WeakPtr.h> 35 35 … … 47 47 48 48 // WebCore::DeviceOrientationUpdateProvider 49 void startUpdating(WebCore::MotionManagerClient&) final; 50 void stopUpdating(WebCore::MotionManagerClient&) final; 49 void startUpdatingDeviceOrientation(WebCore::MotionManagerClient&) final; 50 void stopUpdatingDeviceOrientation(WebCore::MotionManagerClient&) final; 51 void startUpdatingDeviceMotion(WebCore::MotionManagerClient&) final; 52 void stopUpdatingDeviceMotion(WebCore::MotionManagerClient&) final; 51 53 void deviceOrientationChanged(double, double, double, double, double) final; 54 void deviceMotionChanged(double, double, double, double, double, double, double, double, double) final; 52 55 53 56 // IPC::MessageReceiver. … … 56 59 WeakPtr<WebPage> m_page; 57 60 WebCore::PageIdentifier m_pageIdentifier; 58 HashSet<WebCore::MotionManagerClient*> m_clients; 61 WeakHashSet<WebCore::MotionManagerClient> m_deviceOrientationClients; 62 WeakHashSet<WebCore::MotionManagerClient> m_deviceMotionClients; 59 63 }; 60 64 -
trunk/Source/WebKit/WebProcess/WebCoreSupport/WebDeviceOrientationUpdateProvider.messages.in
r253231 r253357 24 24 messages -> WebDeviceOrientationUpdateProvider { 25 25 DeviceOrientationChanged(double alpha, double beta, double gamma, double compassHeading, double compassAccuracy) 26 DeviceMotionChanged(double xAcceleration, double yAcceleration, double zAcceleration, double xAccelerationIncludingGravity, double yAccelerationIncludingGravity, double zAccelerationIncludingGravity, double xRotationRate, double yRotationRate, double zRotationRate) 26 27 } 27 28 #endif
Note:
See TracChangeset
for help on using the changeset viewer.