<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[204318] trunk/Source/WebKit2</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/204318">204318</a></dd>
<dt>Author</dt> <dd>beidson@apple.com</dd>
<dt>Date</dt> <dd>2016-08-09 17:49:34 -0700 (Tue, 09 Aug 2016)</dd>
</dl>

<h3>Log Message</h3>
<pre>[WK2] Only send gamepad input events to the currently focused page.
https://bugs.webkit.org/show_bug.cgi?id=160699

Reviewed by Tim Horton.

* UIProcess/Gamepad/UIGamepadProvider.cpp:
(WebKit::UIGamepadProvider::updateTimerFired):
(WebKit::UIGamepadProvider::platformWebProcessProxyForGamepadInput):
* UIProcess/Gamepad/UIGamepadProvider.h:
* UIProcess/Gamepad/mac/UIGamepadProviderMac.mm: Copied from Source/WebKit2/UIProcess/API/mac/WKViewInternal.h.
(WebKit::UIGamepadProvider::platformWebPageProxyForGamepadInput):

* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::gamepadActivity):
* UIProcess/WebPageProxy.h:

* UIProcess/WebProcessPool.cpp:
(WebKit::WebProcessPool::gamepadActivity): Deleted.
* UIProcess/WebProcessPool.h:

* WebKit2.xcodeproj/project.pbxproj:

* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::gamepadActivity):
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:

* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::gamepadActivity): Deleted.
* WebProcess/WebProcess.h:
* WebProcess/WebProcess.messages.in:</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebKit2ChangeLog">trunk/Source/WebKit2/ChangeLog</a></li>
<li><a href="#trunkSourceWebKit2UIProcessGamepadUIGamepadProvidercpp">trunk/Source/WebKit2/UIProcess/Gamepad/UIGamepadProvider.cpp</a></li>
<li><a href="#trunkSourceWebKit2UIProcessGamepadUIGamepadProviderh">trunk/Source/WebKit2/UIProcess/Gamepad/UIGamepadProvider.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessWebPageProxycpp">trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp</a></li>
<li><a href="#trunkSourceWebKit2UIProcessWebPageProxyh">trunk/Source/WebKit2/UIProcess/WebPageProxy.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessWebProcessPoolcpp">trunk/Source/WebKit2/UIProcess/WebProcessPool.cpp</a></li>
<li><a href="#trunkSourceWebKit2UIProcessWebProcessPoolh">trunk/Source/WebKit2/UIProcess/WebProcessPool.h</a></li>
<li><a href="#trunkSourceWebKit2WebKit2xcodeprojprojectpbxproj">trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebPageWebPagecpp">trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebPageWebPageh">trunk/Source/WebKit2/WebProcess/WebPage/WebPage.h</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebPageWebPagemessagesin">trunk/Source/WebKit2/WebProcess/WebPage/WebPage.messages.in</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebProcesscpp">trunk/Source/WebKit2/WebProcess/WebProcess.cpp</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebProcessh">trunk/Source/WebKit2/WebProcess/WebProcess.h</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebProcessmessagesin">trunk/Source/WebKit2/WebProcess/WebProcess.messages.in</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkSourceWebKit2UIProcessGamepadmacUIGamepadProviderMacmm">trunk/Source/WebKit2/UIProcess/Gamepad/mac/UIGamepadProviderMac.mm</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebKit2ChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/ChangeLog (204317 => 204318)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/ChangeLog        2016-08-10 00:31:38 UTC (rev 204317)
+++ trunk/Source/WebKit2/ChangeLog        2016-08-10 00:49:34 UTC (rev 204318)
</span><span class="lines">@@ -1,3 +1,37 @@
</span><ins>+2016-08-09  Brady Eidson  &lt;beidson@apple.com&gt;
+
+        [WK2] Only send gamepad input events to the currently focused page.
+        https://bugs.webkit.org/show_bug.cgi?id=160699
+
+        Reviewed by Tim Horton.
+        
+        * UIProcess/Gamepad/UIGamepadProvider.cpp:
+        (WebKit::UIGamepadProvider::updateTimerFired):
+        (WebKit::UIGamepadProvider::platformWebProcessProxyForGamepadInput):
+        * UIProcess/Gamepad/UIGamepadProvider.h:
+        * UIProcess/Gamepad/mac/UIGamepadProviderMac.mm: Copied from Source/WebKit2/UIProcess/API/mac/WKViewInternal.h.
+        (WebKit::UIGamepadProvider::platformWebPageProxyForGamepadInput):
+        
+        * UIProcess/WebPageProxy.cpp:
+        (WebKit::WebPageProxy::gamepadActivity):
+        * UIProcess/WebPageProxy.h:
+        
+        * UIProcess/WebProcessPool.cpp:
+        (WebKit::WebProcessPool::gamepadActivity): Deleted.
+        * UIProcess/WebProcessPool.h:
+        
+        * WebKit2.xcodeproj/project.pbxproj:
+        
+        * WebProcess/WebPage/WebPage.cpp:
+        (WebKit::WebPage::gamepadActivity):
+        * WebProcess/WebPage/WebPage.h:
+        * WebProcess/WebPage/WebPage.messages.in:
+        
+        * WebProcess/WebProcess.cpp:
+        (WebKit::WebProcess::gamepadActivity): Deleted.
+        * WebProcess/WebProcess.h:
+        * WebProcess/WebProcess.messages.in:
+
</ins><span class="cx"> 2016-08-09  Anders Carlsson  &lt;andersca@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Remove code that would tell clients whenever the list of installed plug-ins changes
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessGamepadUIGamepadProvidercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/Gamepad/UIGamepadProvider.cpp (204317 => 204318)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/Gamepad/UIGamepadProvider.cpp        2016-08-10 00:31:38 UTC (rev 204317)
+++ trunk/Source/WebKit2/UIProcess/Gamepad/UIGamepadProvider.cpp        2016-08-10 00:49:34 UTC (rev 204318)
</span><span class="lines">@@ -72,10 +72,9 @@
</span><span class="cx">             gamepadDatas.uncheckedAppend({ });
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    // FIXME (https://bugs.webkit.org/show_bug.cgi?id=160699)
-    // Only send updates to the process pool that contains the currently focused web page.
-    for (auto&amp; pool : m_processPoolsUsingGamepads)
-        pool-&gt;gamepadActivity(gamepadDatas);
</del><ins>+    auto webPageProxy = platformWebPageProxyForGamepadInput();
+    if (webPageProxy &amp;&amp; m_processPoolsUsingGamepads.contains(&amp;webPageProxy-&gt;process().processPool()))
+        webPageProxy-&gt;gamepadActivity(gamepadDatas);
</ins><span class="cx"> 
</span><span class="cx">     m_hadActivitySinceLastSynch = false;
</span><span class="cx"> }
</span><span class="lines">@@ -185,6 +184,11 @@
</span><span class="cx">     // FIXME: Implement for other platforms
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+WebProcessProxy* UIGamepadProvider::platformWebProcessProxyForGamepadInput()
+{
+    // FIXME: Implement for other platforms
+}
+
</ins><span class="cx"> #endif // !PLATFORM(MAC)
</span><span class="cx"> 
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessGamepadUIGamepadProviderh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/Gamepad/UIGamepadProvider.h (204317 => 204318)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/Gamepad/UIGamepadProvider.h        2016-08-10 00:31:38 UTC (rev 204317)
+++ trunk/Source/WebKit2/UIProcess/Gamepad/UIGamepadProvider.h        2016-08-10 00:49:34 UTC (rev 204318)
</span><span class="lines">@@ -36,6 +36,7 @@
</span><span class="cx"> namespace WebKit {
</span><span class="cx"> 
</span><span class="cx"> class UIGamepad;
</span><ins>+class WebPageProxy;
</ins><span class="cx"> class WebProcessPool;
</span><span class="cx"> struct GamepadData;
</span><span class="cx"> 
</span><span class="lines">@@ -56,6 +57,7 @@
</span><span class="cx">     void platformStartMonitoringGamepads();
</span><span class="cx">     void platformStopMonitoringGamepads();
</span><span class="cx">     const Vector&lt;WebCore::PlatformGamepad*&gt;&amp; platformGamepads();
</span><ins>+    WebPageProxy* platformWebPageProxyForGamepadInput();
</ins><span class="cx"> 
</span><span class="cx">     void platformGamepadConnected(WebCore::PlatformGamepad&amp;) final;
</span><span class="cx">     void platformGamepadDisconnected(WebCore::PlatformGamepad&amp;) final;
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessGamepadmacUIGamepadProviderMacmmfromrev204317trunkSourceWebKit2UIProcessGamepadUIGamepadProviderh"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebKit2/UIProcess/Gamepad/mac/UIGamepadProviderMac.mm (from rev 204317, trunk/Source/WebKit2/UIProcess/Gamepad/UIGamepadProvider.h) (0 => 204318)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/Gamepad/mac/UIGamepadProviderMac.mm                                (rev 0)
+++ trunk/Source/WebKit2/UIProcess/Gamepad/mac/UIGamepadProviderMac.mm        2016-08-10 00:49:34 UTC (rev 204318)
</span><span class="lines">@@ -0,0 +1,55 @@
</span><ins>+/*
+ * Copyright (C) 2016 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#import &quot;config.h&quot;
+#import &quot;UIGamepadProvider.h&quot;
+
+#if ENABLE(GAMEPAD)
+
+#import &quot;WebPageProxy.h&quot;
+#import &quot;WKAPICast.h&quot;
+#import &quot;WKViewInternal.h&quot;
+#import &quot;WKWebViewInternal.h&quot;
+
+namespace WebKit {
+
+WebPageProxy* UIGamepadProvider::platformWebPageProxyForGamepadInput()
+{
+    auto responder = [[NSApp keyWindow] firstResponder];
+
+#if WK_API_ENABLED
+    if ([responder isKindOfClass:[WKWebView class]])
+        return ((WKWebView *)responder)-&gt;_page.get();
+#endif
+
+    if ([responder isKindOfClass:[WKView class]])
+        return toImpl(((WKView *)responder).pageRef);
+
+    return nullptr;
+}
+
+}
+
+#endif // ENABLE(GAMEPAD)
</ins></span></pre></div>
<a id="trunkSourceWebKit2UIProcessWebPageProxycpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp (204317 => 204318)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp        2016-08-10 00:31:38 UTC (rev 204317)
+++ trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp        2016-08-10 00:49:34 UTC (rev 204318)
</span><span class="lines">@@ -5470,6 +5470,15 @@
</span><span class="cx">     m_backForwardList-&gt;clear();
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+#if ENABLE(GAMEPAD)
+
+void WebPageProxy::gamepadActivity(const Vector&lt;GamepadData&gt;&amp; gamepadDatas)
+{
+    m_process-&gt;send(Messages::WebPage::GamepadActivity(gamepadDatas), m_pageID);
+}
+
+#endif
+
</ins><span class="cx"> void WebPageProxy::canAuthenticateAgainstProtectionSpace(uint64_t loaderID, uint64_t frameID, const ProtectionSpace&amp; coreProtectionSpace)
</span><span class="cx"> {
</span><span class="cx"> #if USE(PROTECTION_SPACE_AUTH_CALLBACK)
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessWebPageProxyh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/WebPageProxy.h (204317 => 204318)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/WebPageProxy.h        2016-08-10 00:31:38 UTC (rev 204317)
+++ trunk/Source/WebKit2/UIProcess/WebPageProxy.h        2016-08-10 00:49:34 UTC (rev 204318)
</span><span class="lines">@@ -205,6 +205,7 @@
</span><span class="cx"> struct ColorSpaceData;
</span><span class="cx"> struct EditingRange;
</span><span class="cx"> struct EditorState;
</span><ins>+struct GamepadData;
</ins><span class="cx"> struct LoadParameters;
</span><span class="cx"> struct PlatformPopupMenuData;
</span><span class="cx"> struct PrintInfo;
</span><span class="lines">@@ -1119,6 +1120,10 @@
</span><span class="cx"> 
</span><span class="cx">     void canAuthenticateAgainstProtectionSpace(uint64_t loaderID, uint64_t frameID, const WebCore::ProtectionSpace&amp;);
</span><span class="cx"> 
</span><ins>+#if ENABLE(GAMEPAD)
+    void gamepadActivity(const Vector&lt;GamepadData&gt;&amp;);
+#endif
+
</ins><span class="cx"> private:
</span><span class="cx">     WebPageProxy(PageClient&amp;, WebProcessProxy&amp;, uint64_t pageID, Ref&lt;API::PageConfiguration&gt;&amp;&amp;);
</span><span class="cx">     void platformInitialize();
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessWebProcessPoolcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/WebProcessPool.cpp (204317 => 204318)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/WebProcessPool.cpp        2016-08-10 00:31:38 UTC (rev 204317)
+++ trunk/Source/WebKit2/UIProcess/WebProcessPool.cpp        2016-08-10 00:49:34 UTC (rev 204318)
</span><span class="lines">@@ -1286,14 +1286,6 @@
</span><span class="cx">         process-&gt;send(Messages::WebProcess::GamepadDisconnected(gamepad.index()), 0);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void WebProcessPool::gamepadActivity(const Vector&lt;GamepadData&gt;&amp; gamepadDatas)
-{
-    // FIXME (https://bugs.webkit.org/show_bug.cgi?id=160699)
-    // Only send updates to the process that contains the currently focused web page.
-    for (auto&amp; process : m_processesUsingGamepads)
-        process-&gt;send(Messages::WebProcess::GamepadActivity(gamepadDatas), 0);
-}
-
</del><span class="cx"> #endif // ENABLE(GAMEPAD)
</span><span class="cx"> 
</span><span class="cx"> void WebProcessPool::garbageCollectJavaScriptObjects()
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessWebProcessPoolh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/WebProcessPool.h (204317 => 204318)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/WebProcessPool.h        2016-08-10 00:31:38 UTC (rev 204317)
+++ trunk/Source/WebKit2/UIProcess/WebProcessPool.h        2016-08-10 00:49:34 UTC (rev 204318)
</span><span class="lines">@@ -371,7 +371,6 @@
</span><span class="cx"> #if ENABLE(GAMEPAD)
</span><span class="cx">     void gamepadConnected(const UIGamepad&amp;);
</span><span class="cx">     void gamepadDisconnected(const UIGamepad&amp;);
</span><del>-    void gamepadActivity(const Vector&lt;GamepadData&gt;&amp;);
</del><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx"> private:
</span></span></pre></div>
<a id="trunkSourceWebKit2WebKit2xcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj (204317 => 204318)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj        2016-08-10 00:31:38 UTC (rev 204317)
+++ trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj        2016-08-10 00:49:34 UTC (rev 204318)
</span><span class="lines">@@ -948,6 +948,7 @@
</span><span class="cx">                 515BE1B31D5902DD00DD7C68 /* GamepadData.h in Headers */ = {isa = PBXBuildFile; fileRef = 515BE1B01D59006900DD7C68 /* GamepadData.h */; };
</span><span class="cx">                 515BE1B41D5917FF00DD7C68 /* UIGamepad.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 515BE1AC1D555C5100DD7C68 /* UIGamepad.cpp */; };
</span><span class="cx">                 515BE1B51D5917FF00DD7C68 /* UIGamepad.h in Headers */ = {isa = PBXBuildFile; fileRef = 515BE1AD1D555C5100DD7C68 /* UIGamepad.h */; };
</span><ins>+                515BE1B71D5A94FD00DD7C68 /* UIGamepadProviderMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 515BE1B61D5A94F900DD7C68 /* UIGamepadProviderMac.mm */; };
</ins><span class="cx">                 515E7727183DD6F60007203F /* AsyncRequest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 515E7725183DD6F60007203F /* AsyncRequest.cpp */; };
</span><span class="cx">                 515E7728183DD6F60007203F /* AsyncRequest.h in Headers */ = {isa = PBXBuildFile; fileRef = 515E7726183DD6F60007203F /* AsyncRequest.h */; };
</span><span class="cx">                 515E772B184008B90007203F /* DatabaseProcessCreationParameters.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 515E7729184008B90007203F /* DatabaseProcessCreationParameters.cpp */; };
</span><span class="lines">@@ -3000,6 +3001,7 @@
</span><span class="cx">                 515BE1AD1D555C5100DD7C68 /* UIGamepad.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UIGamepad.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 515BE1B01D59006900DD7C68 /* GamepadData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GamepadData.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 515BE1B11D5902B600DD7C68 /* GamepadData.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = GamepadData.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><ins>+                515BE1B61D5A94F900DD7C68 /* UIGamepadProviderMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = UIGamepadProviderMac.mm; path = UIProcess/Gamepad/mac/UIGamepadProviderMac.mm; sourceTree = SOURCE_ROOT; };
</ins><span class="cx">                 515E7725183DD6F60007203F /* AsyncRequest.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AsyncRequest.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 515E7726183DD6F60007203F /* AsyncRequest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AsyncRequest.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 515E7729184008B90007203F /* DatabaseProcessCreationParameters.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DatabaseProcessCreationParameters.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="lines">@@ -5524,6 +5526,7 @@
</span><span class="cx">                         isa = PBXGroup;
</span><span class="cx">                         children = (
</span><span class="cx">                                 515BE1A61D55293000DD7C68 /* UIGamepadProviderHID.cpp */,
</span><ins>+                                515BE1B61D5A94F900DD7C68 /* UIGamepadProviderMac.mm */,
</ins><span class="cx">                         );
</span><span class="cx">                         name = mac;
</span><span class="cx">                         path = UIProcess/Gamepad/mac;
</span><span class="lines">@@ -9474,6 +9477,7 @@
</span><span class="cx">                                 BCD59800112B57BE00EC8C23 /* WebPreferences.cpp in Sources */,
</span><span class="cx">                                 7C85FD7F19341665000177C4 /* WebPreferencesKeys.cpp in Sources */,
</span><span class="cx">                                 BC84EB1812A7100C0083F2DA /* WebPreferencesMac.mm in Sources */,
</span><ins>+                                515BE1B71D5A94FD00DD7C68 /* UIGamepadProviderMac.mm in Sources */,
</ins><span class="cx">                                 BCD598AD112B7FDF00EC8C23 /* WebPreferencesStore.cpp in Sources */,
</span><span class="cx">                                 BC111AE4112F5C2600337BAB /* WebProcess.cpp in Sources */,
</span><span class="cx">                                 7C6E70FB18B2DC7A00F24E2E /* WebProcessCocoa.mm in Sources */,
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebPageWebPagecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp (204317 => 204318)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp        2016-08-10 00:31:38 UTC (rev 204317)
+++ trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp        2016-08-10 00:49:34 UTC (rev 204318)
</span><span class="lines">@@ -79,6 +79,7 @@
</span><span class="cx"> #include &quot;WebFrameLoaderClient.h&quot;
</span><span class="cx"> #include &quot;WebFullScreenManager.h&quot;
</span><span class="cx"> #include &quot;WebFullScreenManagerMessages.h&quot;
</span><ins>+#include &quot;WebGamepadProvider.h&quot;
</ins><span class="cx"> #include &quot;WebGeolocationClient.h&quot;
</span><span class="cx"> #include &quot;WebImage.h&quot;
</span><span class="cx"> #include &quot;WebInspector.h&quot;
</span><span class="lines">@@ -5463,4 +5464,13 @@
</span><span class="cx">     m_page-&gt;setUserInterfaceLayoutDirection(m_userInterfaceLayoutDirection);
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+#if ENABLE(GAMEPAD)
+
+void WebPage::gamepadActivity(const Vector&lt;GamepadData&gt;&amp; gamepadDatas)
+{
+    WebGamepadProvider::singleton().gamepadActivity(gamepadDatas);
+}
+
+#endif
+
</ins><span class="cx"> } // namespace WebKit
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebPageWebPageh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebPage/WebPage.h (204317 => 204318)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebPage/WebPage.h        2016-08-10 00:31:38 UTC (rev 204317)
+++ trunk/Source/WebKit2/WebProcess/WebPage/WebPage.h        2016-08-10 00:49:34 UTC (rev 204318)
</span><span class="lines">@@ -192,6 +192,7 @@
</span><span class="cx"> struct BackForwardListItemState;
</span><span class="cx"> struct EditingRange;
</span><span class="cx"> struct EditorState;
</span><ins>+struct GamepadData;
</ins><span class="cx"> struct InteractionInformationAtPosition;
</span><span class="cx"> struct LoadParameters;
</span><span class="cx"> struct PrintInfo;
</span><span class="lines">@@ -949,6 +950,10 @@
</span><span class="cx">     std::chrono::system_clock::time_point loadCommitTime() const { return m_loadCommitTime; }
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><ins>+#if ENABLE(GAMEPAD)
+    void gamepadActivity(const Vector&lt;GamepadData&gt;&amp;);
+#endif
+
</ins><span class="cx"> private:
</span><span class="cx">     WebPage(uint64_t pageID, const WebPageCreationParameters&amp;);
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebPageWebPagemessagesin"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebPage/WebPage.messages.in (204317 => 204318)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebPage/WebPage.messages.in        2016-08-10 00:31:38 UTC (rev 204317)
+++ trunk/Source/WebKit2/WebProcess/WebPage/WebPage.messages.in        2016-08-10 00:49:34 UTC (rev 204318)
</span><span class="lines">@@ -433,4 +433,8 @@
</span><span class="cx">     SetResourceCachingDisabled(bool disabled)
</span><span class="cx"> 
</span><span class="cx">     SetUserInterfaceLayoutDirection(uint32_t direction)
</span><ins>+
+#if ENABLE(GAMEPAD)
+    GamepadActivity(Vector&lt;WebKit::GamepadData&gt; gamepadDatas)
+#endif
</ins><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebProcesscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebProcess.cpp (204317 => 204318)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebProcess.cpp        2016-08-10 00:31:38 UTC (rev 204317)
+++ trunk/Source/WebKit2/WebProcess/WebProcess.cpp        2016-08-10 00:49:34 UTC (rev 204318)
</span><span class="lines">@@ -1042,11 +1042,6 @@
</span><span class="cx">     WebGamepadProvider::singleton().gamepadDisconnected(index);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void WebProcess::gamepadActivity(const Vector&lt;GamepadData&gt;&amp; gamepadDatas)
-{
-    WebGamepadProvider::singleton().gamepadActivity(gamepadDatas);
-}
-
</del><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx"> void WebProcess::setJavaScriptGarbageCollectorTimerEnabled(bool flag)
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebProcessh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebProcess.h (204317 => 204318)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebProcess.h        2016-08-10 00:31:38 UTC (rev 204317)
+++ trunk/Source/WebKit2/WebProcess/WebProcess.h        2016-08-10 00:49:34 UTC (rev 204318)
</span><span class="lines">@@ -279,7 +279,6 @@
</span><span class="cx"> #if ENABLE(GAMEPAD)
</span><span class="cx">     void gamepadConnected(const GamepadData&amp;);
</span><span class="cx">     void gamepadDisconnected(unsigned index);
</span><del>-    void gamepadActivity(const Vector&lt;GamepadData&gt;&amp;);
</del><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx">     void releasePageCache();
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebProcessmessagesin"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebProcess.messages.in (204317 => 204318)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebProcess.messages.in        2016-08-10 00:31:38 UTC (rev 204317)
+++ trunk/Source/WebKit2/WebProcess/WebProcess.messages.in        2016-08-10 00:49:34 UTC (rev 204318)
</span><span class="lines">@@ -105,6 +105,5 @@
</span><span class="cx"> #if ENABLE(GAMEPAD)
</span><span class="cx">     GamepadConnected(struct WebKit::GamepadData gamepadData)
</span><span class="cx">     GamepadDisconnected(unsigned index)
</span><del>-    GamepadActivity(Vector&lt;WebKit::GamepadData&gt; gamepadDatas)
</del><span class="cx"> #endif
</span><span class="cx"> }
</span></span></pre>
</div>
</div>

</body>
</html>