<!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>[194646] trunk/Source</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/194646">194646</a></dd>
<dt>Author</dt> <dd>bburg@apple.com</dd>
<dt>Date</dt> <dd>2016-01-06 10:49:17 -0800 (Wed, 06 Jan 2016)</dd>
</dl>

<h3>Log Message</h3>
<pre>Add a WebKit SPI for registering an automation controller with RemoteInspector
https://bugs.webkit.org/show_bug.cgi?id=151576

Reviewed by Dan Bernstein and Joseph Pecoraro.

Source/JavaScriptCore:

Given a RemoteInspector endpoint that is instantiated in UIProcess, there
should be a way to delegate automation-related functionality and policy to
clients of WebKit.

This class adds a RemoteInspector::Client interface that serves a delegate.
This is ultimately delegated via _WKAutomationDelegate, which is an SPI
that allows clients to install an Objective-C delegate for automation.

The setting for whether remote automation is allowed is included in the
listing that RemoteInspector sends out. It is updated when RemoteInspector::Client
is assigned, or when the client signals that its capabilities have changed.

* inspector/remote/RemoteInspector.h:
* inspector/remote/RemoteInspector.mm:
(Inspector::RemoteInspector::setRemoteInspectorClient): Added.
(Inspector::RemoteInspector::pushListingsNow):

    In the listing, include whether the application supports remote automation.

* inspector/remote/RemoteInspectorConstants.h: Add a constant.

Source/WebKit2:

_WKAutomationDelegate is a new SPI that allows WKProcessPool clients to decide
policy and implement actions for remote automation.

The SPI's implementation connects the client's delegate to RemoteInspector::Client.
This allows the delegate to handle some commands, such as requestAutomationSession,
that come over XPC from an external test runner but are not associated with a specific
automation target.

* PlatformMac.cmake:
* UIProcess/API/APIAutomationClient.h: Added. Boilerplate for WebKit::AutomationClient.
(API::AutomationClient::~AutomationClient):
(API::AutomationClient::allowsRemoteAutomation):
(API::AutomationClient::requestAutomationSession):
* UIProcess/API/Cocoa/WKProcessPool.mm:
(-[WKProcessPool _automationDelegate]): Added.
(-[WKProcessPool _setAutomationDelegate:]): Added.
(-[WKProcessPool _automationCapabilitiesDidChange]): Added.
* UIProcess/API/Cocoa/WKProcessPoolPrivate.h: Add delegate.
* UIProcess/API/Cocoa/_WKAutomationDelegate.h: Added.

    This is a new delegate SPI of WKProcessPool; it corresponds to AutomationClient.

* UIProcess/Cocoa/AutomationClient.h: Added.
* UIProcess/Cocoa/AutomationClient.mm: Added.

    This implements a bridge between RemoteInspector::Client and _WKAutomationDelegate.
    Since the delegate can be called from JavaScriptCore, save the delegating
    WKProcessPool and pass it as the self parameter to delegate methods.

(WebKit::AutomationClient::AutomationClient):
(WebKit::AutomationClient::~AutomationClient):

    This client automatically registers and unregisters as a RemoteInspector::Client.

(WebKit::AutomationClient::remoteAutomationAllowed):
(WebKit::AutomationClient::requestAutomationSession):

    Forward requests from RemoteInspector to the automation delegate.

* UIProcess/WebProcessPool.cpp:
(WebKit::WebProcessPool::WebProcessPool):
(WebKit::WebProcessPool::setAutomationClient): Added.
(WebKit::WebProcessPool::updateAutomationCapabilities): Added, it notifies RemoteInspector.
* UIProcess/WebProcessPool.h:
* WebKit2.xcodeproj/project.pbxproj:</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceJavaScriptCoreChangeLog">trunk/Source/JavaScriptCore/ChangeLog</a></li>
<li><a href="#trunkSourceJavaScriptCoreinspectorremoteRemoteInspectorh">trunk/Source/JavaScriptCore/inspector/remote/RemoteInspector.h</a></li>
<li><a href="#trunkSourceJavaScriptCoreinspectorremoteRemoteInspectormm">trunk/Source/JavaScriptCore/inspector/remote/RemoteInspector.mm</a></li>
<li><a href="#trunkSourceJavaScriptCoreinspectorremoteRemoteInspectorConstantsh">trunk/Source/JavaScriptCore/inspector/remote/RemoteInspectorConstants.h</a></li>
<li><a href="#trunkSourceWebKit2ChangeLog">trunk/Source/WebKit2/ChangeLog</a></li>
<li><a href="#trunkSourceWebKit2PlatformMaccmake">trunk/Source/WebKit2/PlatformMac.cmake</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPICocoaWKProcessPoolmm">trunk/Source/WebKit2/UIProcess/API/Cocoa/WKProcessPool.mm</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPICocoaWKProcessPoolPrivateh">trunk/Source/WebKit2/UIProcess/API/Cocoa/WKProcessPoolPrivate.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>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkSourceWebKit2UIProcessAPIAPIAutomationClienth">trunk/Source/WebKit2/UIProcess/API/APIAutomationClient.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPICocoa_WKAutomationDelegateh">trunk/Source/WebKit2/UIProcess/API/Cocoa/_WKAutomationDelegate.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessCocoaAutomationClienth">trunk/Source/WebKit2/UIProcess/Cocoa/AutomationClient.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessCocoaAutomationClientmm">trunk/Source/WebKit2/UIProcess/Cocoa/AutomationClient.mm</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceJavaScriptCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/ChangeLog (194645 => 194646)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/ChangeLog        2016-01-06 18:34:02 UTC (rev 194645)
+++ trunk/Source/JavaScriptCore/ChangeLog        2016-01-06 18:49:17 UTC (rev 194646)
</span><span class="lines">@@ -1,3 +1,31 @@
</span><ins>+2016-01-06  Brian Burg  &lt;bburg@apple.com&gt;
+
+        Add a WebKit SPI for registering an automation controller with RemoteInspector
+        https://bugs.webkit.org/show_bug.cgi?id=151576
+
+        Reviewed by Dan Bernstein and Joseph Pecoraro.
+
+        Given a RemoteInspector endpoint that is instantiated in UIProcess, there
+        should be a way to delegate automation-related functionality and policy to
+        clients of WebKit.
+
+        This class adds a RemoteInspector::Client interface that serves a delegate.
+        This is ultimately delegated via _WKAutomationDelegate, which is an SPI
+        that allows clients to install an Objective-C delegate for automation.
+
+        The setting for whether remote automation is allowed is included in the
+        listing that RemoteInspector sends out. It is updated when RemoteInspector::Client
+        is assigned, or when the client signals that its capabilities have changed.
+
+        * inspector/remote/RemoteInspector.h:
+        * inspector/remote/RemoteInspector.mm:
+        (Inspector::RemoteInspector::setRemoteInspectorClient): Added.
+        (Inspector::RemoteInspector::pushListingsNow):
+
+            In the listing, include whether the application supports remote automation.
+
+        * inspector/remote/RemoteInspectorConstants.h: Add a constant.
+
</ins><span class="cx"> 2016-01-05  Keith Miller  &lt;keith_miller@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         [ES6] Boolean, Number, Map, RegExp, and Set should be subclassable
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreinspectorremoteRemoteInspectorh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/inspector/remote/RemoteInspector.h (194645 => 194646)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/inspector/remote/RemoteInspector.h        2016-01-06 18:34:02 UTC (rev 194645)
+++ trunk/Source/JavaScriptCore/inspector/remote/RemoteInspector.h        2016-01-06 18:49:17 UTC (rev 194646)
</span><span class="lines">@@ -1,5 +1,5 @@
</span><span class="cx"> /*
</span><del>- * Copyright (C) 2013, 2015 Apple Inc. All Rights Reserved.
</del><ins>+ * Copyright (C) 2013, 2015, 2016 Apple Inc. All Rights Reserved.
</ins><span class="cx">  *
</span><span class="cx">  * Redistribution and use in source and binary forms, with or without
</span><span class="cx">  * modification, are permitted provided that the following conditions
</span><span class="lines">@@ -48,6 +48,13 @@
</span><span class="cx"> 
</span><span class="cx"> class JS_EXPORT_PRIVATE RemoteInspector final : public RemoteInspectorXPCConnection::Client {
</span><span class="cx"> public:
</span><ins>+    class Client {
+    public:
+        virtual ~Client() { }
+        virtual bool remoteAutomationAllowed() const = 0;
+        virtual void requestAutomationSession() = 0;
+    };
+
</ins><span class="cx">     static void startDisabled();
</span><span class="cx">     static RemoteInspector&amp; singleton();
</span><span class="cx">     friend class NeverDestroyed&lt;RemoteInspector&gt;;
</span><span class="lines">@@ -58,10 +65,12 @@
</span><span class="cx">     void sendMessageToRemote(unsigned identifier, const String&amp; message);
</span><span class="cx"> 
</span><span class="cx">     void updateAutomaticInspectionCandidate(RemoteInspectionTarget*);
</span><ins>+    void setRemoteInspectorClient(RemoteInspector::Client*);
</ins><span class="cx"> 
</span><span class="cx">     void setupFailed(unsigned identifier);
</span><span class="cx">     void setupCompleted(unsigned identifier);
</span><span class="cx">     bool waitingForAutomaticInspection(unsigned identifier);
</span><ins>+    void clientCapabilitiesDidChange() { pushListingsSoon(); }
</ins><span class="cx"> 
</span><span class="cx">     bool enabled() const { return m_enabled; }
</span><span class="cx">     bool hasActiveDebugSession() const { return m_hasActiveDebugSession; }
</span><span class="lines">@@ -123,6 +132,8 @@
</span><span class="cx"> 
</span><span class="cx">     RefPtr&lt;RemoteInspectorXPCConnection&gt; m_xpcConnection;
</span><span class="cx"> 
</span><ins>+    RemoteInspector::Client* m_client { nullptr };
+
</ins><span class="cx">     dispatch_queue_t m_xpcQueue;
</span><span class="cx">     unsigned m_nextAvailableIdentifier { 1 };
</span><span class="cx">     int m_notifyToken { 0 };
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreinspectorremoteRemoteInspectormm"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/inspector/remote/RemoteInspector.mm (194645 => 194646)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/inspector/remote/RemoteInspector.mm        2016-01-06 18:34:02 UTC (rev 194645)
+++ trunk/Source/JavaScriptCore/inspector/remote/RemoteInspector.mm        2016-01-06 18:49:17 UTC (rev 194646)
</span><span class="lines">@@ -1,5 +1,5 @@
</span><span class="cx"> /*
</span><del>- * Copyright (C) 2013-2015 Apple Inc. All Rights Reserved.
</del><ins>+ * Copyright (C) 2013-2016 Apple Inc. All Rights Reserved.
</ins><span class="cx">  *
</span><span class="cx">  * Redistribution and use in source and binary forms, with or without
</span><span class="cx">  * modification, are permitted provided that the following conditions
</span><span class="lines">@@ -238,6 +238,18 @@
</span><span class="cx">     }
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+void RemoteInspector::setRemoteInspectorClient(RemoteInspector::Client* client)
+{
+    ASSERT_ARG(client, client);
+    ASSERT(!m_client);
+
+    std::lock_guard&lt;Lock&gt; lock(m_mutex);
+    m_client = client;
+
+    // Send an updated listing that includes whether the client allows remote automation.
+    pushListingsSoon();
+}
+
</ins><span class="cx"> void RemoteInspector::sendAutomaticInspectionCandidateMessage()
</span><span class="cx"> {
</span><span class="cx">     ASSERT(m_enabled);
</span><span class="lines">@@ -544,6 +556,9 @@
</span><span class="cx">     RetainPtr&lt;NSMutableDictionary&gt; message = adoptNS([[NSMutableDictionary alloc] init]);
</span><span class="cx">     [message setObject:listings.get() forKey:WIRListingKey];
</span><span class="cx"> 
</span><ins>+    BOOL isAllowed = m_client &amp;&amp; m_client-&gt;remoteAutomationAllowed();
+    [message setObject:@(isAllowed) forKey:WIRRemoteAutomationEnabledKey];
+
</ins><span class="cx">     m_xpcConnection-&gt;sendMessage(WIRListingMessage, message.get());
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreinspectorremoteRemoteInspectorConstantsh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/inspector/remote/RemoteInspectorConstants.h (194645 => 194646)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/inspector/remote/RemoteInspectorConstants.h        2016-01-06 18:34:02 UTC (rev 194645)
+++ trunk/Source/JavaScriptCore/inspector/remote/RemoteInspectorConstants.h        2016-01-06 18:49:17 UTC (rev 194646)
</span><span class="lines">@@ -1,5 +1,5 @@
</span><span class="cx"> /*
</span><del>- * Copyright (C) 2011 Apple Inc. All Rights Reserved.
</del><ins>+ * Copyright (C) 2011, 2016 Apple Inc. All Rights Reserved.
</ins><span class="cx">  *
</span><span class="cx">  * Redistribution and use in source and binary forms, with or without
</span><span class="cx">  * modification, are permitted provided that the following conditions
</span><span class="lines">@@ -67,6 +67,7 @@
</span><span class="cx"> #define WIRRawDataKey                           @&quot;WIRRawDataKey&quot;
</span><span class="cx"> #define WIRListingMessage                       @&quot;WIRListingMessage&quot;
</span><span class="cx"> #define WIRListingKey                           @&quot;WIRListingKey&quot;
</span><ins>+#define WIRRemoteAutomationEnabledKey           @&quot;WIRRemoteAutomationEnabledKey&quot;
</ins><span class="cx"> #define WIRDestinationKey                       @&quot;WIRDestinationKey&quot;
</span><span class="cx"> #define WIRConnectionDiedMessage                @&quot;WIRConnectionDiedMessage&quot;
</span><span class="cx"> #define WIRTypeKey                              @&quot;WIRTypeKey&quot;
</span></span></pre></div>
<a id="trunkSourceWebKit2ChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/ChangeLog (194645 => 194646)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/ChangeLog        2016-01-06 18:34:02 UTC (rev 194645)
+++ trunk/Source/WebKit2/ChangeLog        2016-01-06 18:49:17 UTC (rev 194646)
</span><span class="lines">@@ -1,3 +1,56 @@
</span><ins>+2016-01-06  Brian Burg  &lt;bburg@apple.com&gt;
+
+        Add a WebKit SPI for registering an automation controller with RemoteInspector
+        https://bugs.webkit.org/show_bug.cgi?id=151576
+
+        Reviewed by Dan Bernstein and Joseph Pecoraro.
+
+        _WKAutomationDelegate is a new SPI that allows WKProcessPool clients to decide
+        policy and implement actions for remote automation.
+
+        The SPI's implementation connects the client's delegate to RemoteInspector::Client.
+        This allows the delegate to handle some commands, such as requestAutomationSession,
+        that come over XPC from an external test runner but are not associated with a specific
+        automation target.
+
+        * PlatformMac.cmake:
+        * UIProcess/API/APIAutomationClient.h: Added. Boilerplate for WebKit::AutomationClient.
+        (API::AutomationClient::~AutomationClient):
+        (API::AutomationClient::allowsRemoteAutomation):
+        (API::AutomationClient::requestAutomationSession):
+        * UIProcess/API/Cocoa/WKProcessPool.mm:
+        (-[WKProcessPool _automationDelegate]): Added.
+        (-[WKProcessPool _setAutomationDelegate:]): Added.
+        (-[WKProcessPool _automationCapabilitiesDidChange]): Added.
+        * UIProcess/API/Cocoa/WKProcessPoolPrivate.h: Add delegate.
+        * UIProcess/API/Cocoa/_WKAutomationDelegate.h: Added.
+
+            This is a new delegate SPI of WKProcessPool; it corresponds to AutomationClient.
+
+        * UIProcess/Cocoa/AutomationClient.h: Added.
+        * UIProcess/Cocoa/AutomationClient.mm: Added.
+
+            This implements a bridge between RemoteInspector::Client and _WKAutomationDelegate.
+            Since the delegate can be called from JavaScriptCore, save the delegating
+            WKProcessPool and pass it as the self parameter to delegate methods.
+
+        (WebKit::AutomationClient::AutomationClient):
+        (WebKit::AutomationClient::~AutomationClient):
+
+            This client automatically registers and unregisters as a RemoteInspector::Client.
+
+        (WebKit::AutomationClient::remoteAutomationAllowed):
+        (WebKit::AutomationClient::requestAutomationSession):
+
+            Forward requests from RemoteInspector to the automation delegate.
+
+        * UIProcess/WebProcessPool.cpp:
+        (WebKit::WebProcessPool::WebProcessPool):
+        (WebKit::WebProcessPool::setAutomationClient): Added.
+        (WebKit::WebProcessPool::updateAutomationCapabilities): Added, it notifies RemoteInspector.
+        * UIProcess/WebProcessPool.h:
+        * WebKit2.xcodeproj/project.pbxproj:
+
</ins><span class="cx"> 2016-01-06  Gyuyoung Kim  &lt;gyuyoung.kim@webkit.org&gt;
</span><span class="cx"> 
</span><span class="cx">         [EFL] Set WebKit2 process output name
</span></span></pre></div>
<a id="trunkSourceWebKit2PlatformMaccmake"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/PlatformMac.cmake (194645 => 194646)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/PlatformMac.cmake        2016-01-06 18:34:02 UTC (rev 194645)
+++ trunk/Source/WebKit2/PlatformMac.cmake        2016-01-06 18:49:17 UTC (rev 194646)
</span><span class="lines">@@ -189,6 +189,7 @@
</span><span class="cx"> 
</span><span class="cx">     UIProcess/API/mac/WKView.mm
</span><span class="cx"> 
</span><ins>+    UIProcess/Cocoa/AutomationClient.mm
</ins><span class="cx">     UIProcess/Cocoa/DiagnosticLoggingClient.mm
</span><span class="cx">     UIProcess/Cocoa/DownloadClient.mm
</span><span class="cx">     UIProcess/Cocoa/FindClient.mm
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPIAPIAutomationClienth"></a>
<div class="addfile"><h4>Added: trunk/Source/WebKit2/UIProcess/API/APIAutomationClient.h (0 => 194646)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/APIAutomationClient.h                                (rev 0)
+++ trunk/Source/WebKit2/UIProcess/API/APIAutomationClient.h        2016-01-06 18:49:17 UTC (rev 194646)
</span><span class="lines">@@ -0,0 +1,45 @@
</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.
+ */
+
+#ifndef APIAutomationClient_h
+#define APIAutomationClient_h
+
+namespace WebKit {
+class WebProcessPool;
+}
+
+namespace API {
+
+class AutomationClient {
+public:
+    virtual ~AutomationClient() { }
+
+    virtual bool allowsRemoteAutomation(WebKit::WebProcessPool*) { return false; }
+    virtual void requestAutomationSession(WebKit::WebProcessPool*) { }
+};
+
+} // namespace API
+
+#endif // APIAutomationClient_h
</ins></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPICocoaWKProcessPoolmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/Cocoa/WKProcessPool.mm (194645 => 194646)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/Cocoa/WKProcessPool.mm        2016-01-06 18:34:02 UTC (rev 194645)
+++ trunk/Source/WebKit2/UIProcess/API/Cocoa/WKProcessPool.mm        2016-01-06 18:49:17 UTC (rev 194646)
</span><span class="lines">@@ -1,5 +1,5 @@
</span><span class="cx"> /*
</span><del>- * Copyright (C) 2014 Apple Inc. All rights reserved.
</del><ins>+ * Copyright (C) 2014, 2016 Apple Inc. All rights reserved.
</ins><span class="cx">  *
</span><span class="cx">  * Redistribution and use in source and binary forms, with or without
</span><span class="cx">  * modification, are permitted provided that the following conditions
</span><span class="lines">@@ -28,6 +28,7 @@
</span><span class="cx"> 
</span><span class="cx"> #if WK_API_ENABLED
</span><span class="cx"> 
</span><ins>+#import &quot;AutomationClient.h&quot;
</ins><span class="cx"> #import &quot;CacheModel.h&quot;
</span><span class="cx"> #import &quot;DownloadClient.h&quot;
</span><span class="cx"> #import &quot;SandboxUtilities.h&quot;
</span><span class="lines">@@ -37,6 +38,7 @@
</span><span class="cx"> #import &quot;WebCookieManagerProxy.h&quot;
</span><span class="cx"> #import &quot;WebProcessMessages.h&quot;
</span><span class="cx"> #import &quot;WebProcessPool.h&quot;
</span><ins>+#import &quot;_WKAutomationDelegate.h&quot;
</ins><span class="cx"> #import &quot;_WKDownloadDelegate.h&quot;
</span><span class="cx"> #import &quot;_WKProcessPoolConfigurationInternal.h&quot;
</span><span class="cx"> #import &lt;WebCore/CFNetworkSPI.h&gt;
</span><span class="lines">@@ -49,6 +51,7 @@
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx"> @implementation WKProcessPool {
</span><ins>+    WebKit::WeakObjCPtr&lt;id &lt;_WKAutomationDelegate&gt;&gt; _automationDelegate;
</ins><span class="cx">     WebKit::WeakObjCPtr&lt;id &lt;_WKDownloadDelegate&gt;&gt; _downloadDelegate;
</span><span class="cx"> 
</span><span class="cx"> #if PLATFORM(IOS)
</span><span class="lines">@@ -219,11 +222,27 @@
</span><span class="cx">     _processPool-&gt;setDownloadClient(std::make_unique&lt;WebKit::DownloadClient&gt;(downloadDelegate));
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+- (id &lt;_WKAutomationDelegate&gt;)_automationDelegate
+{
+    return _automationDelegate.getAutoreleased();
+}
+
+- (void)_setAutomationDelegate:(id &lt;_WKAutomationDelegate&gt;)automationDelegate
+{
+    _automationDelegate = automationDelegate;
+    _processPool-&gt;setAutomationClient(std::make_unique&lt;WebKit::AutomationClient&gt;(self, automationDelegate));
+}
+
</ins><span class="cx"> - (void)_warmInitialProcess
</span><span class="cx"> {
</span><span class="cx">     _processPool-&gt;warmInitialProcess();
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+- (void)_automationCapabilitiesDidChange
+{
+    _processPool-&gt;updateAutomationCapabilities();
+}
+
</ins><span class="cx"> @end
</span><span class="cx"> 
</span><span class="cx"> #endif // WK_API_ENABLED
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPICocoaWKProcessPoolPrivateh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/Cocoa/WKProcessPoolPrivate.h (194645 => 194646)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/Cocoa/WKProcessPoolPrivate.h        2016-01-06 18:34:02 UTC (rev 194645)
+++ trunk/Source/WebKit2/UIProcess/API/Cocoa/WKProcessPoolPrivate.h        2016-01-06 18:49:17 UTC (rev 194646)
</span><span class="lines">@@ -28,6 +28,7 @@
</span><span class="cx"> #if WK_API_ENABLED
</span><span class="cx"> 
</span><span class="cx"> @class _WKProcessPoolConfiguration;
</span><ins>+@protocol _WKAutomationDelegate;
</ins><span class="cx"> @protocol _WKDownloadDelegate;
</span><span class="cx"> 
</span><span class="cx"> @interface WKProcessPool ()
</span><span class="lines">@@ -48,11 +49,13 @@
</span><span class="cx"> - (void)_setObjectsForBundleParametersWithDictionary:(NSDictionary *)dictionary WK_AVAILABLE(WK_MAC_TBA, WK_IOS_TBA);
</span><span class="cx"> 
</span><span class="cx"> @property (nonatomic, weak, setter=_setDownloadDelegate:) id &lt;_WKDownloadDelegate&gt; _downloadDelegate;
</span><ins>+@property (nonatomic, weak, setter=_setAutomationDelegate:) id &lt;_WKAutomationDelegate&gt; _automationDelegate WK_AVAILABLE(WK_MAC_TBA, WK_IOS_TBA);
</ins><span class="cx"> 
</span><span class="cx"> + (NSURL *)_websiteDataURLForContainerWithURL:(NSURL *)containerURL;
</span><span class="cx"> + (NSURL *)_websiteDataURLForContainerWithURL:(NSURL *)containerURL bundleIdentifierIfNotInContainer:(NSString *)bundleIdentifier;
</span><span class="cx"> 
</span><span class="cx"> - (void)_warmInitialProcess WK_AVAILABLE(WK_MAC_TBA, WK_IOS_TBA);
</span><ins>+- (void)_automationCapabilitiesDidChange WK_AVAILABLE(WK_MAC_TBA, WK_IOS_TBA);
</ins><span class="cx"> 
</span><span class="cx"> @end
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPICocoa_WKAutomationDelegateh"></a>
<div class="addfile"><h4>Added: trunk/Source/WebKit2/UIProcess/API/Cocoa/_WKAutomationDelegate.h (0 => 194646)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/Cocoa/_WKAutomationDelegate.h                                (rev 0)
+++ trunk/Source/WebKit2/UIProcess/API/Cocoa/_WKAutomationDelegate.h        2016-01-06 18:49:17 UTC (rev 194646)
</span><span class="lines">@@ -0,0 +1,38 @@
</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 &lt;WebKit/WKFoundation.h&gt;
+
+#if WK_API_ENABLED
+
+@class WKProcessPool;
+
+@protocol _WKAutomationDelegate &lt;NSObject&gt;
+@optional
+- (BOOL)_processPoolAllowsRemoteAutomation:(WKProcessPool *)processPool;
+- (void)_processPoolDidRequestAutomationSession:(WKProcessPool *)processPool;
+@end
+
+#endif // WK_API_ENABLED
</ins></span></pre></div>
<a id="trunkSourceWebKit2UIProcessCocoaAutomationClienth"></a>
<div class="addfile"><h4>Added: trunk/Source/WebKit2/UIProcess/Cocoa/AutomationClient.h (0 => 194646)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/Cocoa/AutomationClient.h                                (rev 0)
+++ trunk/Source/WebKit2/UIProcess/Cocoa/AutomationClient.h        2016-01-06 18:49:17 UTC (rev 194646)
</span><span class="lines">@@ -0,0 +1,69 @@
</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;WKFoundation.h&quot;
+
+#if WK_API_ENABLED
+
+#if ENABLE(REMOTE_INSPECTOR)
+
+#import &quot;APIAutomationClient.h&quot;
+#import &quot;WeakObjCPtr.h&quot;
+#import &lt;JavaScriptCore/RemoteInspector.h&gt;
+
+@class WKProcessPool;
+
+@protocol _WKAutomationDelegate;
+
+namespace WebKit {
+
+class AutomationClient final : public API::AutomationClient, Inspector::RemoteInspector::Client {
+public:
+    explicit AutomationClient(WKProcessPool *, id &lt;_WKAutomationDelegate&gt;);
+    virtual ~AutomationClient();
+
+private:
+    // API::AutomationClient
+    virtual bool allowsRemoteAutomation(WebProcessPool*) override { return remoteAutomationAllowed(); }
+    virtual void requestAutomationSession(WebProcessPool*) override { requestAutomationSession(); }
+
+    // RemoteInspector::Client
+    virtual bool remoteAutomationAllowed() const override;
+    virtual void requestAutomationSession() override;
+
+    WKProcessPool *m_processPool;
+    WeakObjCPtr&lt;id &lt;_WKAutomationDelegate&gt;&gt; m_delegate;
+
+    struct {
+        bool allowsRemoteAutomation : 1;
+        bool requestAutomationSession : 1;
+    } m_delegateMethods;
+};
+
+} // namespace WebKit
+
+#endif // ENABLE(REMOTE_INSPECTOR)
+
+#endif // WK_API_ENABLED
</ins></span></pre></div>
<a id="trunkSourceWebKit2UIProcessCocoaAutomationClientmm"></a>
<div class="addfile"><h4>Added: trunk/Source/WebKit2/UIProcess/Cocoa/AutomationClient.mm (0 => 194646)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/Cocoa/AutomationClient.mm                                (rev 0)
+++ trunk/Source/WebKit2/UIProcess/Cocoa/AutomationClient.mm        2016-01-06 18:49:17 UTC (rev 194646)
</span><span class="lines">@@ -0,0 +1,74 @@
</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;AutomationClient.h&quot;
+
+#if WK_API_ENABLED
+
+#if ENABLE(REMOTE_INSPECTOR)
+
+#import &quot;WKProcessPool.h&quot;
+#import &quot;_WKAutomationDelegate.h&quot;
+#import &lt;JavaScriptCore/RemoteInspector.h&gt;
+
+using namespace Inspector;
+
+namespace WebKit {
+
+AutomationClient::AutomationClient(WKProcessPool *processPool, id &lt;_WKAutomationDelegate&gt; delegate)
+    : m_processPool(processPool)
+    , m_delegate(delegate)
+{
+    m_delegateMethods.allowsRemoteAutomation = [delegate respondsToSelector:@selector(_processPoolAllowsRemoteAutomation:)];
+    m_delegateMethods.requestAutomationSession = [delegate respondsToSelector:@selector(_processPoolDidRequestAutomationSession:)];
+
+    RemoteInspector::singleton().setRemoteInspectorClient(this);
+}
+
+AutomationClient::~AutomationClient()
+{
+    RemoteInspector::singleton().setRemoteInspectorClient(nullptr);
+}
+
+bool AutomationClient::remoteAutomationAllowed() const
+{
+    if (m_delegateMethods.allowsRemoteAutomation)
+        return [m_delegate.get() _processPoolAllowsRemoteAutomation:m_processPool];
+
+    return false;
+}
+
+void AutomationClient::requestAutomationSession()
+{
+    if (m_delegateMethods.requestAutomationSession)
+        [m_delegate.get() _processPoolDidRequestAutomationSession:m_processPool];
+}
+
+} // namespace WebKit
+
+#endif // ENABLE(REMOTE_INSPECTOR)
+
+#endif // WK_API_ENABLED
</ins></span></pre></div>
<a id="trunkSourceWebKit2UIProcessWebProcessPoolcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/WebProcessPool.cpp (194645 => 194646)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/WebProcessPool.cpp        2016-01-06 18:34:02 UTC (rev 194645)
+++ trunk/Source/WebKit2/UIProcess/WebProcessPool.cpp        2016-01-06 18:49:17 UTC (rev 194646)
</span><span class="lines">@@ -27,6 +27,7 @@
</span><span class="cx"> #include &quot;WebProcessPool.h&quot;
</span><span class="cx"> 
</span><span class="cx"> #include &quot;APIArray.h&quot;
</span><ins>+#include &quot;APIAutomationClient.h&quot;
</ins><span class="cx"> #include &quot;APIDownloadClient.h&quot;
</span><span class="cx"> #include &quot;APILegacyContextHistoryClient.h&quot;
</span><span class="cx"> #include &quot;APIPageConfiguration.h&quot;
</span><span class="lines">@@ -138,6 +139,7 @@
</span><span class="cx">     , m_haveInitialEmptyProcess(false)
</span><span class="cx">     , m_processWithPageCache(0)
</span><span class="cx">     , m_defaultPageGroup(WebPageGroup::createNonNull())
</span><ins>+    , m_automationClient(std::make_unique&lt;API::AutomationClient&gt;())
</ins><span class="cx">     , m_downloadClient(std::make_unique&lt;API::DownloadClient&gt;())
</span><span class="cx">     , m_historyClient(std::make_unique&lt;API::LegacyContextHistoryClient&gt;())
</span><span class="cx">     , m_visitedLinkStore(VisitedLinkStore::create())
</span><span class="lines">@@ -277,6 +279,14 @@
</span><span class="cx">         m_downloadClient = WTFMove(downloadClient);
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+void WebProcessPool::setAutomationClient(std::unique_ptr&lt;API::AutomationClient&gt; automationClient)
+{
+    if (!automationClient)
+        m_automationClient = std::make_unique&lt;API::AutomationClient&gt;();
+    else
+        m_automationClient = WTFMove(automationClient);
+}
+
</ins><span class="cx"> void WebProcessPool::setMaximumNumberOfProcesses(unsigned maximumNumberOfProcesses)
</span><span class="cx"> {
</span><span class="cx">     // Guard against API misuse.
</span><span class="lines">@@ -1065,6 +1075,13 @@
</span><span class="cx">         m_networkProcess-&gt;send(Messages::NetworkProcess::AllowSpecificHTTPSCertificateForHost(certificate-&gt;certificateInfo(), host), 0);
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+void WebProcessPool::updateAutomationCapabilities() const
+{
+#if ENABLE(REMOTE_INSPECTOR)
+    Inspector::RemoteInspector::singleton().clientCapabilitiesDidChange();
+#endif
+}
+
</ins><span class="cx"> void WebProcessPool::setHTTPPipeliningEnabled(bool enabled)
</span><span class="cx"> {
</span><span class="cx"> #if PLATFORM(COCOA)
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessWebProcessPoolh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/WebProcessPool.h (194645 => 194646)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/WebProcessPool.h        2016-01-06 18:34:02 UTC (rev 194645)
+++ trunk/Source/WebKit2/UIProcess/WebProcessPool.h        2016-01-06 18:49:17 UTC (rev 194646)
</span><span class="lines">@@ -70,6 +70,7 @@
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx"> namespace API {
</span><ins>+class AutomationClient;
</ins><span class="cx"> class DownloadClient;
</span><span class="cx"> class LegacyContextHistoryClient;
</span><span class="cx"> class PageConfiguration;
</span><span class="lines">@@ -134,6 +135,7 @@
</span><span class="cx">     void initializeConnectionClient(const WKContextConnectionClientBase*);
</span><span class="cx">     void setHistoryClient(std::unique_ptr&lt;API::LegacyContextHistoryClient&gt;);
</span><span class="cx">     void setDownloadClient(std::unique_ptr&lt;API::DownloadClient&gt;);
</span><ins>+    void setAutomationClient(std::unique_ptr&lt;API::AutomationClient&gt;);
</ins><span class="cx"> 
</span><span class="cx">     void setMaximumNumberOfProcesses(unsigned); // Can only be called when there are no processes running.
</span><span class="cx">     unsigned maximumNumberOfProcesses() const { return !m_configuration-&gt;maximumProcessCount() ? UINT_MAX : m_configuration-&gt;maximumProcessCount(); }
</span><span class="lines">@@ -249,6 +251,8 @@
</span><span class="cx">     void disableProcessTermination() { m_processTerminationEnabled = false; }
</span><span class="cx">     void enableProcessTermination();
</span><span class="cx"> 
</span><ins>+    void updateAutomationCapabilities() const;
+
</ins><span class="cx">     // Defaults to false.
</span><span class="cx">     void setHTTPPipeliningEnabled(bool);
</span><span class="cx">     bool httpPipeliningEnabled() const;
</span><span class="lines">@@ -416,6 +420,7 @@
</span><span class="cx"> 
</span><span class="cx">     WebContextClient m_client;
</span><span class="cx">     WebContextConnectionClient m_connectionClient;
</span><ins>+    std::unique_ptr&lt;API::AutomationClient&gt; m_automationClient;
</ins><span class="cx">     std::unique_ptr&lt;API::DownloadClient&gt; m_downloadClient;
</span><span class="cx">     std::unique_ptr&lt;API::LegacyContextHistoryClient&gt; m_historyClient;
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebKit2WebKit2xcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj (194645 => 194646)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj        2016-01-06 18:34:02 UTC (rev 194645)
+++ trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj        2016-01-06 18:49:17 UTC (rev 194646)
</span><span class="lines">@@ -1247,6 +1247,10 @@
</span><span class="cx">                 93A88B471BC8829700ABA5C2 /* APIHitTestResult.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 93A88B421BC8828C00ABA5C2 /* APIHitTestResult.cpp */; };
</span><span class="cx">                 93BDEB01171DD7AF00BFEE1B /* WKPageLoadTypesPrivate.h in Headers */ = {isa = PBXBuildFile; fileRef = 93BDEB00171DD7AF00BFEE1B /* WKPageLoadTypesPrivate.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">                 93E6A4EE1BC5DD3900F8A0E7 /* _WKHitTestResult.h in Headers */ = {isa = PBXBuildFile; fileRef = 93E6A4ED1BC5DD3900F8A0E7 /* _WKHitTestResult.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><ins>+                99C81D591C20E1E5005C4C82 /* AutomationClient.mm in Sources */ = {isa = PBXBuildFile; fileRef = 99C81D561C20DFBE005C4C82 /* AutomationClient.mm */; };
+                99C81D5A1C20E7E2005C4C82 /* AutomationClient.h in Headers */ = {isa = PBXBuildFile; fileRef = 99C81D551C20DFBE005C4C82 /* AutomationClient.h */; };
+                99C81D5D1C21F38B005C4C82 /* APIAutomationClient.h in Headers */ = {isa = PBXBuildFile; fileRef = 99C81D5B1C20E817005C4C82 /* APIAutomationClient.h */; };
+                99E714C51C124A0400665B3A /* _WKAutomationDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = 99E714C11C1249E600665B3A /* _WKAutomationDelegate.h */; settings = {ATTRIBUTES = (Private, ); }; };
</ins><span class="cx">                 9F54F88F16488E87007DF81A /* ChildProcessMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 9F54F88E16488E87007DF81A /* ChildProcessMac.mm */; };
</span><span class="cx">                 9F54F8951648AE0F007DF81A /* PluginProcessManagerMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 9F54F8941648AE0E007DF81A /* PluginProcessManagerMac.mm */; };
</span><span class="cx">                 9FB5F394169E6A80002C25BF /* WKContextPrivateMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 9FB5F392169E6A80002C25BF /* WKContextPrivateMac.mm */; };
</span><span class="lines">@@ -3442,6 +3446,10 @@
</span><span class="cx">                 93A88B431BC8828C00ABA5C2 /* APIHitTestResult.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = APIHitTestResult.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 93BDEB00171DD7AF00BFEE1B /* WKPageLoadTypesPrivate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKPageLoadTypesPrivate.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 93E6A4ED1BC5DD3900F8A0E7 /* _WKHitTestResult.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = _WKHitTestResult.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><ins>+                99C81D551C20DFBE005C4C82 /* AutomationClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AutomationClient.h; sourceTree = &quot;&lt;group&gt;&quot;; };
+                99C81D561C20DFBE005C4C82 /* AutomationClient.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = AutomationClient.mm; sourceTree = &quot;&lt;group&gt;&quot;; };
+                99C81D5B1C20E817005C4C82 /* APIAutomationClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = APIAutomationClient.h; sourceTree = &quot;&lt;group&gt;&quot;; };
+                99E714C11C1249E600665B3A /* _WKAutomationDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = _WKAutomationDelegate.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</ins><span class="cx">                 9F54F88E16488E87007DF81A /* ChildProcessMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = ChildProcessMac.mm; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 9F54F8941648AE0E007DF81A /* PluginProcessManagerMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = PluginProcessManagerMac.mm; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 9FB5F392169E6A80002C25BF /* WKContextPrivateMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = WKContextPrivateMac.mm; path = mac/WKContextPrivateMac.mm; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="lines">@@ -4906,6 +4914,8 @@
</span><span class="cx">                         isa = PBXGroup;
</span><span class="cx">                         children = (
</span><span class="cx">                                 517DD5BB180DA7C40081660B /* Databases */,
</span><ins>+                                99C81D551C20DFBE005C4C82 /* AutomationClient.h */,
+                                99C81D561C20DFBE005C4C82 /* AutomationClient.mm */,
</ins><span class="cx">                                 83891B6A1A68C30B0030F386 /* DiagnosticLoggingClient.h */,
</span><span class="cx">                                 83891B6B1A68C30B0030F386 /* DiagnosticLoggingClient.mm */,
</span><span class="cx">                                 A1DF631118E0B7C8003A3E2A /* DownloadClient.h */,
</span><span class="lines">@@ -5276,6 +5286,7 @@
</span><span class="cx">                                 37A5E01218BBF937000A081E /* _WKActivatedElementInfo.h */,
</span><span class="cx">                                 37A5E01118BBF937000A081E /* _WKActivatedElementInfo.mm */,
</span><span class="cx">                                 379A873518BBFA4300588AF2 /* _WKActivatedElementInfoInternal.h */,
</span><ins>+                                99E714C11C1249E600665B3A /* _WKAutomationDelegate.h */,
</ins><span class="cx">                                 1A5704F61BE01FF400874AF1 /* _WKContextMenuElementInfo.h */,
</span><span class="cx">                                 1A5704F51BE01FF400874AF1 /* _WKContextMenuElementInfo.mm */,
</span><span class="cx">                                 83891B681A68BEBC0030F386 /* _WKDiagnosticLoggingDelegate.h */,
</span><span class="lines">@@ -6267,6 +6278,7 @@
</span><span class="cx">                                 37C4C08318149C2A003688B9 /* Cocoa */,
</span><span class="cx">                                 BC8A501311765F4500757573 /* cpp */,
</span><span class="cx">                                 BC111B47112F616900337BAB /* mac */,
</span><ins>+                                99C81D5B1C20E817005C4C82 /* APIAutomationClient.h */,
</ins><span class="cx">                                 076E884D1A13CADF005E90FC /* APIContextMenuClient.h */,
</span><span class="cx">                                 83891B621A68B3420030F386 /* APIDiagnosticLoggingClient.h */,
</span><span class="cx">                                 1F7D36C018DA513F00D9D659 /* APIDownloadClient.h */,
</span><span class="lines">@@ -7794,6 +7806,7 @@
</span><span class="cx">                                 E413F59D1AC1ADC400345360 /* NetworkCacheEntry.h in Headers */,
</span><span class="cx">                                 834B250F1A831A8D00CFB150 /* NetworkCacheFileSystem.h in Headers */,
</span><span class="cx">                                 E42E06101AA7523B00B11699 /* NetworkCacheIOChannel.h in Headers */,
</span><ins>+                                99E714C51C124A0400665B3A /* _WKAutomationDelegate.h in Headers */,
</ins><span class="cx">                                 E4436ECE1A0D040B00EAD204 /* NetworkCacheKey.h in Headers */,
</span><span class="cx">                                 831EEBBD1BD85C4300BB64C3 /* NetworkCacheSpeculativeLoad.h in Headers */,
</span><span class="cx">                                 832AE2521BE2E8CD00FAAE10 /* NetworkCacheSpeculativeLoadManager.h in Headers */,
</span><span class="lines">@@ -7915,6 +7928,7 @@
</span><span class="cx">                                 1AFDE65A1954A42B00C48FFA /* SessionState.h in Headers */,
</span><span class="cx">                                 1A002D49196B345D00B9AD44 /* SessionStateCoding.h in Headers */,
</span><span class="cx">                                 753E3E0E1887398900188496 /* SessionTracker.h in Headers */,
</span><ins>+                                99C81D5A1C20E7E2005C4C82 /* AutomationClient.h in Headers */,
</ins><span class="cx">                                 1A6420E512DCE2FF00CAAE2C /* ShareableBitmap.h in Headers */,
</span><span class="cx">                                 51217461164C20E30037A5C1 /* ShareableResource.h in Headers */,
</span><span class="cx">                                 1A24BED5120894D100FBB059 /* SharedMemory.h in Headers */,
</span><span class="lines">@@ -8347,6 +8361,7 @@
</span><span class="cx">                                 1A3C888018A5ABAE00C4C962 /* WKPreferencesInternal.h in Headers */,
</span><span class="cx">                                 7C8EB11718DB6A19007917C2 /* WKPreferencesPrivate.h in Headers */,
</span><span class="cx">                                 BCD597D0112B56AC00EC8C23 /* WKPreferencesRef.h in Headers */,
</span><ins>+                                99C81D5D1C21F38B005C4C82 /* APIAutomationClient.h in Headers */,
</ins><span class="cx">                                 762B748D120BC75C00819339 /* WKPreferencesRefPrivate.h in Headers */,
</span><span class="cx">                                 0FCB4E6618BBE3D9000FCFC9 /* WKPrintingView.h in Headers */,
</span><span class="cx">                                 BCBAACEB145225E30053F82F /* WKProcessGroup.h in Headers */,
</span><span class="lines">@@ -10066,6 +10081,7 @@
</span><span class="cx">                                 1A7E377818E4A4FE003D0FFF /* WKScriptMessage.mm in Sources */,
</span><span class="cx">                                 0FCB4E5518BBE044000FCFC9 /* WKScrollView.mm in Sources */,
</span><span class="cx">                                 51CD1C661B34B9DC00142CA5 /* WKSecurityOrigin.mm in Sources */,
</span><ins>+                                99C81D591C20E1E5005C4C82 /* AutomationClient.mm in Sources */,
</ins><span class="cx">                                 51CD1C5D1B3493AF00142CA5 /* WKSecurityOriginRef.cpp in Sources */,
</span><span class="cx">                                 BC407603124FF0270068F20A /* WKSerializedScriptValue.cpp in Sources */,
</span><span class="cx">                                 75A8D2D8187D304000C39C9E /* WKSessionRef.cpp in Sources */,
</span></span></pre>
</div>
</div>

</body>
</html>