Changeset 211100 in webkit
- Timestamp:
- Jan 24, 2017, 1:22:36 PM (10 years ago)
- Location:
- branches/safari-603-branch
- Files:
-
- 2 added
- 27 edited
-
LayoutTests/ChangeLog (modified) (1 diff)
-
LayoutTests/gamepad/gamepad-visibility-1-expected.txt (added)
-
LayoutTests/gamepad/gamepad-visibility-1.html (added)
-
Source/WebCore/ChangeLog (modified) (1 diff)
-
Source/WebCore/Modules/gamepad/GamepadManager.cpp (modified) (1 diff)
-
Source/WebCore/Modules/gamepad/GamepadManager.h (modified) (1 diff)
-
Source/WebCore/platform/gamepad/GamepadProvider.cpp (modified) (2 diffs)
-
Source/WebCore/platform/gamepad/GamepadProvider.h (modified) (3 diffs)
-
Source/WebCore/platform/gamepad/GamepadProviderClient.h (modified) (1 diff)
-
Source/WebCore/platform/gamepad/cocoa/GameControllerGamepad.h (modified) (1 diff)
-
Source/WebCore/platform/gamepad/cocoa/GameControllerGamepad.mm (modified) (4 diffs)
-
Source/WebCore/platform/gamepad/cocoa/GameControllerGamepadProvider.h (modified) (4 diffs)
-
Source/WebCore/platform/gamepad/cocoa/GameControllerGamepadProvider.mm (modified) (2 diffs)
-
Source/WebCore/platform/gamepad/mac/HIDGamepad.cpp (modified) (3 diffs)
-
Source/WebCore/platform/gamepad/mac/HIDGamepad.h (modified) (2 diffs)
-
Source/WebCore/platform/gamepad/mac/HIDGamepadProvider.cpp (modified) (2 diffs)
-
Source/WebCore/platform/gamepad/mac/HIDGamepadProvider.h (modified) (2 diffs)
-
Source/WebCore/testing/MockGamepadProvider.cpp (modified) (2 diffs)
-
Source/WebCore/testing/MockGamepadProvider.h (modified) (2 diffs)
-
Source/WebKit2/ChangeLog (modified) (1 diff)
-
Source/WebKit2/UIProcess/Gamepad/UIGamepadProvider.cpp (modified) (3 diffs)
-
Source/WebKit2/UIProcess/Gamepad/UIGamepadProvider.h (modified) (2 diffs)
-
Source/WebKit2/UIProcess/WebPageProxy.cpp (modified) (1 diff)
-
Source/WebKit2/UIProcess/WebPageProxy.h (modified) (1 diff)
-
Source/WebKit2/WebProcess/Gamepad/WebGamepadProvider.cpp (modified) (2 diffs)
-
Source/WebKit2/WebProcess/Gamepad/WebGamepadProvider.h (modified) (1 diff)
-
Source/WebKit2/WebProcess/WebPage/WebPage.cpp (modified) (1 diff)
-
Source/WebKit2/WebProcess/WebPage/WebPage.h (modified) (1 diff)
-
Source/WebKit2/WebProcess/WebPage/WebPage.messages.in (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/safari-603-branch/LayoutTests/ChangeLog
r210970 r211100 1 2017-01-24 Matthew Hanson <matthew_hanson@apple.com> 2 3 Merge r211007. rdar://problem/28620919 4 5 2017-01-20 Brady Eidson <beidson@apple.com> 6 7 Require a button press on a gamepad for them to be exposed to the DOM. 8 <rdar://problem/28620919> and https://bugs.webkit.org/show_bug.cgi?id=167272 9 10 Reviewed by Alex Christensen. 11 12 * gamepad/gamepad-visibility-1-expected.txt: Added. 13 * gamepad/gamepad-visibility-1.html: Added. 14 1 15 2017-01-20 Matthew Hanson <matthew_hanson@apple.com> 2 16 -
branches/safari-603-branch/Source/WebCore/ChangeLog
r210970 r211100 1 2017-01-24 Matthew Hanson <matthew_hanson@apple.com> 2 3 Merge r211007. rdar://problem/28620919 4 5 2017-01-20 Brady Eidson <beidson@apple.com> 6 7 Require a button press on a gamepad for them to be exposed to the DOM. 8 <rdar://problem/28620919> and https://bugs.webkit.org/show_bug.cgi?id=167272 9 10 Reviewed by Alex Christensen. 11 12 Test: gamepad/gamepad-visibility-1.html 13 14 * Modules/gamepad/GamepadManager.cpp: 15 (WebCore::GamepadManager::platformGamepadInputActivity): 16 * Modules/gamepad/GamepadManager.h: 17 18 * platform/gamepad/GamepadProvider.cpp: 19 (WebCore::GamepadProvider::dispatchPlatformGamepadInputActivity): 20 * platform/gamepad/GamepadProvider.h: 21 (WebCore::GamepadProvider::~GamepadProvider): Deleted. 22 (WebCore::GamepadProvider::isMockGamepadProvider): Deleted. 23 24 * platform/gamepad/GamepadProviderClient.h: 25 26 * platform/gamepad/cocoa/GameControllerGamepad.h: 27 * platform/gamepad/cocoa/GameControllerGamepad.mm: 28 (WebCore::GameControllerGamepad::setupAsExtendedGamepad): 29 (WebCore::GameControllerGamepad::setupAsGamepad): 30 31 * platform/gamepad/cocoa/GameControllerGamepadProvider.h: 32 * platform/gamepad/cocoa/GameControllerGamepadProvider.mm: 33 (WebCore::GameControllerGamepadProvider::gamepadHadInput): 34 (WebCore::GameControllerGamepadProvider::inputNotificationTimerFired): 35 36 * platform/gamepad/mac/HIDGamepad.cpp: 37 (WebCore::HIDGamepad::valueChanged): 38 * platform/gamepad/mac/HIDGamepad.h: 39 40 * platform/gamepad/mac/HIDGamepadProvider.cpp: 41 (WebCore::HIDGamepadProvider::valuesChanged): 42 (WebCore::HIDGamepadProvider::inputNotificationTimerFired): 43 * platform/gamepad/mac/HIDGamepadProvider.h: 44 45 * testing/MockGamepadProvider.cpp: 46 (WebCore::MockGamepadProvider::setMockGamepadButtonValue): 47 (WebCore::MockGamepadProvider::gamepadInputActivity): 48 * testing/MockGamepadProvider.h: 49 1 50 2017-01-20 Matthew Hanson <matthew_hanson@apple.com> 2 51 -
branches/safari-603-branch/Source/WebCore/Modules/gamepad/GamepadManager.cpp
r205814 r211100 116 116 } 117 117 118 void GamepadManager::platformGamepadInputActivity() 119 { 118 void GamepadManager::platformGamepadInputActivity(bool shouldMakeGamepadVisible) 119 { 120 if (!shouldMakeGamepadVisible) 121 return; 122 120 123 if (m_gamepadBlindNavigators.isEmpty() && m_gamepadBlindDOMWindows.isEmpty()) 121 124 return; -
branches/safari-603-branch/Source/WebCore/Modules/gamepad/GamepadManager.h
r208646 r211100 48 48 void platformGamepadConnected(PlatformGamepad&) final; 49 49 void platformGamepadDisconnected(PlatformGamepad&) final; 50 void platformGamepadInputActivity( ) final;50 void platformGamepadInputActivity(bool shouldMakeGamepadVisible) final; 51 51 52 52 void registerNavigator(NavigatorGamepad*); -
branches/safari-603-branch/Source/WebCore/platform/gamepad/GamepadProvider.cpp
r204178 r211100 29 29 30 30 #include "EmptyGamepadProvider.h" 31 #include "GamepadProviderClient.h" 31 32 #include <wtf/NeverDestroyed.h> 32 33 … … 50 51 } 51 52 53 void GamepadProvider::dispatchPlatformGamepadInputActivity() 54 { 55 for (auto& client : m_clients) 56 client->platformGamepadInputActivity(m_shouldMakeGamepadsVisible); 57 58 m_shouldMakeGamepadsVisible = false; 59 } 60 52 61 } // namespace WebCore 53 62 -
branches/safari-603-branch/Source/WebCore/platform/gamepad/GamepadProvider.h
r204853 r211100 28 28 #if ENABLE(GAMEPAD) 29 29 30 #include <wtf/HashSet.h> 30 31 #include <wtf/Vector.h> 31 32 … … 35 36 class PlatformGamepad; 36 37 37 class GamepadProvider {38 class WEBCORE_EXPORT GamepadProvider { 38 39 public: 39 40 virtual ~GamepadProvider() { } … … 47 48 virtual bool isMockGamepadProvider() const { return false; } 48 49 50 protected: 51 void dispatchPlatformGamepadInputActivity(); 52 void setShouldMakeGamepadsVisibile() { m_shouldMakeGamepadsVisible = true; } 53 HashSet<GamepadProviderClient*> m_clients; 54 55 private: 56 bool m_shouldMakeGamepadsVisible { false }; 49 57 }; 50 58 -
branches/safari-603-branch/Source/WebCore/platform/gamepad/GamepadProviderClient.h
r204524 r211100 41 41 virtual void platformGamepadConnected(PlatformGamepad&) = 0; 42 42 virtual void platformGamepadDisconnected(PlatformGamepad&) = 0; 43 virtual void platformGamepadInputActivity( ) = 0;43 virtual void platformGamepadInputActivity(bool shouldMakeGamepadVisible) = 0; 44 44 }; 45 45 -
branches/safari-603-branch/Source/WebCore/platform/gamepad/cocoa/GameControllerGamepad.h
r205247 r211100 59 59 RetainPtr<GCGamepad> m_gamepad; 60 60 RetainPtr<GCExtendedGamepad> m_extendedGamepad; 61 62 bool m_hadButtonPresses { false }; 61 63 }; 62 64 -
branches/safari-603-branch/Source/WebCore/platform/gamepad/cocoa/GameControllerGamepad.mm
r205247 r211100 60 60 m_extendedGamepad.get().valueChangedHandler = ^(GCExtendedGamepad *, GCControllerElement *) { 61 61 m_lastUpdateTime = monotonicallyIncreasingTime(); 62 GameControllerGamepadProvider::singleton().gamepadHadInput(*this); 62 GameControllerGamepadProvider::singleton().gamepadHadInput(*this, m_hadButtonPresses); 63 m_hadButtonPresses = false; 63 64 }; 64 65 … … 81 82 m_axisValues[5] = m_extendedGamepad.get().dpad.yAxis.value; 82 83 83 m_extendedGamepad.get().buttonA.valueChangedHandler = ^(GCControllerButtonInput *, float value, BOOL ) {84 m_extendedGamepad.get().buttonA.valueChangedHandler = ^(GCControllerButtonInput *, float value, BOOL pressed) { 84 85 m_buttonValues[0] = value; 85 }; 86 m_extendedGamepad.get().buttonB.valueChangedHandler = ^(GCControllerButtonInput *, float value, BOOL) { 86 if (pressed) 87 m_hadButtonPresses = true; 88 }; 89 m_extendedGamepad.get().buttonB.valueChangedHandler = ^(GCControllerButtonInput *, float value, BOOL pressed) { 87 90 m_buttonValues[1] = value; 88 }; 89 m_extendedGamepad.get().buttonX.valueChangedHandler = ^(GCControllerButtonInput *, float value, BOOL) { 91 if (pressed) 92 m_hadButtonPresses = true; 93 }; 94 m_extendedGamepad.get().buttonX.valueChangedHandler = ^(GCControllerButtonInput *, float value, BOOL pressed) { 90 95 m_buttonValues[2] = value; 91 }; 92 m_extendedGamepad.get().buttonY.valueChangedHandler = ^(GCControllerButtonInput *, float value, BOOL) { 96 if (pressed) 97 m_hadButtonPresses = true; 98 }; 99 m_extendedGamepad.get().buttonY.valueChangedHandler = ^(GCControllerButtonInput *, float value, BOOL pressed) { 93 100 m_buttonValues[3] = value; 94 }; 95 m_extendedGamepad.get().leftShoulder.valueChangedHandler = ^(GCControllerButtonInput *, float value, BOOL) { 101 if (pressed) 102 m_hadButtonPresses = true; 103 }; 104 m_extendedGamepad.get().leftShoulder.valueChangedHandler = ^(GCControllerButtonInput *, float value, BOOL pressed) { 96 105 m_buttonValues[4] = value; 97 }; 98 m_extendedGamepad.get().rightShoulder.valueChangedHandler = ^(GCControllerButtonInput *, float value, BOOL) { 106 if (pressed) 107 m_hadButtonPresses = true; 108 }; 109 m_extendedGamepad.get().rightShoulder.valueChangedHandler = ^(GCControllerButtonInput *, float value, BOOL pressed) { 99 110 m_buttonValues[5] = value; 100 }; 101 m_extendedGamepad.get().leftTrigger.valueChangedHandler = ^(GCControllerButtonInput *, float value, BOOL) { 111 if (pressed) 112 m_hadButtonPresses = true; 113 }; 114 m_extendedGamepad.get().leftTrigger.valueChangedHandler = ^(GCControllerButtonInput *, float value, BOOL pressed) { 102 115 m_buttonValues[6] = value; 103 }; 104 m_extendedGamepad.get().rightTrigger.valueChangedHandler = ^(GCControllerButtonInput *, float value, BOOL) { 116 if (pressed) 117 m_hadButtonPresses = true; 118 }; 119 m_extendedGamepad.get().rightTrigger.valueChangedHandler = ^(GCControllerButtonInput *, float value, BOOL pressed) { 105 120 m_buttonValues[7] = value; 121 if (pressed) 122 m_hadButtonPresses = true; 106 123 }; 107 124 … … 134 151 m_gamepad.get().valueChangedHandler = ^(GCGamepad *, GCControllerElement *) { 135 152 m_lastUpdateTime = monotonicallyIncreasingTime(); 136 GameControllerGamepadProvider::singleton().gamepadHadInput(*this); 153 GameControllerGamepadProvider::singleton().gamepadHadInput(*this, m_hadButtonPresses); 154 m_hadButtonPresses = false; 137 155 }; 138 156 … … 149 167 m_axisValues[1] = m_extendedGamepad.get().dpad.yAxis.value; 150 168 151 m_extendedGamepad.get().buttonA.valueChangedHandler = ^(GCControllerButtonInput *, float value, BOOL ) {169 m_extendedGamepad.get().buttonA.valueChangedHandler = ^(GCControllerButtonInput *, float value, BOOL pressed) { 152 170 m_buttonValues[0] = value; 153 }; 154 m_extendedGamepad.get().buttonB.valueChangedHandler = ^(GCControllerButtonInput *, float value, BOOL) { 171 if (pressed) 172 m_hadButtonPresses = true; 173 }; 174 m_extendedGamepad.get().buttonB.valueChangedHandler = ^(GCControllerButtonInput *, float value, BOOL pressed) { 155 175 m_buttonValues[1] = value; 156 }; 157 m_extendedGamepad.get().buttonX.valueChangedHandler = ^(GCControllerButtonInput *, float value, BOOL) { 176 if (pressed) 177 m_hadButtonPresses = true; 178 }; 179 m_extendedGamepad.get().buttonX.valueChangedHandler = ^(GCControllerButtonInput *, float value, BOOL pressed) { 158 180 m_buttonValues[2] = value; 159 }; 160 m_extendedGamepad.get().buttonY.valueChangedHandler = ^(GCControllerButtonInput *, float value, BOOL) { 181 if (pressed) 182 m_hadButtonPresses = true; 183 }; 184 m_extendedGamepad.get().buttonY.valueChangedHandler = ^(GCControllerButtonInput *, float value, BOOL pressed) { 161 185 m_buttonValues[3] = value; 162 }; 163 m_extendedGamepad.get().leftShoulder.valueChangedHandler = ^(GCControllerButtonInput *, float value, BOOL) { 186 if (pressed) 187 m_hadButtonPresses = true; 188 }; 189 m_extendedGamepad.get().leftShoulder.valueChangedHandler = ^(GCControllerButtonInput *, float value, BOOL pressed) { 164 190 m_buttonValues[4] = value; 165 }; 166 m_extendedGamepad.get().rightShoulder.valueChangedHandler = ^(GCControllerButtonInput *, float value, BOOL) { 191 if (pressed) 192 m_hadButtonPresses = true; 193 }; 194 m_extendedGamepad.get().rightShoulder.valueChangedHandler = ^(GCControllerButtonInput *, float value, BOOL pressed) { 167 195 m_buttonValues[5] = value; 196 if (pressed) 197 m_hadButtonPresses = true; 168 198 }; 169 199 -
branches/safari-603-branch/Source/WebCore/platform/gamepad/cocoa/GameControllerGamepadProvider.h
r205247 r211100 30 30 #include "GamepadProvider.h" 31 31 #include <wtf/HashMap.h> 32 #include <wtf/HashSet.h>33 32 #include <wtf/NeverDestroyed.h> 34 33 #include <wtf/RetainPtr.h> … … 56 55 WEBCORE_EXPORT void startMonitoringInput(); 57 56 58 void gamepadHadInput(GameControllerGamepad& );57 void gamepadHadInput(GameControllerGamepad&, bool hadButtonPresses); 59 58 60 59 private: … … 75 74 void makeInvisibileGamepadsVisible(); 76 75 77 HashSet<GamepadProviderClient*> m_clients;78 79 76 HashMap<GCController *, std::unique_ptr<GameControllerGamepad>> m_gamepadMap; 80 77 Vector<PlatformGamepad*> m_gamepadVector; … … 85 82 86 83 RunLoop::Timer<GameControllerGamepadProvider> m_inputNotificationTimer; 84 bool m_shouldMakeInvisibileGamepadsVisible { false }; 87 85 }; 88 86 -
branches/safari-603-branch/Source/WebCore/platform/gamepad/cocoa/GameControllerGamepadProvider.mm
r205756 r211100 142 142 } 143 143 144 void GameControllerGamepadProvider::gamepadHadInput(GameControllerGamepad& )144 void GameControllerGamepadProvider::gamepadHadInput(GameControllerGamepad&, bool hadButtonPresses) 145 145 { 146 146 if (!m_inputNotificationTimer.isActive()) 147 147 m_inputNotificationTimer.startOneShot(InputNotificationDelay); 148 149 if (hadButtonPresses) 150 m_shouldMakeInvisibileGamepadsVisible = true; 148 151 } 149 152 … … 160 163 void GameControllerGamepadProvider::inputNotificationTimerFired() 161 164 { 162 makeInvisibileGamepadsVisible(); 165 if (m_shouldMakeInvisibileGamepadsVisible) { 166 setShouldMakeGamepadsVisibile(); 167 makeInvisibileGamepadsVisible(); 168 } 163 169 164 for (auto& client : m_clients) 165 client->platformGamepadInputActivity(); 170 m_shouldMakeInvisibileGamepadsVisible = false; 171 172 dispatchPlatformGamepadInputActivity(); 166 173 } 167 174 -
branches/safari-603-branch/Source/WebCore/platform/gamepad/mac/HIDGamepad.cpp
r205247 r211100 159 159 } 160 160 161 voidHIDGamepad::valueChanged(IOHIDValueRef value)161 HIDInputType HIDGamepad::valueChanged(IOHIDValueRef value) 162 162 { 163 163 IOHIDElementCookie cookie = IOHIDElementGetCookie(IOHIDValueGetElement(value)); … … 166 166 // This might be an element we don't currently handle as input so we can skip it. 167 167 if (!element) 168 return ;168 return HIDInputType::NotAButtonPress; 169 169 170 170 element->rawValue = IOHIDValueGetScaledValue(value, kIOHIDValueScaleTypePhysical); … … 184 184 185 185 m_lastUpdateTime = monotonicallyIncreasingTime(); 186 187 return element->isButton() ? HIDInputType::ButtonPress : HIDInputType::NotAButtonPress; 186 188 } 187 189 -
branches/safari-603-branch/Source/WebCore/platform/gamepad/mac/HIDGamepad.h
r205247 r211100 92 92 }; 93 93 94 enum class HIDInputType { 95 ButtonPress, 96 NotAButtonPress, 97 }; 98 94 99 class HIDGamepad : public PlatformGamepad { 95 100 public: … … 98 103 IOHIDDeviceRef hidDevice() const { return m_hidDevice.get(); } 99 104 100 voidvalueChanged(IOHIDValueRef);105 HIDInputType valueChanged(IOHIDValueRef); 101 106 102 107 const Vector<double>& axisValues() const final { return m_axisValues; } -
branches/safari-603-branch/Source/WebCore/platform/gamepad/mac/HIDGamepadProvider.cpp
r205247 r211100 238 238 return; 239 239 240 gamepad->valueChanged(value); 240 if (gamepad->valueChanged(value) == HIDInputType::ButtonPress) 241 setShouldMakeGamepadsVisibile(); 241 242 242 243 // This isActive check is necessary as we want to delay input notifications from the time of the first input, … … 251 252 return; 252 253 253 for (auto& client : m_clients) 254 client->platformGamepadInputActivity(); 254 dispatchPlatformGamepadInputActivity(); 255 255 } 256 256 -
branches/safari-603-branch/Source/WebCore/platform/gamepad/mac/HIDGamepadProvider.h
r205247 r211100 34 34 #include <wtf/Deque.h> 35 35 #include <wtf/HashMap.h> 36 #include <wtf/HashSet.h>37 36 #include <wtf/NeverDestroyed.h> 38 37 #include <wtf/RetainPtr.h> … … 77 76 RetainPtr<IOHIDManagerRef> m_manager; 78 77 79 HashSet<GamepadProviderClient*> m_clients;80 78 bool m_shouldDispatchCallbacks; 81 79 -
branches/safari-603-branch/Source/WebCore/testing/MockGamepadProvider.cpp
r204853 r211100 133 133 134 134 m_mockGamepadVector[index]->setButtonValue(buttonIndex, value); 135 setShouldMakeGamepadsVisibile(); 135 136 gamepadInputActivity(); 136 137 return true; … … 144 145 m_shouldScheduleActivityCallback = false; 145 146 callOnMainThread([this]() { 146 for (auto& client : m_clients) 147 client->platformGamepadInputActivity(); 147 dispatchPlatformGamepadInputActivity(); 148 148 149 149 m_shouldScheduleActivityCallback = true; -
branches/safari-603-branch/Source/WebCore/testing/MockGamepadProvider.h
r204853 r211100 30 30 #include "GamepadProvider.h" 31 31 #include "MockGamepad.h" 32 #include <wtf/HashSet.h>33 32 #include <wtf/NeverDestroyed.h> 34 33 #include <wtf/text/WTFString.h> … … 63 62 Vector<std::unique_ptr<MockGamepad>> m_mockGamepadVector; 64 63 65 HashSet<GamepadProviderClient*> m_clients;66 67 64 bool m_shouldScheduleActivityCallback { true }; 68 65 }; -
branches/safari-603-branch/Source/WebKit2/ChangeLog
r211098 r211100 1 2017-01-24 Matthew Hanson <matthew_hanson@apple.com> 2 3 Merge r211007. rdar://problem/28620919 4 5 2017-01-20 Brady Eidson <beidson@apple.com> 6 7 Require a button press on a gamepad for them to be exposed to the DOM. 8 <rdar://problem/28620919> and https://bugs.webkit.org/show_bug.cgi?id=167272 9 10 Reviewed by Alex Christensen. 11 12 * UIProcess/Gamepad/UIGamepadProvider.cpp: 13 (WebKit::UIGamepadProvider::gamepadSyncTimerFired): 14 (WebKit::UIGamepadProvider::platformGamepadInputActivity): 15 * UIProcess/Gamepad/UIGamepadProvider.h: 16 17 * UIProcess/WebPageProxy.cpp: 18 (WebKit::WebPageProxy::gamepadActivity): 19 * UIProcess/WebPageProxy.h: 20 21 * WebProcess/Gamepad/WebGamepadProvider.cpp: 22 (WebKit::WebGamepadProvider::gamepadActivity): 23 * WebProcess/Gamepad/WebGamepadProvider.h: 24 25 * WebProcess/WebPage/WebPage.cpp: 26 (WebKit::WebPage::gamepadActivity): 27 * WebProcess/WebPage/WebPage.h: 28 * WebProcess/WebPage/WebPage.messages.in: 29 1 30 2017-01-24 Matthew Hanson <matthew_hanson@apple.com> 2 31 -
branches/safari-603-branch/Source/WebKit2/UIProcess/Gamepad/UIGamepadProvider.cpp
r210871 r211100 66 66 return; 67 67 68 webPageProxy->gamepadActivity(snapshotGamepads()); 68 webPageProxy->gamepadActivity(snapshotGamepads(), m_shouldMakeGamepadsVisibleOnSync); 69 m_shouldMakeGamepadsVisibleOnSync = false; 69 70 } 70 71 … … 127 128 } 128 129 129 void UIGamepadProvider::platformGamepadInputActivity( )130 void UIGamepadProvider::platformGamepadInputActivity(bool shouldMakeGamepadsVisible) 130 131 { 131 132 auto platformGamepads = GamepadProvider::singleton().platformGamepads(); … … 142 143 } 143 144 145 if (shouldMakeGamepadsVisible) 146 m_shouldMakeGamepadsVisibleOnSync = true; 147 144 148 scheduleGamepadStateSync(); 145 149 } -
branches/safari-603-branch/Source/WebKit2/UIProcess/Gamepad/UIGamepadProvider.h
r210871 r211100 75 75 void platformGamepadConnected(WebCore::PlatformGamepad&) final; 76 76 void platformGamepadDisconnected(WebCore::PlatformGamepad&) final; 77 void platformGamepadInputActivity( ) final;77 void platformGamepadInputActivity(bool shouldMakeGamepadsVisible) final; 78 78 79 79 void scheduleGamepadStateSync(); … … 88 88 bool m_isMonitoringGamepads { false }; 89 89 bool m_hasInitialGamepads { false }; 90 bool m_shouldMakeGamepadsVisibleOnSync { false }; 90 91 }; 91 92 -
branches/safari-603-branch/Source/WebKit2/UIProcess/WebPageProxy.cpp
r210641 r211100 5595 5595 #if ENABLE(GAMEPAD) 5596 5596 5597 void WebPageProxy::gamepadActivity(const Vector<GamepadData>& gamepadDatas )5598 { 5599 m_process->send(Messages::WebPage::GamepadActivity(gamepadDatas ), m_pageID);5597 void WebPageProxy::gamepadActivity(const Vector<GamepadData>& gamepadDatas, bool shouldMakeGamepadsVisible) 5598 { 5599 m_process->send(Messages::WebPage::GamepadActivity(gamepadDatas, shouldMakeGamepadsVisible), m_pageID); 5600 5600 } 5601 5601 -
branches/safari-603-branch/Source/WebKit2/UIProcess/WebPageProxy.h
r210876 r211100 1176 1176 1177 1177 #if ENABLE(GAMEPAD) 1178 void gamepadActivity(const Vector<GamepadData>& );1178 void gamepadActivity(const Vector<GamepadData>&, bool shouldMakeGamepadsVisible); 1179 1179 #endif 1180 1180 -
branches/safari-603-branch/Source/WebKit2/WebProcess/Gamepad/WebGamepadProvider.cpp
r204853 r211100 96 96 } 97 97 98 void WebGamepadProvider::gamepadActivity(const Vector<GamepadData>& gamepadDatas )98 void WebGamepadProvider::gamepadActivity(const Vector<GamepadData>& gamepadDatas, bool shouldMakeGamepadsVisible) 99 99 { 100 100 ASSERT(m_gamepads.size() == gamepadDatas.size()); … … 106 106 107 107 for (auto* client : m_clients) 108 client->platformGamepadInputActivity( );108 client->platformGamepadInputActivity(shouldMakeGamepadsVisible); 109 109 } 110 110 -
branches/safari-603-branch/Source/WebKit2/WebProcess/Gamepad/WebGamepadProvider.h
r204853 r211100 45 45 void gamepadConnected(const GamepadData&); 46 46 void gamepadDisconnected(unsigned index); 47 void gamepadActivity(const Vector<GamepadData>& );47 void gamepadActivity(const Vector<GamepadData>&, bool shouldMakeGamepadsVisible); 48 48 49 49 void setInitialGamepads(const Vector<GamepadData>&); -
branches/safari-603-branch/Source/WebKit2/WebProcess/WebPage/WebPage.cpp
r210969 r211100 5691 5691 #if ENABLE(GAMEPAD) 5692 5692 5693 void WebPage::gamepadActivity(const Vector<GamepadData>& gamepadDatas )5694 { 5695 WebGamepadProvider::singleton().gamepadActivity(gamepadDatas );5693 void WebPage::gamepadActivity(const Vector<GamepadData>& gamepadDatas, bool shouldMakeGamepadsVisible) 5694 { 5695 WebGamepadProvider::singleton().gamepadActivity(gamepadDatas, shouldMakeGamepadsVisible); 5696 5696 } 5697 5697 -
branches/safari-603-branch/Source/WebKit2/WebProcess/WebPage/WebPage.h
r209975 r211100 965 965 966 966 #if ENABLE(GAMEPAD) 967 void gamepadActivity(const Vector<GamepadData>& );967 void gamepadActivity(const Vector<GamepadData>&, bool shouldMakeGamepadsVisible); 968 968 #endif 969 969 -
branches/safari-603-branch/Source/WebKit2/WebProcess/WebPage/WebPage.messages.in
r209975 r211100 458 458 459 459 #if ENABLE(GAMEPAD) 460 GamepadActivity(Vector<WebKit::GamepadData> gamepadDatas )460 GamepadActivity(Vector<WebKit::GamepadData> gamepadDatas, bool shouldMakeGamepadsVisible) 461 461 #endif 462 462 }
Note:
See TracChangeset
for help on using the changeset viewer.