diff --git a/AutoWebPerf/AutoWebPerf.csproj b/AutoWebPerf/AutoWebPerf.csproj index 44b83369ebd73ba70f6d35c3022754d4fb42ba96..b1d0c833b7d932b7fe273da2aba35123f379aacd 100644 --- a/AutoWebPerf/AutoWebPerf.csproj +++ b/AutoWebPerf/AutoWebPerf.csproj @@ -11,6 +11,21 @@ <AssemblyName>AutoWebPerf</AssemblyName> <TargetFrameworkVersion>v4.5</TargetFrameworkVersion> <FileAlignment>512</FileAlignment> + <PublishUrl>publish\</PublishUrl> + <Install>true</Install> + <InstallFrom>Disk</InstallFrom> + <UpdateEnabled>false</UpdateEnabled> + <UpdateMode>Foreground</UpdateMode> + <UpdateInterval>7</UpdateInterval> + <UpdateIntervalUnits>Days</UpdateIntervalUnits> + <UpdatePeriodically>false</UpdatePeriodically> + <UpdateRequired>false</UpdateRequired> + <MapFileExtensions>true</MapFileExtensions> + <ApplicationRevision>0</ApplicationRevision> + <ApplicationVersion>1.0.0.%2a</ApplicationVersion> + <IsWebBootstrapper>false</IsWebBootstrapper> + <UseApplicationTrust>false</UseApplicationTrust> + <BootstrapperEnabled>true</BootstrapperEnabled> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <PlatformTarget>AnyCPU</PlatformTarget> @@ -49,35 +64,6 @@ </ItemGroup> <ItemGroup> <Compile Include="ChromeWrapper.cs" /> - <Compile Include="ChromeProcessInfo.cs" /> - <Compile Include="Chrome\IChromeProxy.cs" /> - <Compile Include="Chrome\MessageContractResolver.cs" /> - <Compile Include="Chrome\Messages\ChromeProxy.cs" /> - <Compile Include="Chrome\Messages\ErrorResponse.cs" /> - <Compile Include="Chrome\Messages\IdResponse.cs" /> - <Compile Include="Chrome\Messages\IError.cs" /> - <Compile Include="Chrome\Messages\IRequest.cs" /> - <Compile Include="Chrome\Messages\IRequestFactory.cs" /> - <Compile Include="Chrome\Messages\IResponse.cs" /> - <Compile Include="Chrome\Messages\IResponseFactory.cs" /> - <Compile Include="Chrome\Messages\MethodName.cs" /> - <Compile Include="Chrome\Messages\MethodNameAttribute.cs" /> - <Compile Include="Chrome\Messages\Network\DataReceivedResponse.cs" /> - <Compile Include="Chrome\Messages\Network\EnableRequest.cs" /> - <Compile Include="Chrome\Messages\Network\EnableResponse.cs" /> - <Compile Include="Chrome\Messages\Network\LoadingFinishedResponse.cs" /> - <Compile Include="Chrome\Messages\Network\RequestServedFromCacheResponse.cs" /> - <Compile Include="Chrome\Messages\Network\RequestWillBeSentResponse.cs" /> - <Compile Include="Chrome\Messages\Network\ResponseReceivedResponse.cs" /> - <Compile Include="Chrome\Messages\Page\NavigateRequest.cs" /> - <Compile Include="Chrome\Messages\Page\NavigateRequestParams.cs" /> - <Compile Include="Chrome\Messages\Page\NavigateResponse.cs" /> - <Compile Include="Chrome\Messages\Page\NavigateResponseResult.cs" /> - <Compile Include="Chrome\Messages\Request.cs" /> - <Compile Include="Chrome\Messages\RequestFactory.cs" /> - <Compile Include="Chrome\Messages\ResponseFactory.cs" /> - <Compile Include="Chrome\Messages\ResponseHandler.cs" /> - <Compile Include="Chrome\Messages\Response.cs" /> <Compile Include="Program.cs" /> <Compile Include="Properties\AssemblyInfo.cs" /> <Compile Include="RemoveSessions.cs" /> @@ -86,7 +72,29 @@ <None Include="App.config" /> <None Include="packages.config" /> </ItemGroup> - <ItemGroup /> + <ItemGroup> + <BootstrapperPackage Include=".NETFramework,Version=v4.5"> + <Visible>False</Visible> + <ProductName>Microsoft .NET Framework 4.5 %28x86 and x64%29</ProductName> + <Install>true</Install> + </BootstrapperPackage> + <BootstrapperPackage Include="Microsoft.Net.Client.3.5"> + <Visible>False</Visible> + <ProductName>.NET Framework 3.5 SP1 Client Profile</ProductName> + <Install>false</Install> + </BootstrapperPackage> + <BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1"> + <Visible>False</Visible> + <ProductName>.NET Framework 3.5 SP1</ProductName> + <Install>false</Install> + </BootstrapperPackage> + </ItemGroup> + <ItemGroup> + <ProjectReference Include="..\ChromeDevTools\ChromeDevTools.csproj"> + <Project>{c2508ee5-aab2-4275-88c9-7da9d1961336}</Project> + <Name>ChromeDevTools</Name> + </ProjectReference> + </ItemGroup> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <!-- To modify your build process, add your task inside one of the targets below and uncomment it. Other similar extension points exist, see Microsoft.Common.targets. diff --git a/AutoWebPerf/AutoWebPerf.sln b/AutoWebPerf/AutoWebPerf.sln index 423af3a79dbd27184d524ce889479f5bfb8fb0d4..01e4084f9ff4d62e26349aedb141de435db62de2 100644 --- a/AutoWebPerf/AutoWebPerf.sln +++ b/AutoWebPerf/AutoWebPerf.sln @@ -5,6 +5,10 @@ VisualStudioVersion = 12.0.31101.0 MinimumVisualStudioVersion = 10.0.40219.1 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AutoWebPerf", "AutoWebPerf.csproj", "{36138327-0A72-44E3-B9DB-C4E6155AAFD5}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ChromeDevTools", "..\ChromeDevTools\ChromeDevTools.csproj", "{C2508EE5-AAB2-4275-88C9-7DA9D1961336}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ChromeDevToolsProtocolParser", "ChromeDevToolsProtocolParser\ChromeDevToolsProtocolParser.csproj", "{97C7FCF5-1964-4878-B7CD-63448CA403B1}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -15,6 +19,14 @@ Global {36138327-0A72-44E3-B9DB-C4E6155AAFD5}.Debug|Any CPU.Build.0 = Debug|Any CPU {36138327-0A72-44E3-B9DB-C4E6155AAFD5}.Release|Any CPU.ActiveCfg = Release|Any CPU {36138327-0A72-44E3-B9DB-C4E6155AAFD5}.Release|Any CPU.Build.0 = Release|Any CPU + {C2508EE5-AAB2-4275-88C9-7DA9D1961336}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {C2508EE5-AAB2-4275-88C9-7DA9D1961336}.Debug|Any CPU.Build.0 = Debug|Any CPU + {C2508EE5-AAB2-4275-88C9-7DA9D1961336}.Release|Any CPU.ActiveCfg = Release|Any CPU + {C2508EE5-AAB2-4275-88C9-7DA9D1961336}.Release|Any CPU.Build.0 = Release|Any CPU + {97C7FCF5-1964-4878-B7CD-63448CA403B1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {97C7FCF5-1964-4878-B7CD-63448CA403B1}.Debug|Any CPU.Build.0 = Debug|Any CPU + {97C7FCF5-1964-4878-B7CD-63448CA403B1}.Release|Any CPU.ActiveCfg = Release|Any CPU + {97C7FCF5-1964-4878-B7CD-63448CA403B1}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/AutoWebPerf/Chrome/IChromeProxy.cs b/AutoWebPerf/Chrome/IChromeProxy.cs deleted file mode 100644 index 9052918e17db36984c5de4146edbf6289be0db41..0000000000000000000000000000000000000000 --- a/AutoWebPerf/Chrome/IChromeProxy.cs +++ /dev/null @@ -1,18 +0,0 @@ -using AutoWebPerf.Chrome.Messages; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace AutoWebPerf.Chrome -{ - interface IChromeProxy : IDisposable - { - Task Init(); - - Task<IResponse> PublishAsync(IRequest request); - - void Subscribe<T>(ResponseHandler handler); - } -} diff --git a/AutoWebPerf/Chrome/Messages/ChromeProxy.cs b/AutoWebPerf/Chrome/Messages/ChromeProxy.cs deleted file mode 100644 index 7c05a9ed69ae74fb953fed33bdb83190489a47a8..0000000000000000000000000000000000000000 --- a/AutoWebPerf/Chrome/Messages/ChromeProxy.cs +++ /dev/null @@ -1,138 +0,0 @@ -using Newtonsoft.Json; -using System; -using System.Collections.Concurrent; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading; -using System.Threading.Tasks; -using WebSocket4Net; - -namespace AutoWebPerf.Chrome.Messages -{ - class ChromeProxy : IChromeProxy - { - private ManualResetEvent _openEvent = new ManualResetEvent(false); - private ManualResetEvent _publishEvent = new ManualResetEvent(false); - private readonly string _endpoint; - private WebSocket _webSocket; - private readonly ConcurrentDictionary<string, ConcurrentBag<ResponseHandler>> _handlers = new ConcurrentDictionary<string, ConcurrentBag<ResponseHandler>>(); - private IResponseFactory _responseFactory; - private ConcurrentDictionary<long, ManualResetEvent> _requestWaitHandles = new ConcurrentDictionary<long, ManualResetEvent>(); - private ConcurrentDictionary<long, IResponse> _responses = new ConcurrentDictionary<long, IResponse>(); - - public ChromeProxy(string endpoint, IResponseFactory responseFactory) - { - _endpoint = endpoint; - _responseFactory = responseFactory; - } - - public Task Init() - { - _openEvent.Reset(); - _webSocket = new WebSocket(_endpoint); - _webSocket.Opened += delegate(System.Object o, EventArgs e) - { - _openEvent.Set(); - }; - - _webSocket.MessageReceived += delegate(System.Object o, MessageReceivedEventArgs e) - { - var response = _responseFactory.Create(e.Message); - var idResponse = response as IdResponse; - ManualResetEvent requestMre = null; - long responseId; - if (null != idResponse - && long.TryParse(idResponse.Id, out responseId) - && _requestWaitHandles.TryGetValue(responseId, out requestMre)) - { - _responses.AddOrUpdate(responseId, response, (i, r) => response); - requestMre.Set(); - } - else - { - HandleResponse(response); - } - }; - - _webSocket.Error += delegate(System.Object o, SuperSocket.ClientEngine.ErrorEventArgs e) - { - throw e.Exception; - }; - - _webSocket.Closed += delegate(System.Object o, EventArgs e) - { - }; - - _webSocket.DataReceived += delegate(System.Object o, WebSocket4Net.DataReceivedEventArgs e) - { - var response = _responseFactory.Create(e.Data); - HandleResponse(response); - }; - - _webSocket.Open(); - return Task.Run(() => - { - _openEvent.WaitOne(); - }); - } - - private void HandleResponse(IResponse response) - { - var type = response.GetType(); - var handlerKey = type.FullName; - ConcurrentBag<ResponseHandler> handlers = null; - if(_handlers.TryGetValue(handlerKey, out handlers)) - { - var localHandlers = handlers.ToArray(); - foreach(var handler in localHandlers) - { - handler(this, response); - } - } - } - - public Task<IResponse> PublishAsync(IRequest request) - { - var settings = new JsonSerializerSettings - { - ContractResolver = new MessageContractResolver() - }; - var requestString = JsonConvert.SerializeObject(request, settings); - - var requestResetEvent = new ManualResetEvent(false); - _requestWaitHandles.AddOrUpdate(request.Id, requestResetEvent, (id, r) => requestResetEvent); - return Task.Run(() => - { - _webSocket.Send(requestString); - requestResetEvent.WaitOne(); - IResponse response = null; - _requestWaitHandles.TryRemove(request.Id, out requestResetEvent); - _responses.TryRemove(request.Id, out response); - return response; - }); - } - - public void Subscribe<T>(ResponseHandler handler) - { - var handlerType = typeof(T); - _handlers.AddOrUpdate(handlerType.FullName, - (m) => new ConcurrentBag<ResponseHandler>(new[] { handler }), - (m, currentBag) => - { - currentBag.Add(handler); - return currentBag; - }); - } - - public void Dispose() - { - if (null == _webSocket) return; - if (_webSocket.State == WebSocketState.Open) - { - _webSocket.Close(); - } - _webSocket.Dispose(); - } - } -} diff --git a/AutoWebPerf/Chrome/Messages/ErrorResponse.cs b/AutoWebPerf/Chrome/Messages/ErrorResponse.cs deleted file mode 100644 index ee121e592a5d269e3ec85e023888cf1b53c35e43..0000000000000000000000000000000000000000 --- a/AutoWebPerf/Chrome/Messages/ErrorResponse.cs +++ /dev/null @@ -1,24 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace AutoWebPerf.Chrome.Messages -{ - public class Error - { - public int Code { get; set; } - public string message { get; set; } - } - - class ErrorResponse : IdResponse - { - public Error Error { get; set; } - public int Id { get; set; } - } - - - - -} diff --git a/AutoWebPerf/Chrome/Messages/IRequest.cs b/AutoWebPerf/Chrome/Messages/IRequest.cs deleted file mode 100644 index e3620f422e78cbdb4c1dc73abefd4eef1cad09f4..0000000000000000000000000000000000000000 --- a/AutoWebPerf/Chrome/Messages/IRequest.cs +++ /dev/null @@ -1,20 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace AutoWebPerf.Chrome.Messages -{ - interface IRequest - { - long Id { get; } - - string Method { get; } - } - - interface IRequest<T> : IRequest - { - T Params { get; } - } -} diff --git a/AutoWebPerf/Chrome/Messages/IRequestFactory.cs b/AutoWebPerf/Chrome/Messages/IRequestFactory.cs deleted file mode 100644 index 9d621ea521b8ff9e92d2f4fe840879f04c3a0d23..0000000000000000000000000000000000000000 --- a/AutoWebPerf/Chrome/Messages/IRequestFactory.cs +++ /dev/null @@ -1,19 +0,0 @@ -using AutoWebPerf.Chrome.Messages.Page; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace AutoWebPerf.Chrome.Messages -{ - interface IRequestFactory - { - string GetMethod(long id); - - - NavigateRequest CreateNavigateRequest(string url); - - Network.EnableRequest CreateNetworkEnableRequest(); - } -} diff --git a/AutoWebPerf/Chrome/Messages/IResponse.cs b/AutoWebPerf/Chrome/Messages/IResponse.cs deleted file mode 100644 index 2890de12c7e02ff4f07878bbec24ea43e190f5f6..0000000000000000000000000000000000000000 --- a/AutoWebPerf/Chrome/Messages/IResponse.cs +++ /dev/null @@ -1,17 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace AutoWebPerf.Chrome.Messages -{ - interface IResponse - { - } - - interface IResponse<T> : IResponse - { - T Result { get; } - } -} diff --git a/AutoWebPerf/Chrome/Messages/IResponseFactory.cs b/AutoWebPerf/Chrome/Messages/IResponseFactory.cs deleted file mode 100644 index 0fa26d26e99b9d13f42042f9ff03dfaee04942f7..0000000000000000000000000000000000000000 --- a/AutoWebPerf/Chrome/Messages/IResponseFactory.cs +++ /dev/null @@ -1,15 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace AutoWebPerf.Chrome.Messages -{ - interface IResponseFactory - { - IResponse Create(string responseText); - - IResponse Create(byte[] responseBytes); - } -} diff --git a/AutoWebPerf/Chrome/Messages/IdResponse.cs b/AutoWebPerf/Chrome/Messages/IdResponse.cs deleted file mode 100644 index a42f309258a5c054ff141d542c2102bda2a1779e..0000000000000000000000000000000000000000 --- a/AutoWebPerf/Chrome/Messages/IdResponse.cs +++ /dev/null @@ -1,22 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace AutoWebPerf.Chrome.Messages -{ - class IdResponse : Response - { - public string Id { get; set; } - } - - class IdResponse<T> : IdResponse, IResponse<T> - { - public T Result - { - get; - set; - } - } -} diff --git a/AutoWebPerf/Chrome/Messages/MethodName.cs b/AutoWebPerf/Chrome/Messages/MethodName.cs deleted file mode 100644 index 8de1908031a4ceb87126412536ee62a6b310f7af..0000000000000000000000000000000000000000 --- a/AutoWebPerf/Chrome/Messages/MethodName.cs +++ /dev/null @@ -1,25 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace AutoWebPerf.Chrome.Messages -{ - public static class MethodName - { - public static class Network - { - public const string DataReceived = "Network.dataReceived"; - public const string Enable = "Network.enable"; - public const string LoadingFinished = "Network.loadingFinished"; - public const string RequestWillBeSent = "Network.requestWillBeSent"; - public const string ResponseReceived = "Network.responseReceived"; - public const string RequestServedFromCache = "Network.requestServedFromCache"; - } - public static class Page - { - public const string Navigate = "Page.navigate"; - } - } -} diff --git a/AutoWebPerf/Chrome/Messages/Network/DataReceivedResponse.cs b/AutoWebPerf/Chrome/Messages/Network/DataReceivedResponse.cs deleted file mode 100644 index 0be64d4674612c55b1169ac937970e1ef50477a1..0000000000000000000000000000000000000000 --- a/AutoWebPerf/Chrome/Messages/Network/DataReceivedResponse.cs +++ /dev/null @@ -1,24 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace AutoWebPerf.Chrome.Messages.Network -{ - [MethodName(MethodName.Network.DataReceived)] - public class DataReceivedResponse : IResponse - { - public string method { get; set; } - public DataReceivedResponseParams Params { get; set; } - } - - public class DataReceivedResponseParams - { - public string requestId { get; set; } - public float timestamp { get; set; } - public int dataLength { get; set; } - public int encodedDataLength { get; set; } - } - -} diff --git a/AutoWebPerf/Chrome/Messages/Network/EnableRequest.cs b/AutoWebPerf/Chrome/Messages/Network/EnableRequest.cs deleted file mode 100644 index 7f19a27ab1b0514d2bf0d8fd7de7f0800c03f073..0000000000000000000000000000000000000000 --- a/AutoWebPerf/Chrome/Messages/Network/EnableRequest.cs +++ /dev/null @@ -1,17 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace AutoWebPerf.Chrome.Messages.Network -{ - [MethodName(MethodName.Network.Enable)] - public class EnableRequest : Messages.Request - { - public EnableRequest(long id) - : base(id) - { - } - } -} diff --git a/AutoWebPerf/Chrome/Messages/Network/EnableResponse.cs b/AutoWebPerf/Chrome/Messages/Network/EnableResponse.cs deleted file mode 100644 index 796ae0e43b586fd8c6500c74c7cc2c130374a404..0000000000000000000000000000000000000000 --- a/AutoWebPerf/Chrome/Messages/Network/EnableResponse.cs +++ /dev/null @@ -1,13 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace AutoWebPerf.Chrome.Messages.Network -{ - [MethodName(MethodName.Network.Enable)] - class EnableResponse : Messages.IdResponse - { - } -} diff --git a/AutoWebPerf/Chrome/Messages/Network/LoadingFinishedResponse.cs b/AutoWebPerf/Chrome/Messages/Network/LoadingFinishedResponse.cs deleted file mode 100644 index 46f1f08975e3515d96cc93d6b9d34a862fd08d7d..0000000000000000000000000000000000000000 --- a/AutoWebPerf/Chrome/Messages/Network/LoadingFinishedResponse.cs +++ /dev/null @@ -1,24 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace AutoWebPerf.Chrome.Messages.Network -{ - - [MethodName(MethodName.Network.LoadingFinished)] - public class LoadingFinishedResponse : IResponse - { - public string method { get; set; } - public LoadingFinishedResponseParams Params { get; set; } - } - - public class LoadingFinishedResponseParams - { - public string requestId { get; set; } - public float timestamp { get; set; } - public int encodedDataLength { get; set; } - } - -} diff --git a/AutoWebPerf/Chrome/Messages/Network/RequestServedFromCacheResponse.cs b/AutoWebPerf/Chrome/Messages/Network/RequestServedFromCacheResponse.cs deleted file mode 100644 index 190c04c89a2ffcf4ac8af802d6bb0c230a9f6e08..0000000000000000000000000000000000000000 --- a/AutoWebPerf/Chrome/Messages/Network/RequestServedFromCacheResponse.cs +++ /dev/null @@ -1,21 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace AutoWebPerf.Chrome.Messages.Network -{ - [MethodName(MethodName.Network.RequestServedFromCache)] - public class RequestServedFromCacheResponse : IResponse - { - public string method { get; set; } - public RequestServedFromCacheResponseParams Params { get; set; } - } - - public class RequestServedFromCacheResponseParams - { - public string requestId { get; set; } - } - -} diff --git a/AutoWebPerf/Chrome/Messages/Network/RequestWillBeSentResponse.cs b/AutoWebPerf/Chrome/Messages/Network/RequestWillBeSentResponse.cs deleted file mode 100644 index df0f237fecc2919ef40a34b81df9f3607d13bcba..0000000000000000000000000000000000000000 --- a/AutoWebPerf/Chrome/Messages/Network/RequestWillBeSentResponse.cs +++ /dev/null @@ -1,46 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace AutoWebPerf.Chrome.Messages.Network -{ - [MethodName(MethodName.Network.RequestWillBeSent)] - public class RequestWillBeSentResponse : IResponse - { - public string method { get; set; } - public RequestWillBeSentResponseParams Params { get; set; } - } - - public class RequestWillBeSentResponseParams - { - public string requestId { get; set; } - public string frameId { get; set; } - public string loaderId { get; set; } - public string documentURL { get; set; } - public Request request { get; set; } - public float timestamp { get; set; } - public Initiator initiator { get; set; } - public string type { get; set; } - } - - public class Request - { - public string url { get; set; } - public string method { get; set; } - public RequestHeaders headers { get; set; } - } - - public class RequestHeaders - { - public string Accept { get; set; } - public string UserAgent { get; set; } - } - - public class Initiator - { - public string type { get; set; } - } - -} diff --git a/AutoWebPerf/Chrome/Messages/Network/ResponseReceivedResponse.cs b/AutoWebPerf/Chrome/Messages/Network/ResponseReceivedResponse.cs deleted file mode 100644 index de27258a680f6696ae23051ba9f87cd10f0f7036..0000000000000000000000000000000000000000 --- a/AutoWebPerf/Chrome/Messages/Network/ResponseReceivedResponse.cs +++ /dev/null @@ -1,93 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace AutoWebPerf.Chrome.Messages.Network -{ - [MethodName(MethodName.Network.ResponseReceived)] - public class ResponseReceivedResponse : IResponse - { - public string method { get; set; } - public ResponseReceivedResponseParams Params { get; set; } - } - - public class ResponseReceivedResponseParams - { - public string requestId { get; set; } - public string frameId { get; set; } - public string loaderId { get; set; } - public float timestamp { get; set; } - public string type { get; set; } - public Response response { get; set; } - } - - public class Response - { - public string url { get; set; } - public int status { get; set; } - public string statusText { get; set; } - public ResponseHeaders headers { get; set; } - public string mimeType { get; set; } - public bool connectionReused { get; set; } - public int connectionId { get; set; } - public int encodedDataLength { get; set; } - public bool fromDiskCache { get; set; } - public bool fromServiceWorker { get; set; } - public Timing timing { get; set; } - public string headersText { get; set; } - public Requestheaders requestHeaders { get; set; } - public string requestHeadersText { get; set; } - public string remoteIPAddress { get; set; } - public int remotePort { get; set; } - public string protocol { get; set; } - } - - public class ResponseHeaders - { - public string Date { get; set; } - public string ContentEncoding { get; set; } - public string Server { get; set; } - public string XAspNetVersion { get; set; } - public string XPoweredBy { get; set; } - public string Vary { get; set; } - public string ContentType { get; set; } - public string accesscontrolalloworigin { get; set; } - public string CacheControl { get; set; } - public string SetCookie { get; set; } - public string accesscontrolallowheaders { get; set; } - public string ContentLength { get; set; } - public string Expires { get; set; } - } - - public class Timing - { - public float requestTime { get; set; } - public int proxyStart { get; set; } - public int proxyEnd { get; set; } - public int dnsStart { get; set; } - public int dnsEnd { get; set; } - public int connectStart { get; set; } - public int connectEnd { get; set; } - public int sslStart { get; set; } - public int sslEnd { get; set; } - public int serviceWorkerFetchStart { get; set; } - public int serviceWorkerFetchReady { get; set; } - public int serviceWorkerFetchEnd { get; set; } - public float sendStart { get; set; } - public float sendEnd { get; set; } - public float receiveHeadersEnd { get; set; } - } - - public class Requestheaders - { - public string Accept { get; set; } - public string Connection { get; set; } - public string AcceptEncoding { get; set; } - public string Host { get; set; } - public string AcceptLanguage { get; set; } - public string UserAgent { get; set; } - } - -} diff --git a/AutoWebPerf/Chrome/Messages/Page/NavigateRequest.cs b/AutoWebPerf/Chrome/Messages/Page/NavigateRequest.cs deleted file mode 100644 index bcdf05a55a4a06c72229c01b8b97f73dee056eaa..0000000000000000000000000000000000000000 --- a/AutoWebPerf/Chrome/Messages/Page/NavigateRequest.cs +++ /dev/null @@ -1,18 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace AutoWebPerf.Chrome.Messages.Page -{ - [MethodName("Page.navigate")] - class NavigateRequest : Request<NavigateRequestParams> - { - public NavigateRequest(long id, NavigateRequestParams param) - : base(id, param) - { - - } - } -} diff --git a/AutoWebPerf/Chrome/Messages/Page/NavigateResponse.cs b/AutoWebPerf/Chrome/Messages/Page/NavigateResponse.cs deleted file mode 100644 index 6439585b90e5274f148ae703013df71cc3e25e4e..0000000000000000000000000000000000000000 --- a/AutoWebPerf/Chrome/Messages/Page/NavigateResponse.cs +++ /dev/null @@ -1,13 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace AutoWebPerf.Chrome.Messages.Page -{ - [MethodName(MethodName.Page.Navigate)] - class NavigateResponse : IdResponse<NavigateResponseResult> - { - } -} diff --git a/AutoWebPerf/Chrome/Messages/Request.cs b/AutoWebPerf/Chrome/Messages/Request.cs deleted file mode 100644 index f1816dee39e1b3400ab313a231e6c4b41ff86085..0000000000000000000000000000000000000000 --- a/AutoWebPerf/Chrome/Messages/Request.cs +++ /dev/null @@ -1,62 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace AutoWebPerf.Chrome.Messages -{ - public class Request : IRequest - { - public Request(long id) - { - Id = id; - Method = LookupMethodAttribute(); - } - - private string LookupMethodAttribute() - { - var methodNameAttribute = this.GetType().GetCustomAttributes(typeof(MethodNameAttribute), true) - .FirstOrDefault() as MethodNameAttribute; - if(null == methodNameAttribute) - { - throw new Exception("Request(id) constructor is called on an object without a [MethodName] attribute"); - } - return methodNameAttribute.MethodName; - } - - public Request(long id, string method) - { - Id = id; - Method = method; - } - - public long Id - { - get; - private set; - } - - public string Method - { - get; - private set; - } - } - - public class Request<T> : Request, IRequest<T> - { - public Request(long id, T methodParams) - : base(id) - { - Params = methodParams; - } - - public T Params - { - get; - private set; - } - } - -} diff --git a/AutoWebPerf/Chrome/Messages/RequestFactory.cs b/AutoWebPerf/Chrome/Messages/RequestFactory.cs deleted file mode 100644 index fa33724e60b4671a9659e245ebcd3a908df7f2f5..0000000000000000000000000000000000000000 --- a/AutoWebPerf/Chrome/Messages/RequestFactory.cs +++ /dev/null @@ -1,47 +0,0 @@ -using AutoWebPerf.Chrome.Messages.Page; -using System; -using System.Collections.Concurrent; -using System.Threading; - -namespace AutoWebPerf.Chrome.Messages -{ - internal class RequestFactory : IRequestFactory - { - private readonly ConcurrentDictionary<long, string> _methods = new ConcurrentDictionary<long, string>(); - private long _count = 0; - public NavigateRequest CreateNavigateRequest(string url) - { - return CreateRequest(id => - { - var requestParams = new NavigateRequestParams - { - Url = url - }; - return new NavigateRequest(id, requestParams); - }); - } - - public Network.EnableRequest CreateNetworkEnableRequest() - { - return CreateRequest(id => new Network.EnableRequest(id)); - } - - public string GetMethod(long id) - { - return _methods[id]; - } - - private T CreateRequest<T>(Func<long, T> factory) where T : IRequest - { - var requestId = GetNextRequestId(); - var request = factory(requestId); - _methods.AddOrUpdate(request.Id, request.Method, (id, m) => request.Method); - return request; - } - - private long GetNextRequestId() - { - return Interlocked.Increment(ref _count); - } - } -} \ No newline at end of file diff --git a/AutoWebPerf/Chrome/Messages/Response.cs b/AutoWebPerf/Chrome/Messages/Response.cs deleted file mode 100644 index eb1a2015982d34d53b969d503a2d644edd39e640..0000000000000000000000000000000000000000 --- a/AutoWebPerf/Chrome/Messages/Response.cs +++ /dev/null @@ -1,21 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace AutoWebPerf.Chrome.Messages -{ - class Response : IResponse - { - } - class Response<T> : IResponse<T> - { - public T Result - { - get; - set; - } - } - -} diff --git a/AutoWebPerf/Chrome/Messages/ResponseFactory.cs b/AutoWebPerf/Chrome/Messages/ResponseFactory.cs deleted file mode 100644 index 6543a7c944af89c78eedb06cac440e7ece832896..0000000000000000000000000000000000000000 --- a/AutoWebPerf/Chrome/Messages/ResponseFactory.cs +++ /dev/null @@ -1,94 +0,0 @@ -using AutoWebPerf.Chrome.Messages.Network; -using AutoWebPerf.Chrome.Messages.Page; -using Newtonsoft.Json; -using Newtonsoft.Json.Linq; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Reflection; -using System.Text; -using System.Threading.Tasks; - -namespace AutoWebPerf.Chrome.Messages -{ - class ResponseFactory : IResponseFactory - { - private readonly static Lazy<Dictionary<string, Type>> _methodTypeMapLazy = new Lazy<Dictionary<string, Type>>(LoadMethodTypeMap); - - private static Dictionary<string, Type> LoadMethodTypeMap() - { - var iresponseType = typeof(IResponse); - var assembly = Assembly.GetExecutingAssembly(); - var assemblyTypes = assembly.GetTypes(); - var responseTypes = assemblyTypes.Where(t => iresponseType.IsAssignableFrom(t) && t.IsClass); - Dictionary<string, Type> result = new Dictionary<string, Type>(); - foreach(var responseType in responseTypes) - { - var methodNameAttribute = responseType.GetCustomAttribute<MethodNameAttribute>(false) as MethodNameAttribute; - if (null == methodNameAttribute) continue; - result[methodNameAttribute.MethodName] = responseType; - } - return result; - } - - private readonly IRequestFactory _requestFactory; - - public ResponseFactory(IRequestFactory requestFactory) - { - _requestFactory = requestFactory; - } - - public IResponse Create(string responseText) - { - var jObject = JObject.Parse(responseText); - if(null != jObject["error"]) - { - return jObject.ToObject<ErrorResponse>(); - } - var response = ResponseFromMethodResponse(jObject); - if (null != response) return response; - response = ResponseFromMethodLookupResponse(jObject); - if (null != response) return response; - throw new Exception("We could not create a response from text: [" + responseText + "]"); - } - - private IResponse ResponseFromMethodLookupResponse(JObject jObject) - { - var resultObj = jObject["result"]; - if (null == resultObj) return null; - var resultIdObj = jObject["id"]; - if (null == resultIdObj) return null; - long resultId; - if (!long.TryParse(resultIdObj.ToString(), out resultId)) return null; - var methodLookupResult = _requestFactory.GetMethod(resultId); - if(String.IsNullOrEmpty(methodLookupResult)) return null; - return ResponseFromMethodResponse(methodLookupResult, jObject); - } - - private IResponse ResponseFromMethodResponse(JObject jObject) - { - var method = jObject["method"]; - if (null == method) return null; - return ResponseFromMethodResponse(method.ToString(), jObject); - } - - private IResponse ResponseFromMethodResponse(string methodName, JObject jObject) - { - if(String.IsNullOrEmpty(methodName)) return null; - Type responseType = null; - if (!_methodTypeMapLazy.Value.TryGetValue(methodName, out responseType)) - { - throw new ArgumentException("We could not find a response type for the method " + methodName); - } - var response = jObject.ToObject(responseType) as IResponse; - return response; - } - - - public IResponse Create(byte[] responseBytes) - { - var responseString = Encoding.Default.GetString(responseBytes); - return Create(responseString); - } - } -} diff --git a/AutoWebPerf/ChromeDevToolsProtocolParser/App.config b/AutoWebPerf/ChromeDevToolsProtocolParser/App.config new file mode 100644 index 0000000000000000000000000000000000000000..8e15646352ec1d9a84bbc6504ef6b46e16bf7823 --- /dev/null +++ b/AutoWebPerf/ChromeDevToolsProtocolParser/App.config @@ -0,0 +1,6 @@ +<?xml version="1.0" encoding="utf-8" ?> +<configuration> + <startup> + <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" /> + </startup> +</configuration> \ No newline at end of file diff --git a/AutoWebPerf/ChromeDevToolsProtocolParser/ChromeDevToolsProtocolParser.csproj b/AutoWebPerf/ChromeDevToolsProtocolParser/ChromeDevToolsProtocolParser.csproj new file mode 100644 index 0000000000000000000000000000000000000000..fd603ea97af05fbd7e9347cb68348b9a5b9e6ece --- /dev/null +++ b/AutoWebPerf/ChromeDevToolsProtocolParser/ChromeDevToolsProtocolParser.csproj @@ -0,0 +1,65 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" /> + <PropertyGroup> + <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> + <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> + <ProjectGuid>{97C7FCF5-1964-4878-B7CD-63448CA403B1}</ProjectGuid> + <OutputType>Exe</OutputType> + <AppDesignerFolder>Properties</AppDesignerFolder> + <RootNamespace>ChromeDevToolsProtocolParser</RootNamespace> + <AssemblyName>ChromeDevToolsProtocolParser</AssemblyName> + <TargetFrameworkVersion>v4.5</TargetFrameworkVersion> + <FileAlignment>512</FileAlignment> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> + <PlatformTarget>AnyCPU</PlatformTarget> + <DebugSymbols>true</DebugSymbols> + <DebugType>full</DebugType> + <Optimize>false</Optimize> + <OutputPath>bin\Debug\</OutputPath> + <DefineConstants>DEBUG;TRACE</DefineConstants> + <ErrorReport>prompt</ErrorReport> + <WarningLevel>4</WarningLevel> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> + <PlatformTarget>AnyCPU</PlatformTarget> + <DebugType>pdbonly</DebugType> + <Optimize>true</Optimize> + <OutputPath>bin\Release\</OutputPath> + <DefineConstants>TRACE</DefineConstants> + <ErrorReport>prompt</ErrorReport> + <WarningLevel>4</WarningLevel> + </PropertyGroup> + <ItemGroup> + <Reference Include="Newtonsoft.Json"> + <HintPath>..\packages\Newtonsoft.Json.6.0.8\lib\net45\Newtonsoft.Json.dll</HintPath> + </Reference> + <Reference Include="System" /> + <Reference Include="System.Core" /> + <Reference Include="System.Xml.Linq" /> + <Reference Include="System.Data.DataSetExtensions" /> + <Reference Include="Microsoft.CSharp" /> + <Reference Include="System.Data" /> + <Reference Include="System.Xml" /> + </ItemGroup> + <ItemGroup> + <Compile Include="Program.cs" /> + <Compile Include="Properties\AssemblyInfo.cs" /> + </ItemGroup> + <ItemGroup> + <None Include="App.config" /> + <None Include="packages.config" /> + <None Include="protocol.json"> + <CopyToOutputDirectory>Always</CopyToOutputDirectory> + </None> + </ItemGroup> + <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> + <!-- To modify your build process, add your task inside one of the targets below and uncomment it. + Other similar extension points exist, see Microsoft.Common.targets. + <Target Name="BeforeBuild"> + </Target> + <Target Name="AfterBuild"> + </Target> + --> +</Project> \ No newline at end of file diff --git a/AutoWebPerf/ChromeDevToolsProtocolParser/Program.cs b/AutoWebPerf/ChromeDevToolsProtocolParser/Program.cs new file mode 100644 index 0000000000000000000000000000000000000000..0e8e268a51aee216ef22d4361f987e854b34fbeb --- /dev/null +++ b/AutoWebPerf/ChromeDevToolsProtocolParser/Program.cs @@ -0,0 +1,478 @@ +using Newtonsoft.Json; +using Newtonsoft.Json.Linq; +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace ChromeDevToolsProtocolParser +{ + class Program + { + const string CommandAttribute = "Command"; + const string CommandResponseAttribute = "CommandResponse"; + const string EventAttribute = "Event"; + const string ProtocolNameClass = "ProtocolName"; + const string RootNamespace = "ChromeDevTools.Protocol"; + const string CommandSubclass = "Command"; + const string CommandResponseSubclass = CommandSubclass + "Response"; + const string EventSubclass = "Event"; + private static Dictionary<string, Dictionary<string, string>> _DomainPropertyTypes = new Dictionary<string,Dictionary<string,string>>(); + private static Dictionary<string, List<string>> _DomainCommands = new Dictionary<string, List<string>>(); + private static Dictionary<string, List<string>> _DomainEvents = new Dictionary<string, List<string>>(); + private static Dictionary<string, string> _SimpleTypes = new Dictionary<string, string>(); + + + static void Main(string[] args) + { + var filePath = "protocol.json"; + JObject protocolObject = null; + using(var fileStream = File.OpenText(filePath)) + using(var reader = new JsonTextReader(fileStream)) + { + protocolObject = (JObject)JToken.ReadFrom(reader); + } + var outputFolder = "OutputProtocol"; + if(Directory.Exists(outputFolder)) + { + Directory.Delete(outputFolder, true); + } + var outputDirectoryInfo = Directory.CreateDirectory(outputFolder); + WriteProtocolClasses(protocolObject, outputDirectoryInfo); + } + + private static void WriteProtocolClasses(JObject protocolObject, DirectoryInfo directory) + { + var domains = protocolObject["domains"] as JArray; + foreach (var domain in domains) + { + AddPropertyTypes(domain["domain"].ToString(), domain["types"] as JArray); + } + foreach(var domain in domains) + { + var domainName = domain["domain"].ToString(); + var types = domain["types"] as JArray; + var commands = domain["commands"] as JArray; + var events = domain["events"] as JArray; + _DomainCommands[domainName] = new List<string>(); + _DomainEvents[domainName] = new List<string>(); + WriteProtocolClasses(directory, domainName, types, commands, events); + } + WriteMethodConstants(directory); + } + + private static void AddPropertyTypes(string domain, JArray types) + { + var domainDictionary = new Dictionary<string, string>(); + _DomainPropertyTypes[domain] = domainDictionary; + foreach (var type in types ?? new JArray()) + { + var propertyType = type["type"].ToString(); + var typeName = GetString(type["id"]); + if (null != type["enum"] + || null != type["properties"] + || "object" == propertyType) + { + propertyType = domain + "." + typeName; + } + if ("Network" == domain && "Headers" == typeName) + { + domainDictionary[typeName] = "Dictionary<string, string>"; + } + else + { + domainDictionary[typeName] = GeneratePropertyType(propertyType); + } + if ("array" == propertyType) + { + AddArrayPropertyType(domainDictionary, domain, type); + } + } + } + + private static void AddArrayPropertyType(Dictionary<string, string> domainDictionary, string domain, JToken type) + { + var items = type["items"]; + if (null == items) return; + var itemsType = GeneratePropertyType(GetString(items["type"])); + if (String.IsNullOrEmpty(itemsType)) + { + itemsType = GetString(items["$ref"]); + } + domainDictionary[type["id"].ToString()] = domain + "." + itemsType + "[]"; + } + + private static void WriteProtocolClasses(DirectoryInfo directory, string domainName, JArray types, JArray commands, JArray events) + { + var domainDirectoryInfo = CreateDomainFolder(directory, domainName); + foreach(var type in types ?? new JArray()) + { + WriteType(domainDirectoryInfo, type as JObject); + } + foreach (var command in commands ?? new JArray()) + { + WriteCommand(domainDirectoryInfo, command as JObject); + } + foreach (var evnt in events ?? new JArray()) + { + WriteEvent(domainDirectoryInfo, evnt as JObject); + } + } + + private static void WriteMethodConstants(DirectoryInfo domainDirectoryInfo) + { + var sb = new StringBuilder(); + sb.AppendFormat("using ChromeDevTools;"); + sb.AppendLine(); + sb.AppendLine(); + sb.AppendFormat("namespace {0}", RootNamespace); + sb.AppendLine(); + sb.AppendLine("{"); + sb.AppendFormat("\tpublic static class {0}", ProtocolNameClass); + sb.AppendLine(); + sb.AppendLine("\t{"); + + var domains = _DomainCommands.Keys.Union(_DomainEvents.Keys).Distinct(); + foreach(var domain in domains) + { + sb.AppendFormat("\t\tpublic static class {0}", domain); + sb.AppendLine(); + sb.AppendLine("\t\t{"); + List<string> commands; + if(_DomainCommands.TryGetValue(domain, out commands)) + { + foreach(var commandName in commands) + { + sb.AppendFormat("\t\t\tpublic const string {0} = \"{1}.{2}\";", ToCamelCase(commandName), domain, commandName); + sb.AppendLine(); + } + } + List<string> events; + if(_DomainEvents.TryGetValue(domain, out events)) + { + foreach(var eventName in events) + { + sb.AppendFormat("\t\t\tpublic const string {0} = \"{1}.{2}\";", ToCamelCase(eventName), domain, eventName); + sb.AppendLine(); + } + } + sb.AppendLine("\t\t}"); + sb.AppendLine(); + } + + + sb.AppendLine("\t}"); + sb.AppendLine("}"); + WriteToFile(domainDirectoryInfo, ProtocolNameClass, sb.ToString()); + } + + private static void WriteEvent(DirectoryInfo domainDirectoryInfo, JObject evnt) + { + if (null == evnt) return; + var eventName = evnt["name"].ToString(); + var description = GetString(evnt["description"]); + var parameters = evnt["parameters"] as JArray; + // ignoreing "handlers" ... i'm not sure what they are for yet + _DomainEvents[domainDirectoryInfo.Name].Add(eventName); + WriteEvent(domainDirectoryInfo, eventName, description, parameters); + } + + private static void WriteEvent(DirectoryInfo domainDirectoryInfo, string eventName, string description, JArray parameters) + { + var className = ToCamelCase(eventName) + EventSubclass; + var sb = new StringBuilder(); + sb.AppendFormat("using ChromeDevTools;"); + sb.AppendLine(); + sb.AppendLine(); + sb.AppendFormat("namespace {0}.{1}", RootNamespace, domainDirectoryInfo.Name); + sb.AppendLine(); + sb.AppendLine("{"); + if (!String.IsNullOrEmpty(description)) + { + sb.AppendLine("\t/// <summary>"); + sb.AppendFormat("\t/// {0}", description); + sb.AppendLine(); + sb.AppendLine("\t/// </summary>"); + } + sb.AppendFormat("\t[{0}({1}.{2}.{3})]", EventAttribute, ProtocolNameClass, domainDirectoryInfo.Name, ToCamelCase(eventName)); + sb.AppendLine(); + sb.AppendFormat("\tpublic class {0}", className); + sb.AppendLine(); + sb.AppendLine("\t{"); + foreach (var parameterProperty in parameters ?? new JArray()) + { + WriteProperty(sb, domainDirectoryInfo.Name, className, parameterProperty as JObject); + } + sb.AppendLine("\t}"); + sb.AppendLine("}"); + WriteToFile(domainDirectoryInfo, className, sb.ToString()); + } + + private static void WriteCommand(DirectoryInfo domainDirectoryInfo, JObject command) + { + if (null == command) return; + var commandName = command["name"].ToString(); + var description = GetString(command["description"]); + var parameters = command["parameters"] as JArray; + var returnObject = command["returns"] as JArray; + _DomainCommands[domainDirectoryInfo.Name].Add(commandName); + WriteCommand(domainDirectoryInfo, commandName, description, parameters); + WriteCommandResponse(domainDirectoryInfo, commandName, description, returnObject); + } + + private static string GetString(JToken jToken) + { + return null == jToken ? null : jToken.ToString(); + } + + private static void WriteCommandResponse(DirectoryInfo domainDirectoryInfo, string commandName, string description, JArray returnObject) + { + var className = ToCamelCase(commandName) + CommandResponseSubclass; + var sb = new StringBuilder(); + sb.AppendFormat("using ChromeDevTools;"); + sb.AppendLine("using Newtonsoft.Json;"); + sb.AppendLine("using System.Collections.Generic;"); + sb.AppendLine(); + sb.AppendFormat("namespace {0}.{1}", RootNamespace, domainDirectoryInfo.Name); + sb.AppendLine(); + sb.AppendLine("{"); + if(!String.IsNullOrEmpty(description)) + { + sb.AppendLine("\t/// <summary>"); + sb.AppendFormat("\t/// {0}", description); + sb.AppendLine(); + sb.AppendLine("\t/// </summary>"); + } + sb.AppendFormat("\t[{0}({1}.{2}.{3})]", CommandResponseAttribute, ProtocolNameClass, domainDirectoryInfo.Name, ToCamelCase(commandName)); + sb.AppendLine(); + sb.AppendFormat("\tpublic class {0}", className); + sb.AppendLine(); + sb.AppendLine("\t{"); + foreach (var returnObjectProperty in returnObject ?? new JArray()) + { + WriteProperty(sb, domainDirectoryInfo.Name, className, returnObjectProperty as JObject); + } + sb.AppendLine("\t}"); + sb.AppendLine("}"); + WriteToFile(domainDirectoryInfo, className, sb.ToString()); + } + + private static void WriteCommand(DirectoryInfo domainDirectoryInfo, string commandName, string description, JArray parameters) + { + var className = ToCamelCase(commandName) + CommandSubclass; + var sb = new StringBuilder(); + sb.AppendFormat("using ChromeDevTools;"); + sb.AppendLine("using Newtonsoft.Json;"); + sb.AppendLine("using System.Collections.Generic;"); + sb.AppendLine(); + sb.AppendFormat("namespace {0}.{1}", RootNamespace, domainDirectoryInfo.Name); + sb.AppendLine(); + sb.AppendLine("{"); + if (!String.IsNullOrEmpty(description)) + { + sb.AppendLine("\t/// <summary>"); + sb.AppendFormat("\t/// {0}", description); + sb.AppendLine(); + sb.AppendLine("\t/// </summary>"); + } + sb.AppendFormat("\t[{0}({1}.{2}.{3})]", CommandAttribute, ProtocolNameClass, domainDirectoryInfo.Name, ToCamelCase(commandName)); + sb.AppendLine(); + sb.AppendFormat("\tpublic class {0}", className); + sb.AppendLine(); + sb.AppendLine("\t{"); + foreach (var parameterProperty in parameters ?? new JArray()) + { + WriteProperty(sb, domainDirectoryInfo.Name, className, parameterProperty as JObject); + } + sb.AppendLine("\t}"); + sb.AppendLine("}"); + WriteToFile(domainDirectoryInfo, className, sb.ToString()); + } + + private static void WriteType(DirectoryInfo domainDirectoryInfo, JObject type) + { + if (null == type) return; + if (null != type["enum"]) WriteTypeEnum(domainDirectoryInfo, type); + if (null != type["properties"]) WriteTypeClass(domainDirectoryInfo, type); + WriteTypeSimple(domainDirectoryInfo, type); + } + + private static void WriteTypeSimple(DirectoryInfo domainDirectoryInfo, JObject type) + { + _SimpleTypes[type["id"].ToString()] = type["type"].ToString(); + } + + private static void WriteTypeClass(DirectoryInfo domainDirectoryInfo, JObject type) + { + if ("object" != type["type"].ToString()) return; + var className = type["id"].ToString(); + var sb = new StringBuilder(); + sb.AppendFormat("using ChromeDevTools;"); + sb.AppendLine("using Newtonsoft.Json;"); + sb.AppendLine("using System.Collections.Generic;"); + sb.AppendLine(); + sb.AppendFormat("namespace {0}.{1}", RootNamespace, domainDirectoryInfo.Name); + sb.AppendLine(); + sb.AppendLine("{"); + sb.AppendLine("\t/// <summary>"); + sb.AppendFormat("\t/// {0}", type["description"]); + sb.AppendLine(); + sb.AppendLine("\t/// </summary>"); + sb.AppendFormat("\tpublic class {0}", className); + sb.AppendLine(); + sb.AppendLine("\t{"); + foreach (var propertyDescription in type["properties"] as JArray ?? new JArray()) + { + WriteProperty(sb, domainDirectoryInfo.Name, className, propertyDescription as JObject); + } + sb.AppendLine("\t}"); + sb.AppendLine("}"); + WriteToFile(domainDirectoryInfo, className, sb.ToString()); + } + + private static void WriteProperty(StringBuilder sb, string domain, string className, JObject property) + { + var propertyName = GeneratePropertyName(property["name"].ToString()); + string propertyType = GetString(property["type"]); + if(null != property["$ref"]) + { + propertyType = GeneratePropertyTypeFromReference(domain, property["$ref"].ToString()); + } + else if("array" == propertyType) + { + var arrayDescription = property["items"] as JObject; + if(null != arrayDescription["$ref"]) + { + propertyType = GeneratePropertyTypeFromReference(domain, arrayDescription["$ref"].ToString()) + "[]"; + } + else + { + var arrayType = GetString(arrayDescription["type"]); + if("object" == arrayType) + { + var internalClassName = ToCamelCase(propertyName) + "Array"; + propertyType = internalClassName + "[]"; + sb.AppendFormat("\t\tpublic class {0}", internalClassName); + sb.AppendLine(); + sb.AppendLine("\t\t{"); + foreach(var internalProperty in arrayDescription["properties"] as JArray ?? new JArray()) + { + WriteProperty(sb, domain, internalClassName, internalProperty as JObject); + } + sb.AppendLine("\t\t}"); + sb.AppendLine(); + } + else + { + propertyType = GeneratePropertyType(GetString(arrayDescription["type"])) + "[]"; + } + } + } + else + { + propertyType = GeneratePropertyType(propertyType.ToString()); + } + sb.AppendLine("\t\t/// <summary>"); + sb.AppendFormat("\t\t/// Gets or sets {0}", property["description"] ?? propertyName); + sb.AppendLine(); + sb.AppendLine("\t\t/// </summary>"); + if(className == propertyName) + { + sb.AppendFormat("\t\t[JsonProperty(\"{0}\")]", property["name"]); + sb.AppendLine(); + propertyName += "Child"; + } + sb.AppendFormat("\t\tpublic {0} {1} {{ get; set; }}", propertyType, propertyName); + sb.AppendLine(); + } + + private static string GeneratePropertyTypeFromReference(string domain, string propertyRef) + { + if (null == propertyRef) return null; + var propertyPaths = propertyRef.Split('.'); + if (1 == propertyPaths.Length) + { + Dictionary<string, string> domainDictionary; + string inDomainType; + if(_DomainPropertyTypes.TryGetValue(domain, out domainDictionary) + && domainDictionary.TryGetValue(propertyPaths[0], out inDomainType)) + { + if(inDomainType.StartsWith(domain + ".")) + { + return inDomainType.Substring(inDomainType.IndexOf('.') + 1); + } + return inDomainType; + } + return propertyPaths[0]; + } + else + { + domain = propertyPaths[0]; + var name = propertyPaths[1]; + return _DomainPropertyTypes[domain][name]; + } + } + + private static string GeneratePropertyType(string propertyType) + { + switch(propertyType) + { + case "number": return "double"; + case "integer": return "long"; + case "boolean": return "bool"; + case "any": return "object"; + default: return propertyType; + } + } + + private static string GeneratePropertyName(string propertyName) + { + return ToCamelCase(propertyName); + } + + private static string ToCamelCase(string propertyName) + { + return Char.ToUpper(propertyName[0]).ToString() + propertyName.Substring(1); + } + + private static void WriteTypeEnum(DirectoryInfo domainDirectoryInfo, JObject type) + { + var enumName = type["id"].ToString(); + StringBuilder sb = new StringBuilder(); + sb.AppendFormat("using ChromeDevTools;"); + sb.AppendLine(); + sb.AppendLine(); + sb.AppendFormat("namespace {0}.{1}", RootNamespace, domainDirectoryInfo.Name); + sb.AppendLine("{"); + sb.AppendLine("\t/// <summary>"); + sb.AppendFormat("\t/// {0}", type["description"]); + sb.AppendLine(); + sb.AppendLine("\t/// </summary>"); + sb.AppendFormat("\tpublic enum {0}", enumName); + sb.AppendLine(); + sb.AppendLine("\t{"); + foreach(var enumValueName in type["enum"] as JArray ?? new JArray()) + { + sb.AppendFormat("\t\t\t{0},", ToCamelCase(enumValueName.ToString().Replace("-", "_"))); + sb.AppendLine(); + } + sb.AppendLine("\t}"); + sb.AppendLine("}"); + WriteToFile(domainDirectoryInfo, enumName, sb.ToString()); + } + + private static void WriteToFile(DirectoryInfo domainDirectoryInfo, string fileName, string fileContents) + { + var fullPath = Path.Combine(domainDirectoryInfo.FullName, fileName + ".cs"); + if (File.Exists(fullPath)) File.Delete(fullPath); + File.WriteAllText(fullPath, fileContents); + } + + private static DirectoryInfo CreateDomainFolder(DirectoryInfo parentDirectory, string domainName) + { + return parentDirectory.CreateSubdirectory(domainName); + } + } +} diff --git a/AutoWebPerf/ChromeDevToolsProtocolParser/Properties/AssemblyInfo.cs b/AutoWebPerf/ChromeDevToolsProtocolParser/Properties/AssemblyInfo.cs new file mode 100644 index 0000000000000000000000000000000000000000..e5bf3b87f554f1ad96d7f72d695c54d5416b81f2 --- /dev/null +++ b/AutoWebPerf/ChromeDevToolsProtocolParser/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("ChromeDevToolsProtocolParser")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("ChromeDevToolsProtocolParser")] +[assembly: AssemblyCopyright("Copyright © 2015")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("1b9747e8-c174-4877-9385-1e9b0720388c")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/AutoWebPerf/ChromeDevToolsProtocolParser/packages.config b/AutoWebPerf/ChromeDevToolsProtocolParser/packages.config new file mode 100644 index 0000000000000000000000000000000000000000..747efc53e40d628fd51a0d128168bcf236589495 --- /dev/null +++ b/AutoWebPerf/ChromeDevToolsProtocolParser/packages.config @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="utf-8"?> +<packages> + <package id="Newtonsoft.Json" version="6.0.8" targetFramework="net45" /> +</packages> \ No newline at end of file diff --git a/AutoWebPerf/ChromeDevToolsProtocolParser/protocol.json b/AutoWebPerf/ChromeDevToolsProtocolParser/protocol.json new file mode 100644 index 0000000000000000000000000000000000000000..ea0dc88f5cdbce651b1d4a148418743307deb51f --- /dev/null +++ b/AutoWebPerf/ChromeDevToolsProtocolParser/protocol.json @@ -0,0 +1,5165 @@ +{ + "version": { "major": "1", "minor": "1" }, + "domains": [{ + "domain": "Inspector", + "hidden": true, + "types": [], + "commands": [ + { + "name": "enable", + "description": "Enables inspector domain notifications." + }, + { + "name": "disable", + "description": "Disables inspector domain notifications." + } + ], + "events": [ + { + "name": "evaluateForTestInFrontend", + "parameters": [ + { "name": "testCallId", "type": "integer" }, + { "name": "script", "type": "string" } + ] + }, + { + "name": "inspect", + "parameters": [ + { "name": "object", "$ref": "Runtime.RemoteObject" }, + { "name": "hints", "type": "object" } + ] + }, + { + "name": "detached", + "description": "Fired when remote debugging connection is about to be terminated. Contains detach reason.", + "parameters": [ + { "name": "reason", "type": "string", "description": "The reason why connection has been terminated." } + ], + "handlers": ["browser"] + }, + { + "name": "targetCrashed", + "description": "Fired when debugging target has crashed", + "handlers": ["browser"] + } + ] + }, + { + "domain": "Memory", + "hidden": true, + "commands": [ + { + "name": "getDOMCounters", + "returns": [ + { "name": "documents", "type": "integer" }, + { "name": "nodes", "type": "integer" }, + { "name": "jsEventListeners", "type": "integer" } + ] + } + ] + }, + { + "domain": "Page", + "description": "Actions and events related to the inspected page belong to the page domain.", + "types": [ + { + "id": "ResourceType", + "type": "string", + "enum": ["Document", "Stylesheet", "Image", "Media", "Font", "Script", "TextTrack", "XHR", "WebSocket", "Other"], + "description": "Resource type as it was perceived by the rendering engine." + }, + { + "id": "FrameId", + "type": "string", + "description": "Unique frame identifier." + }, + { + "id": "Frame", + "type": "object", + "description": "Information about the Frame on the page.", + "properties": [ + { "name": "id", "type": "string", "description": "Frame unique identifier." }, + { "name": "parentId", "type": "string", "optional": true, "description": "Parent frame identifier." }, + { "name": "loaderId", "$ref": "Network.LoaderId", "description": "Identifier of the loader associated with this frame." }, + { "name": "name", "type": "string", "optional": true, "description": "Frame's name as specified in the tag." }, + { "name": "url", "type": "string", "description": "Frame document's URL." }, + { "name": "securityOrigin", "type": "string", "description": "Frame document's security origin." }, + { "name": "mimeType", "type": "string", "description": "Frame document's mimeType as determined by the browser." } + ] + }, + { + "id": "FrameResourceTree", + "type": "object", + "description": "Information about the Frame hierarchy along with their cached resources.", + "properties": [ + { "name": "frame", "$ref": "Frame", "description": "Frame information for this tree item." }, + { "name": "childFrames", "type": "array", "optional": true, "items": { "$ref": "FrameResourceTree" }, "description": "Child frames." }, + { "name": "resources", "type": "array", + "items": { + "type": "object", + "properties": [ + { "name": "url", "type": "string", "description": "Resource URL." }, + { "name": "type", "$ref": "ResourceType", "description": "Type of this resource." }, + { "name": "mimeType", "type": "string", "description": "Resource mimeType as determined by the browser." }, + { "name": "failed", "type": "boolean", "optional": true, "description": "True if the resource failed to load." }, + { "name": "canceled", "type": "boolean", "optional": true, "description": "True if the resource was canceled during loading." } + ] + }, + "description": "Information about frame resources." + } + ], + "hidden": true + }, + { + "id": "ScriptIdentifier", + "type": "string", + "description": "Unique script identifier.", + "hidden": true + }, + { + "id": "NavigationEntry", + "type": "object", + "description": "Navigation history entry.", + "properties": [ + { "name": "id", "type": "integer", "description": "Unique id of the navigation history entry." }, + { "name": "url", "type": "string", "description": "URL of the navigation history entry." }, + { "name": "title", "type": "string", "description": "Title of the navigation history entry." } + ], + "hidden": true + }, + { + "id": "ScreencastFrameMetadata", + "type": "object", + "description": "Screencast frame metadata", + "properties": [ + { "name": "offsetTop", "type": "number", "hidden": true, "description": "Top offset in DIP." }, + { "name": "pageScaleFactor", "type": "number", "hidden": true, "description": "Page scale factor." }, + { "name": "deviceWidth", "type": "number", "hidden": true, "description": "Device screen width in DIP." }, + { "name": "deviceHeight", "type": "number", "hidden": true, "description": "Device screen height in DIP." }, + { "name": "scrollOffsetX", "type": "number", "hidden": true, "description": "Position of horizontal scroll in CSS pixels." }, + { "name": "scrollOffsetY", "type": "number", "hidden": true, "description": "Position of vertical scroll in CSS pixels." }, + { "name": "timestamp", "type": "number", "optional": true, "hidden": true, "description": "Frame swap timestamp." } + ], + "hidden": true + } + ], + "commands": [ + { + "name": "enable", + "description": "Enables page domain notifications.", + "handlers": ["browser", "renderer"] + }, + { + "name": "disable", + "description": "Disables page domain notifications.", + "handlers": ["browser", "renderer"] + }, + { + "name": "addScriptToEvaluateOnLoad", + "parameters": [ + { "name": "scriptSource", "type": "string" } + ], + "returns": [ + { "name": "identifier", "$ref": "ScriptIdentifier", "description": "Identifier of the added script." } + ], + "hidden": true + }, + { + "name": "removeScriptToEvaluateOnLoad", + "parameters": [ + { "name": "identifier", "$ref": "ScriptIdentifier" } + ], + "hidden": true + }, + { + "name": "reload", + "parameters": [ + { "name": "ignoreCache", "type": "boolean", "optional": true, "description": "If true, browser cache is ignored (as if the user pressed Shift+refresh)." }, + { "name": "scriptToEvaluateOnLoad", "type": "string", "optional": true, "description": "If set, the script will be injected into all frames of the inspected page after reload." } + ], + "description": "Reloads given page optionally ignoring the cache.", + "handlers": ["browser", "renderer"] + }, + { + "name": "navigate", + "parameters": [ + { "name": "url", "type": "string", "description": "URL to navigate the page to." } + ], + "returns": [ + { "name": "frameId", "$ref": "FrameId", "hidden": true, "description": "Frame id that will be navigated." } + ], + "description": "Navigates current page to the given URL.", + "handlers": ["browser", "renderer"] + }, + { + "name": "getNavigationHistory", + "parameters": [], + "returns": [ + { "name": "currentIndex", "type": "integer", "description": "Index of the current navigation history entry." }, + { "name": "entries", "type": "array", "items": { "$ref": "NavigationEntry" }, "description": "Array of navigation history entries." } + ], + "description": "Returns navigation history for the current page.", + "hidden": true, + "handlers": ["browser"] + }, + { + "name": "navigateToHistoryEntry", + "parameters": [ + { "name": "entryId", "type": "integer", "description": "Unique id of the entry to navigate to." } + ], + "description": "Navigates current page to the given history entry.", + "hidden": true, + "handlers": ["browser"] + }, + { + "name": "getCookies", + "returns": [ + { "name": "cookies", "type": "array", "items": { "$ref": "Network.Cookie" }, "description": "Array of cookie objects." } + ], + "description": "Returns all browser cookies. Depending on the backend support, will return detailed cookie information in the <code>cookies</code> field.", + "handlers": ["browser"], + "async": true, + "hidden": true, + "redirect": "Network" + }, + { + "name": "deleteCookie", + "parameters": [ + { "name": "cookieName", "type": "string", "description": "Name of the cookie to remove." }, + { "name": "url", "type": "string", "description": "URL to match cooke domain and path." } + ], + "description": "Deletes browser cookie with given name, domain and path.", + "handlers": ["browser"], + "async": true, + "hidden": true, + "redirect": "Network" + }, + { + "name": "getResourceTree", + "description": "Returns present frame / resource tree structure.", + "returns": [ + { "name": "frameTree", "$ref": "FrameResourceTree", "description": "Present frame / resource tree structure." } + ], + "hidden": true + }, + { + "name": "getResourceContent", + "async": true, + "description": "Returns content of the given resource.", + "parameters": [ + { "name": "frameId", "$ref": "FrameId", "description": "Frame id to get resource for." }, + { "name": "url", "type": "string", "description": "URL of the resource to get content for." } + ], + "returns": [ + { "name": "content", "type": "string", "description": "Resource content." }, + { "name": "base64Encoded", "type": "boolean", "description": "True, if content was served as base64." } + ], + "hidden": true + }, + { + "name": "searchInResource", + "description": "Searches for given string in resource content.", + "parameters": [ + { "name": "frameId", "$ref": "FrameId", "description": "Frame id for resource to search in." }, + { "name": "url", "type": "string", "description": "URL of the resource to search in." }, + { "name": "query", "type": "string", "description": "String to search for." }, + { "name": "caseSensitive", "type": "boolean", "optional": true, "description": "If true, search is case sensitive." }, + { "name": "isRegex", "type": "boolean", "optional": true, "description": "If true, treats string parameter as regex." } + ], + "returns": [ + { "name": "result", "type": "array", "items": { "$ref": "Debugger.SearchMatch" }, "description": "List of search matches." } + ], + "hidden": true + }, + { + "name": "setDocumentContent", + "description": "Sets given markup as the document's HTML.", + "parameters": [ + { "name": "frameId", "$ref": "FrameId", "description": "Frame id to set HTML for." }, + { "name": "html", "type": "string", "description": "HTML content to set." } + ], + "hidden": true + }, + { + "name": "setDeviceMetricsOverride", + "description": "Overrides the values of device screen dimensions (window.screen.width, window.screen.height, window.innerWidth, window.innerHeight, and \"device-width\"/\"device-height\"-related CSS media query results).", + "parameters": [ + { "name": "width", "type": "integer", "description": "Overriding width value in pixels (minimum 0, maximum 10000000). 0 disables the override." }, + { "name": "height", "type": "integer", "description": "Overriding height value in pixels (minimum 0, maximum 10000000). 0 disables the override." }, + { "name": "deviceScaleFactor", "type": "number", "description": "Overriding device scale factor value. 0 disables the override." }, + { "name": "mobile", "type": "boolean", "description": "Whether to emulate mobile device. This includes viewport meta tag, overlay scrollbars, text autosizing and more." }, + { "name": "fitWindow", "type": "boolean", "description": "Whether a view that exceeds the available browser window area should be scaled down to fit." }, + { "name": "scale", "type": "number", "optional": true, "description": "Scale to apply to resulting view image. Ignored in |fitWindow| mode." }, + { "name": "offsetX", "type": "number", "optional": true, "description": "X offset to shift resulting view image by. Ignored in |fitWindow| mode." }, + { "name": "offsetY", "type": "number", "optional": true, "description": "Y offset to shift resulting view image by. Ignored in |fitWindow| mode." } + ], + "handlers": ["browser"], + "redirect": "Emulation", + "hidden": true + }, + { + "name": "clearDeviceMetricsOverride", + "description": "Clears the overriden device metrics.", + "handlers": ["browser"], + "redirect": "Emulation", + "hidden": true + }, + { + "name": "setGeolocationOverride", + "description": "Overrides the Geolocation Position or Error. Omitting any of the parameters emulates position unavailable.", + "parameters": [ + { "name": "latitude", "type": "number", "optional": true, "description": "Mock latitude"}, + { "name": "longitude", "type": "number", "optional": true, "description": "Mock longitude"}, + { "name": "accuracy", "type": "number", "optional": true, "description": "Mock accuracy"} + ], + "redirect": "Emulation", + "handlers": ["browser"] + }, + { + "name": "clearGeolocationOverride", + "description": "Clears the overriden Geolocation Position and Error.", + "redirect": "Emulation", + "handlers": ["browser"] + }, + { + "name": "setDeviceOrientationOverride", + "description": "Overrides the Device Orientation.", + "parameters": [ + { "name": "alpha", "type": "number", "description": "Mock alpha"}, + { "name": "beta", "type": "number", "description": "Mock beta"}, + { "name": "gamma", "type": "number", "description": "Mock gamma"} + ], + "redirect": "DeviceOrientation", + "hidden": true + }, + { + "name": "clearDeviceOrientationOverride", + "description": "Clears the overridden Device Orientation.", + "redirect": "DeviceOrientation", + "hidden": true + }, + { + "name": "setTouchEmulationEnabled", + "parameters": [ + { "name": "enabled", "type": "boolean", "description": "Whether the touch event emulation should be enabled." }, + { "name": "configuration", "type": "string", "enum": ["mobile", "desktop"], "optional": true, "description": "Touch/gesture events configuration. Default: current platform." } + ], + "description": "Toggles mouse event-based touch event emulation.", + "hidden": true, + "redirect": "Emulation", + "handlers": ["browser", "renderer"] + }, + { + "name": "captureScreenshot", + "async": true, + "description": "Capture page screenshot.", + "parameters": [], + "returns": [ + { "name": "data", "type": "string", "description": "Base64-encoded image data (PNG)." } + ], + "hidden": true, + "handlers": ["browser"] + }, + { + "name": "canScreencast", + "description": "Tells whether screencast is supported.", + "returns": [ + { "name": "result", "type": "boolean", "description": "True if screencast is supported." } + ], + "hidden": true, + "handlers": ["browser"] + }, + { + "name": "startScreencast", + "description": "Starts sending each frame using the <code>screencastFrame</code> event.", + "parameters": [ + { "name": "format", "type": "string", "optional": true, "enum": ["jpeg", "png"], "description": "Image compression format." }, + { "name": "quality", "type": "integer", "optional": true, "description": "Compression quality from range [0..100]." }, + { "name": "maxWidth", "type": "integer", "optional": true, "description": "Maximum screenshot width." }, + { "name": "maxHeight", "type": "integer", "optional": true, "description": "Maximum screenshot height." } + ], + "hidden": true, + "handlers": ["browser", "renderer"] + }, + { + "name": "stopScreencast", + "description": "Stops sending each frame in the <code>screencastFrame</code>.", + "hidden": true, + "handlers": ["browser", "renderer"] + }, + { + "name": "screencastFrameAck", + "description": "Acknowledges that a screencast frame has been received by the frontend.", + "parameters": [ + { "name": "frameNumber", "type": "integer", "description": "Frame number." } + ], + "hidden": true, + "handlers": ["browser"] + }, + { + "name": "handleJavaScriptDialog", + "description": "Accepts or dismisses a JavaScript initiated dialog (alert, confirm, prompt, or onbeforeunload).", + "parameters": [ + { "name": "accept", "type": "boolean", "description": "Whether to accept or dismiss the dialog." }, + { "name": "promptText", "type": "string", "optional": true, "description": "The text to enter into the dialog prompt before accepting. Used only if this is a prompt dialog." } + ], + "hidden": true, + "handlers": ["browser"] + }, + { + "name": "setShowViewportSizeOnResize", + "description": "Paints viewport size upon main frame resize.", + "parameters": [ + { "name": "show", "type": "boolean", "description": "Whether to paint size or not." }, + { "name": "showGrid", "type": "boolean", "optional": true, "description": "Whether to paint grid as well." } + ], + "hidden": true + }, + { + "name": "setColorPickerEnabled", + "parameters": [ + { "name": "enabled", "type": "boolean", "description": "Shows / hides color picker" } + ], + "description": "Shows / hides color picker", + "hidden": true, + "handlers": ["browser"] + }, + { + "name": "setOverlayMessage", + "parameters": [ + { "name": "message", "type": "string", "optional": true, "description": "Overlay message to display when paused in debugger." } + ], + "hidden": true, + "description": "Sets overlay message." + } + ], + "events": [ + { + "name": "domContentEventFired", + "parameters": [ + { "name": "timestamp", "type": "number" } + ] + }, + { + "name": "loadEventFired", + "parameters": [ + { "name": "timestamp", "type": "number" } + ] + }, + { + "name": "frameAttached", + "description": "Fired when frame has been attached to its parent.", + "parameters": [ + { "name": "frameId", "$ref": "FrameId", "description": "Id of the frame that has been attached." }, + { "name": "parentFrameId", "$ref": "FrameId", "description": "Parent frame identifier." } + ] + }, + { + "name": "frameNavigated", + "description": "Fired once navigation of the frame has completed. Frame is now associated with the new loader.", + "parameters": [ + { "name": "frame", "$ref": "Frame", "description": "Frame object." } + ] + }, + { + "name": "frameDetached", + "description": "Fired when frame has been detached from its parent.", + "parameters": [ + { "name": "frameId", "$ref": "FrameId", "description": "Id of the frame that has been detached." } + ] + }, + { + "name": "frameStartedLoading", + "description": "Fired when frame has started loading.", + "parameters": [ + { "name": "frameId", "$ref": "FrameId", "description": "Id of the frame that has started loading." } + ], + "hidden": true + }, + { + "name": "frameStoppedLoading", + "description": "Fired when frame has stopped loading.", + "parameters": [ + { "name": "frameId", "$ref": "FrameId", "description": "Id of the frame that has stopped loading." } + ], + "hidden": true + }, + { + "name": "frameScheduledNavigation", + "description": "Fired when frame schedules a potential navigation.", + "parameters": [ + { "name": "frameId", "$ref": "FrameId", "description": "Id of the frame that has scheduled a navigation." }, + { "name": "delay", "type": "number", "description": "Delay (in seconds) until the navigation is scheduled to begin. The navigation is not guaranteed to start." } + ], + "hidden": true + }, + { + "name": "frameClearedScheduledNavigation", + "description": "Fired when frame no longer has a scheduled navigation.", + "parameters": [ + { "name": "frameId", "$ref": "FrameId", "description": "Id of the frame that has cleared its scheduled navigation." } + ], + "hidden": true + }, + { + "name": "frameResized", + "hidden": true + }, + { + "name": "javascriptDialogOpening", + "description": "Fired when a JavaScript initiated dialog (alert, confirm, prompt, or onbeforeunload) is about to open.", + "parameters": [ + { "name": "message", "type": "string", "description": "Message that will be displayed by the dialog." } + ], + "hidden": true + }, + { + "name": "javascriptDialogClosed", + "description": "Fired when a JavaScript initiated dialog (alert, confirm, prompt, or onbeforeunload) has been closed.", + "hidden": true + }, + { + "name": "screencastFrame", + "description": "Compressed image data requested by the <code>startScreencast</code>.", + "parameters": [ + { "name": "data", "type": "string", "description": "Base64-encoded compressed image." }, + { "name": "metadata", "$ref": "ScreencastFrameMetadata", "description": "Screencast frame metadata."}, + { "name": "frameNumber", "type": "integer", "optional": true, "description": "Frame number."} + ], + "hidden": true, + "handlers": ["browser"] + }, + { + "name": "screencastVisibilityChanged", + "description": "Fired when the page with currently enabled screencast was shown or hidden </code>.", + "parameters": [ + { "name": "visible", "type": "boolean", "description": "True if the page is visible." } + ], + "hidden": true, + "handlers": ["browser"] + }, + { + "name": "colorPicked", + "description": "Fired when a color has been picked.", + "parameters": [ + { "name": "color", "$ref": "DOM.RGBA", "description": "RGBA of the picked color." } + ], + "hidden": true, + "handlers": ["browser"] + }, + { + "name": "interstitialShown", + "description": "Fired when interstitial page was shown", + "hidden": true, + "handlers": ["browser"] + }, + { + "name": "interstitialHidden", + "description": "Fired when interstitial page was hidden", + "hidden": true, + "handlers": ["browser"] + } + ] + }, + { + "domain": "Rendering", + "description": "This domain allows to control rendering of the page.", + "hidden": true, + "commands": [ + { + "name": "setShowPaintRects", + "description": "Requests that backend shows paint rectangles", + "parameters": [ + { "name": "result", "type": "boolean", "description": "True for showing paint rectangles" } + ] + }, + { + "name": "setShowDebugBorders", + "description": "Requests that backend shows debug borders on layers", + "parameters": [ + { "name": "show", "type": "boolean", "description": "True for showing debug borders" } + ] + }, + { + "name": "setShowFPSCounter", + "description": "Requests that backend shows the FPS counter", + "parameters": [ + { "name": "show", "type": "boolean", "description": "True for showing the FPS counter" } + ] + }, + { + "name": "setContinuousPaintingEnabled", + "description": "Requests that backend enables continuous painting", + "parameters": [ + { "name": "enabled", "type": "boolean", "description": "True for enabling cointinuous painting" } + ] + }, + { + "name": "setShowScrollBottleneckRects", + "description": "Requests that backend shows scroll bottleneck rects", + "parameters": [ + { "name": "show", "type": "boolean", "description": "True for showing scroll bottleneck rects" } + ] + } + ] + }, + { + "domain": "Emulation", + "description": "This domain emulates different environments for the page.", + "hidden": true, + "types": [ + { + "id": "Viewport", + "type": "object", + "description": "Visible page viewport", + "properties": [ + { "name": "scrollX", "type": "number", "description": "X scroll offset in CSS pixels." }, + { "name": "scrollY", "type": "number", "description": "Y scroll offset in CSS pixels." }, + { "name": "contentsWidth", "type": "number", "description": "Contents width in CSS pixels." }, + { "name": "contentsHeight", "type": "number", "description": "Contents height in CSS pixels." }, + { "name": "pageScaleFactor", "type": "number", "description": "Page scale factor." }, + { "name": "minimumPageScaleFactor", "type": "number", "description": "Minimum page scale factor." }, + { "name": "maximumPageScaleFactor", "type": "number", "description": "Maximum page scale factor." } + ] + } + ], + "commands": [ + { + "name": "setDeviceMetricsOverride", + "description": "Overrides the values of device screen dimensions (window.screen.width, window.screen.height, window.innerWidth, window.innerHeight, and \"device-width\"/\"device-height\"-related CSS media query results).", + "parameters": [ + { "name": "width", "type": "integer", "description": "Overriding width value in pixels (minimum 0, maximum 10000000). 0 disables the override." }, + { "name": "height", "type": "integer", "description": "Overriding height value in pixels (minimum 0, maximum 10000000). 0 disables the override." }, + { "name": "deviceScaleFactor", "type": "number", "description": "Overriding device scale factor value. 0 disables the override." }, + { "name": "mobile", "type": "boolean", "description": "Whether to emulate mobile device. This includes viewport meta tag, overlay scrollbars, text autosizing and more." }, + { "name": "fitWindow", "type": "boolean", "description": "Whether a view that exceeds the available browser window area should be scaled down to fit." }, + { "name": "scale", "type": "number", "optional": true, "description": "Scale to apply to resulting view image. Ignored in |fitWindow| mode." }, + { "name": "offsetX", "type": "number", "optional": true, "description": "X offset to shift resulting view image by. Ignored in |fitWindow| mode." }, + { "name": "offsetY", "type": "number", "optional": true, "description": "Y offset to shift resulting view image by. Ignored in |fitWindow| mode." } + ], + "handlers": ["browser"] + }, + { + "name": "clearDeviceMetricsOverride", + "description": "Clears the overriden device metrics.", + "handlers": ["browser"] + }, + { + "name": "resetScrollAndPageScaleFactor", + "description": "Requests that scroll offsets and page scale factor are reset to initial values." + }, + { + "name": "setPageScaleFactor", + "description": "Sets a specified page scale factor.", + "parameters": [ + { "name": "pageScaleFactor", "type": "number", "description": "Page scale factor." } + ] + }, + { + "name": "setScriptExecutionDisabled", + "description": "Switches script execution in the page.", + "parameters": [ + { "name": "value", "type": "boolean", "description": "Whether script execution should be disabled in the page." } + ] + }, + { + "name": "setGeolocationOverride", + "description": "Overrides the Geolocation Position or Error. Omitting any of the parameters emulates position unavailable.", + "parameters": [ + { "name": "latitude", "type": "number", "optional": true, "description": "Mock latitude"}, + { "name": "longitude", "type": "number", "optional": true, "description": "Mock longitude"}, + { "name": "accuracy", "type": "number", "optional": true, "description": "Mock accuracy"} + ], + "handlers": ["browser"] + }, + { + "name": "clearGeolocationOverride", + "description": "Clears the overriden Geolocation Position and Error.", + "handlers": ["browser"] + }, + { + "name": "setTouchEmulationEnabled", + "parameters": [ + { "name": "enabled", "type": "boolean", "description": "Whether the touch event emulation should be enabled." }, + { "name": "configuration", "type": "string", "enum": ["mobile", "desktop"], "optional": true, "description": "Touch/gesture events configuration. Default: current platform." } + ], + "description": "Toggles mouse event-based touch event emulation.", + "handlers": ["browser", "renderer"] + }, + { + "name": "setEmulatedMedia", + "parameters": [ + { "name": "media", "type": "string", "description": "Media type to emulate. Empty string disables the override." } + ], + "description": "Emulates the given media for CSS media queries." + }, + { + "name": "canEmulate", + "description": "Tells whether emulation is supported.", + "returns": [ + { "name": "result", "type": "boolean", "description": "True if emulation is supported." } + ], + "handlers": ["browser"] + } + ], + "events": [ + { + "name": "viewportChanged", + "description": "Fired when a visible page viewport has changed. Only fired when device metrics are overridden.", + "parameters": [ + { "name": "viewport", "$ref": "Viewport", "description": "Viewport description." } + ] + } + ] + }, + { + "domain": "Runtime", + "description": "Runtime domain exposes JavaScript runtime by means of remote evaluation and mirror objects. Evaluation results are returned as mirror object that expose object type, string representation and unique identifier that can be used for further object reference. Original objects are maintained in memory unless they are either explicitly released or are released along with the other objects in their object group.", + "types": [ + { + "id": "RemoteObjectId", + "type": "string", + "description": "Unique object identifier." + }, + { + "id": "RemoteObject", + "type": "object", + "description": "Mirror object referencing original JavaScript object.", + "properties": [ + { "name": "type", "type": "string", "enum": ["object", "function", "undefined", "string", "number", "boolean", "symbol"], "description": "Object type." }, + { "name": "subtype", "type": "string", "optional": true, "enum": ["array", "null", "node", "regexp", "date", "map", "set", "iterator", "generator", "error"], "description": "Object subtype hint. Specified for <code>object</code> type values only." }, + { "name": "className", "type": "string", "optional": true, "description": "Object class (constructor) name. Specified for <code>object</code> type values only." }, + { "name": "value", "type": "any", "optional": true, "description": "Remote object value in case of primitive values or JSON values (if it was requested), or description string if the value can not be JSON-stringified (like NaN, Infinity, -Infinity, -0)." }, + { "name": "description", "type": "string", "optional": true, "description": "String representation of the object." }, + { "name": "objectId", "$ref": "RemoteObjectId", "optional": true, "description": "Unique object identifier (for non-primitive values)." }, + { "name": "preview", "$ref": "ObjectPreview", "optional": true, "description": "Preview containing abbreviated property values. Specified for <code>object</code> type values only.", "hidden": true }, + { "name": "customPreview", "$ref": "CustomPreview", "optional": true, "hidden": true} + ] + }, + { "id": "CustomPreview", + "type": "object", + "hidden": true, + "properties": [ + { "name": "header", "type": "string"}, + { "name": "hasBody", "type": "boolean"}, + {"name": "formatterObjectId", "$ref": "RemoteObjectId"}, + {"name": "configObjectId", "$ref": "RemoteObjectId", "optional": true} + ] + }, + { + "id": "ObjectPreview", + "type": "object", + "hidden": true, + "description": "Object containing abbreviated remote object value.", + "properties": [ + { "name": "type", "type": "string", "enum": ["object", "function", "undefined", "string", "number", "boolean", "symbol"], "description": "Object type." }, + { "name": "subtype", "type": "string", "optional": true, "enum": ["array", "null", "node", "regexp", "date", "map", "set", "iterator", "generator", "error"], "description": "Object subtype hint. Specified for <code>object</code> type values only." }, + { "name": "description", "type": "string", "optional": true, "description": "String representation of the object." }, + { "name": "lossless", "type": "boolean", "description": "Determines whether preview is lossless (contains all information of the original object)." }, + { "name": "overflow", "type": "boolean", "description": "True iff some of the properties or entries of the original object did not fit." }, + { "name": "properties", "type": "array", "items": { "$ref": "PropertyPreview" }, "description": "List of the properties." }, + { "name": "entries", "type": "array", "items": { "$ref": "EntryPreview" }, "optional": true, "description": "List of the entries. Specified for <code>map</code> and <code>set</code> subtype values only." } + ] + }, + { + "id": "PropertyPreview", + "type": "object", + "hidden": true, + "properties": [ + { "name": "name", "type": "string", "description": "Property name." }, + { "name": "type", "type": "string", "enum": ["object", "function", "undefined", "string", "number", "boolean", "symbol", "accessor"], "description": "Object type. Accessor means that the property itself is an accessor property." }, + { "name": "value", "type": "string", "optional": true, "description": "User-friendly property value string." }, + { "name": "valuePreview", "$ref": "ObjectPreview", "optional": true, "description": "Nested value preview." }, + { "name": "subtype", "type": "string", "optional": true, "enum": ["array", "null", "node", "regexp", "date", "map", "set", "iterator", "generator", "error"], "description": "Object subtype hint. Specified for <code>object</code> type values only." } + ] + }, + { + "id": "EntryPreview", + "type": "object", + "hidden": true, + "properties": [ + { "name": "key", "$ref": "ObjectPreview", "optional": true, "description": "Preview of the key. Specified for map-like collection entries." }, + { "name": "value", "$ref": "ObjectPreview", "description": "Preview of the value." } + ] + }, + { + "id": "PropertyDescriptor", + "type": "object", + "description": "Object property descriptor.", + "properties": [ + { "name": "name", "type": "string", "description": "Property name or symbol description." }, + { "name": "value", "$ref": "RemoteObject", "optional": true, "description": "The value associated with the property." }, + { "name": "writable", "type": "boolean", "optional": true, "description": "True if the value associated with the property may be changed (data descriptors only)." }, + { "name": "get", "$ref": "RemoteObject", "optional": true, "description": "A function which serves as a getter for the property, or <code>undefined</code> if there is no getter (accessor descriptors only)." }, + { "name": "set", "$ref": "RemoteObject", "optional": true, "description": "A function which serves as a setter for the property, or <code>undefined</code> if there is no setter (accessor descriptors only)." }, + { "name": "configurable", "type": "boolean", "description": "True if the type of this property descriptor may be changed and if the property may be deleted from the corresponding object." }, + { "name": "enumerable", "type": "boolean", "description": "True if this property shows up during enumeration of the properties on the corresponding object." }, + { "name": "wasThrown", "type": "boolean", "optional": true, "description": "True if the result was thrown during the evaluation." }, + { "name": "isOwn", "optional": true, "type": "boolean", "description": "True if the property is owned for the object.", "hidden": true }, + { "name": "symbol", "$ref": "RemoteObject", "optional": true, "description": "Property symbol object, if the property is of the <code>symbol</code> type.", "hidden": true } + ] + }, + { + "id": "EventListener", + "type": "object", + "description": "Object event listener.", + "properties": [ + { "name": "type", "type": "string", "description": "<code>EventListener</code>'s type." }, + { "name": "useCapture", "type": "boolean", "description": "<code>EventListener</code>'s useCapture." }, + { "name": "location", "$ref": "Debugger.Location", "description": "Handler code location." }, + { "name": "handler", "$ref": "Runtime.RemoteObject", "optional": true, "description": "Event handler function value." } + ], + "hidden": true + }, + { + "id": "InternalPropertyDescriptor", + "type": "object", + "description": "Object internal property descriptor. This property isn't normally visible in JavaScript code.", + "properties": [ + { "name": "name", "type": "string", "description": "Conventional property name." }, + { "name": "value", "$ref": "RemoteObject", "optional": true, "description": "The value associated with the property." } + ], + "hidden": true + }, + { + "id": "CallArgument", + "type": "object", + "description": "Represents function call argument. Either remote object id <code>objectId</code> or primitive <code>value</code> or neither of (for undefined) them should be specified.", + "properties": [ + { "name": "value", "type": "any", "optional": true, "description": "Primitive value, or description string if the value can not be JSON-stringified (like NaN, Infinity, -Infinity, -0)." }, + { "name": "objectId", "$ref": "RemoteObjectId", "optional": true, "description": "Remote object handle." }, + { "name": "type", "optional": true, "hidden": true, "type": "string", "enum": ["object", "function", "undefined", "string", "number", "boolean", "symbol"], "description": "Object type." } + ] + }, + { + "id": "ExecutionContextId", + "type": "integer", + "description": "Id of an execution context." + }, + { + "id": "ExecutionContextDescription", + "type": "object", + "description": "Description of an isolated world.", + "properties": [ + { "name": "id", "$ref": "ExecutionContextId", "description": "Unique id of the execution context. It can be used to specify in which execution context script evaluation should be performed." }, + { "name": "isPageContext", "type": "boolean", "optional": true, "description": "True if this is a context where inpspected web page scripts run. False if it is a content script isolated context.", "hidden": true }, + { "name": "origin", "type": "string", "description": "Execution context origin.", "hidden": true}, + { "name": "name", "type": "string", "description": "Human readable name describing given context.", "hidden": true}, + { "name": "frameId", "type": "string", "description": "Id of the owning frame. May be an empty string if the context is not associated with a frame." } + ] + } + ], + "commands": [ + { + "name": "evaluate", + "parameters": [ + { "name": "expression", "type": "string", "description": "Expression to evaluate." }, + { "name": "objectGroup", "type": "string", "optional": true, "description": "Symbolic group name that can be used to release multiple objects." }, + { "name": "includeCommandLineAPI", "type": "boolean", "optional": true, "description": "Determines whether Command Line API should be available during the evaluation.", "hidden": true }, + { "name": "doNotPauseOnExceptionsAndMuteConsole", "type": "boolean", "optional": true, "description": "Specifies whether evaluation should stop on exceptions and mute console. Overrides setPauseOnException state.", "hidden": true }, + { "name": "contextId", "$ref": "ExecutionContextId", "optional": true, "description": "Specifies in which isolated context to perform evaluation. Each content script lives in an isolated context and this parameter may be used to specify one of those contexts. If the parameter is omitted or 0 the evaluation will be performed in the context of the inspected page." }, + { "name": "returnByValue", "type": "boolean", "optional": true, "description": "Whether the result is expected to be a JSON object that should be sent by value." }, + { "name": "generatePreview", "type": "boolean", "optional": true, "hidden": true, "description": "Whether preview should be generated for the result." } + ], + "returns": [ + { "name": "result", "$ref": "RemoteObject", "description": "Evaluation result." }, + { "name": "wasThrown", "type": "boolean", "optional": true, "description": "True if the result was thrown during the evaluation." }, + { "name": "exceptionDetails", "$ref": "Debugger.ExceptionDetails", "optional": true, "hidden": true, "description": "Exception details."} + ], + "description": "Evaluates expression on global object." + }, + { + "name": "callFunctionOn", + "parameters": [ + { "name": "objectId", "$ref": "RemoteObjectId", "description": "Identifier of the object to call function on." }, + { "name": "functionDeclaration", "type": "string", "description": "Declaration of the function to call." }, + { "name": "arguments", "type": "array", "items": { "$ref": "CallArgument", "description": "Call argument." }, "optional": true, "description": "Call arguments. All call arguments must belong to the same JavaScript world as the target object." }, + { "name": "doNotPauseOnExceptionsAndMuteConsole", "type": "boolean", "optional": true, "description": "Specifies whether function call should stop on exceptions and mute console. Overrides setPauseOnException state.", "hidden": true }, + { "name": "returnByValue", "type": "boolean", "optional": true, "description": "Whether the result is expected to be a JSON object which should be sent by value." }, + { "name": "generatePreview", "type": "boolean", "optional": true, "hidden": true, "description": "Whether preview should be generated for the result." } + ], + "returns": [ + { "name": "result", "$ref": "RemoteObject", "description": "Call result." }, + { "name": "wasThrown", "type": "boolean", "optional": true, "description": "True if the result was thrown during the evaluation." } + ], + "description": "Calls function with given declaration on the given object. Object group of the result is inherited from the target object." + }, + { + "name": "getProperties", + "parameters": [ + { "name": "objectId", "$ref": "RemoteObjectId", "description": "Identifier of the object to return properties for." }, + { "name": "ownProperties", "optional": true, "type": "boolean", "description": "If true, returns properties belonging only to the element itself, not to its prototype chain." }, + { "name": "accessorPropertiesOnly", "optional": true, "type": "boolean", "description": "If true, returns accessor properties (with getter/setter) only; internal properties are not returned either.", "hidden": true }, + { "name": "generatePreview", "type": "boolean", "optional": true, "hidden": true, "description": "Whether preview should be generated for the results." } + ], + "returns": [ + { "name": "result", "type": "array", "items": { "$ref": "PropertyDescriptor" }, "description": "Object properties." }, + { "name": "internalProperties", "optional": true, "type": "array", "items": { "$ref": "InternalPropertyDescriptor" }, "description": "Internal object properties (only of the element itself).", "hidden": true } + ], + "description": "Returns properties of a given object. Object group of the result is inherited from the target object." + }, + { + "name": "getEventListeners", + "hidden": true, + "parameters": [ + { "name": "objectId", "$ref": "RemoteObjectId", "description": "Identifier of the object to return listeners for." }, + { "name": "objectGroup", "type": "string", "optional": true, "description": "Symbolic group name for handler value. Handler value is not returned without this parameter specified." } + ], + "returns": [ + { "name": "listeners", "type": "array", "items": { "$ref": "EventListener" }, "description": "Array of relevant listeners." } + ], + "description": "Returns event listeners of the given object." + }, + { + "name": "releaseObject", + "parameters": [ + { "name": "objectId", "$ref": "RemoteObjectId", "description": "Identifier of the object to release." } + ], + "description": "Releases remote object with given id." + }, + { + "name": "releaseObjectGroup", + "parameters": [ + { "name": "objectGroup", "type": "string", "description": "Symbolic object group name." } + ], + "description": "Releases all remote objects that belong to a given group." + }, + { + "name": "run", + "hidden": true, + "description": "Tells inspected instance(worker or page) that it can run in case it was started paused." + }, + { + "name": "enable", + "description": "Enables reporting of execution contexts creation by means of <code>executionContextCreated</code> event. When the reporting gets enabled the event will be sent immediately for each existing execution context." + }, + { + "name": "disable", + "hidden": true, + "description": "Disables reporting of execution contexts creation." + }, + { + "name": "isRunRequired", + "returns": [ + { "name": "result", "type": "boolean", "description": "True if the Runtime is in paused on start state." } + ], + "hidden": true + }, + { + "name": "setCustomObjectFormatterEnabled", + "parameters": [ + { + "name": "enabled", + "type": "boolean" + } + ], + "hidden": true + } + ], + "events": [ + { + "name": "executionContextCreated", + "parameters": [ + { "name": "context", "$ref": "ExecutionContextDescription", "description": "A newly created execution contex." } + ], + "description": "Issued when new execution context is created." + }, + { + "name": "executionContextDestroyed", + "parameters": [ + { "name": "executionContextId", "$ref": "ExecutionContextId", "description": "Id of the destroyed context" } + ], + "description": "Issued when execution context is destroyed." + }, + { + "name": "executionContextsCleared", + "description": "Issued when all executionContexts were cleared in browser" + } + ] + }, + { + "domain": "Console", + "description": "Console domain defines methods and events for interaction with the JavaScript console. Console collects messages created by means of the <a href='http://getfirebug.com/wiki/index.php/Console_API'>JavaScript Console API</a>. One needs to enable this domain using <code>enable</code> command in order to start receiving the console messages. Browser collects messages issued while console domain is not enabled as well and reports them using <code>messageAdded</code> notification upon enabling.", + "types": [ + { + "id": "Timestamp", + "type": "number", + "description": "Number of seconds since epoch.", + "hidden": true + }, + { + "id": "ConsoleMessage", + "type": "object", + "description": "Console message.", + "properties": [ + { "name": "source", "type": "string", "enum": ["xml", "javascript", "network", "console-api", "storage", "appcache", "rendering", "css", "security", "other", "deprecation"], "description": "Message source." }, + { "name": "level", "type": "string", "enum": ["log", "warning", "error", "debug", "info"], "description": "Message severity." }, + { "name": "text", "type": "string", "description": "Message text." }, + { "name": "type", "type": "string", "optional": true, "enum": ["log", "dir", "dirxml", "table", "trace", "clear", "startGroup", "startGroupCollapsed", "endGroup", "assert", "profile", "profileEnd"], "description": "Console message type." }, + { "name": "scriptId", "type": "string", "optional": true, "description": "Script ID of the message origin." }, + { "name": "url", "type": "string", "optional": true, "description": "URL of the message origin." }, + { "name": "line", "type": "integer", "optional": true, "description": "Line number in the resource that generated this message." }, + { "name": "column", "type": "integer", "optional": true, "description": "Column number in the resource that generated this message." }, + { "name": "repeatCount", "type": "integer", "optional": true, "description": "Repeat count for repeated messages." }, + { "name": "parameters", "type": "array", "items": { "$ref": "Runtime.RemoteObject" }, "optional": true, "description": "Message parameters in case of the formatted message." }, + { "name": "stackTrace", "$ref": "StackTrace", "optional": true, "description": "JavaScript stack trace for assertions and error messages." }, + { "name": "asyncStackTrace", "$ref": "AsyncStackTrace", "optional": true, "description": "Asynchronous JavaScript stack trace that preceded this message, if available.", "hidden": true }, + { "name": "networkRequestId", "$ref": "Network.RequestId", "optional": true, "description": "Identifier of the network request associated with this message." }, + { "name": "timestamp", "$ref": "Timestamp", "description": "Timestamp, when this message was fired.", "hidden": true }, + { "name": "executionContextId", "$ref": "Runtime.ExecutionContextId", "optional": true, "description": "Identifier of the context where this message was created", "hidden": true } + ] + }, + { + "id": "CallFrame", + "type": "object", + "description": "Stack entry for console errors and assertions.", + "properties": [ + { "name": "functionName", "type": "string", "description": "JavaScript function name." }, + { "name": "scriptId", "type": "string", "description": "JavaScript script id." }, + { "name": "url", "type": "string", "description": "JavaScript script name or url." }, + { "name": "lineNumber", "type": "integer", "description": "JavaScript script line number." }, + { "name": "columnNumber", "type": "integer", "description": "JavaScript script column number." } + ] + }, + { + "id": "StackTrace", + "type": "array", + "items": { "$ref": "CallFrame" }, + "description": "Call frames for assertions or error messages." + }, + { + "id": "AsyncStackTrace", + "type": "object", + "properties": [ + { "name": "callFrames", "type": "array", "items": { "$ref": "CallFrame" }, "description": "Call frames of the stack trace." }, + { "name": "description", "type": "string", "optional": true, "description": "String label of this stack trace. For async traces this may be a name of the function that initiated the async call." }, + { "name": "asyncStackTrace", "$ref": "AsyncStackTrace", "optional": true, "description": "Next asynchronous stack trace, if any." } + ], + "description": "Asynchronous JavaScript call stack.", + "hidden": true + } + ], + "commands": [ + { + "name": "enable", + "description": "Enables console domain, sends the messages collected so far to the client by means of the <code>messageAdded</code> notification." + }, + { + "name": "disable", + "description": "Disables console domain, prevents further console messages from being reported to the client." + }, + { + "name": "clearMessages", + "description": "Clears console messages collected in the browser." + } + ], + "events": [ + { + "name": "messageAdded", + "parameters": [ + { "name": "message", "$ref": "ConsoleMessage", "description": "Console message that has been added." } + ], + "description": "Issued when new console message is added." + }, + { + "name": "messageRepeatCountUpdated", + "parameters": [ + { "name": "count", "type": "integer", "description": "New repeat count value." }, + { "name": "timestamp", "$ref": "Timestamp", "description": "Timestamp of most recent message in batch.", "hidden": true } + ], + "description": "Is not issued. Will be gone in the future versions of the protocol.", + "deprecated": true + }, + { + "name": "messagesCleared", + "description": "Issued when console is cleared. This happens either upon <code>clearMessages</code> command or after page navigation." + } + ] + }, + { + "domain": "Network", + "description": "Network domain allows tracking network activities of the page. It exposes information about http, file, data and other requests and responses, their headers, bodies, timing, etc.", + "types": [ + { + "id": "LoaderId", + "type": "string", + "description": "Unique loader identifier." + }, + { + "id": "RequestId", + "type": "string", + "description": "Unique request identifier." + }, + { + "id": "Timestamp", + "type": "number", + "description": "Number of seconds since epoch." + }, + { + "id": "Headers", + "type": "object", + "description": "Request / response headers as keys / values of JSON object." + }, + { + "id": "ResourceTiming", + "type": "object", + "description": "Timing information for the request.", + "properties": [ + { "name": "requestTime", "type": "number", "description": "Timing's requestTime is a baseline in seconds, while the other numbers are ticks in milliseconds relatively to this requestTime." }, + { "name": "proxyStart", "type": "number", "description": "Started resolving proxy." }, + { "name": "proxyEnd", "type": "number", "description": "Finished resolving proxy." }, + { "name": "dnsStart", "type": "number", "description": "Started DNS address resolve." }, + { "name": "dnsEnd", "type": "number", "description": "Finished DNS address resolve." }, + { "name": "connectStart", "type": "number", "description": "Started connecting to the remote host." }, + { "name": "connectEnd", "type": "number", "description": "Connected to the remote host." }, + { "name": "sslStart", "type": "number", "description": "Started SSL handshake." }, + { "name": "sslEnd", "type": "number", "description": "Finished SSL handshake." }, + { "name": "serviceWorkerFetchStart", "type": "number", "description": "Started fetching via ServiceWorker.", "hidden": true }, + { "name": "serviceWorkerFetchReady", "type": "number", "description": "Prepared a ServiceWorker.", "hidden": true }, + { "name": "serviceWorkerFetchEnd", "type": "number", "description": "Finished fetching via ServiceWorker.", "hidden": true }, + { "name": "sendStart", "type": "number", "description": "Started sending request." }, + { "name": "sendEnd", "type": "number", "description": "Finished sending request." }, + { "name": "receiveHeadersEnd", "type": "number", "description": "Finished receiving response headers." } + ] + }, + { + "id": "Request", + "type": "object", + "description": "HTTP request data.", + "properties": [ + { "name": "url", "type": "string", "description": "Request URL." }, + { "name": "method", "type": "string", "description": "HTTP request method." }, + { "name": "headers", "$ref": "Headers", "description": "HTTP request headers." }, + { "name": "postData", "type": "string", "optional": true, "description": "HTTP POST request data." } + ] + }, + { + "id": "Response", + "type": "object", + "description": "HTTP response data.", + "properties": [ + { "name": "url", "type": "string", "description": "Response URL. This URL can be different from CachedResource.url in case of redirect." }, + { "name": "status", "type": "number", "description": "HTTP response status code." }, + { "name": "statusText", "type": "string", "description": "HTTP response status text." }, + { "name": "headers", "$ref": "Headers", "description": "HTTP response headers." }, + { "name": "headersText", "type": "string", "optional": true, "description": "HTTP response headers text." }, + { "name": "mimeType", "type": "string", "description": "Resource mimeType as determined by the browser." }, + { "name": "requestHeaders", "$ref": "Headers", "optional": true, "description": "Refined HTTP request headers that were actually transmitted over the network." }, + { "name": "requestHeadersText", "type": "string", "optional": true, "description": "HTTP request headers text." }, + { "name": "connectionReused", "type": "boolean", "description": "Specifies whether physical connection was actually reused for this request." }, + { "name": "connectionId", "type": "number", "description": "Physical connection id that was actually used for this request." }, + { "name": "remoteIPAddress", "type": "string", "optional": true, "hidden": true, "description": "Remote IP address." }, + { "name": "remotePort", "type": "integer", "optional": true, "hidden": true, "description": "Remote port."}, + { "name": "fromDiskCache", "type": "boolean", "optional": true, "description": "Specifies that the request was served from the disk cache." }, + { "name": "fromServiceWorker", "type": "boolean", "optional": true, "description": "Specifies that the request was served from the ServiceWorker." }, + { "name": "encodedDataLength", "type": "number", "optional": false, "description": "Total number of bytes received for this request so far." }, + { "name": "timing", "$ref": "ResourceTiming", "optional": true, "description": "Timing information for the given request." }, + { "name": "protocol", "type": "string", "optional": true, "description": "Protocol used to fetch this resquest." } + ] + }, + { + "id": "WebSocketRequest", + "type": "object", + "description": "WebSocket request data.", + "hidden": true, + "properties": [ + { "name": "headers", "$ref": "Headers", "description": "HTTP request headers." } + ] + }, + { + "id": "WebSocketResponse", + "type": "object", + "description": "WebSocket response data.", + "hidden": true, + "properties": [ + { "name": "status", "type": "number", "description": "HTTP response status code." }, + { "name": "statusText", "type": "string", "description": "HTTP response status text." }, + { "name": "headers", "$ref": "Headers", "description": "HTTP response headers." }, + { "name": "headersText", "type": "string", "optional": true, "description": "HTTP response headers text." }, + { "name": "requestHeaders", "$ref": "Headers", "optional": true, "description": "HTTP request headers." }, + { "name": "requestHeadersText", "type": "string", "optional": true, "description": "HTTP request headers text." } + ] + }, + { + "id": "WebSocketFrame", + "type": "object", + "description": "WebSocket frame data.", + "hidden": true, + "properties": [ + { "name": "opcode", "type": "number", "description": "WebSocket frame opcode." }, + { "name": "mask", "type": "boolean", "description": "WebSocke frame mask." }, + { "name": "payloadData", "type": "string", "description": "WebSocke frame payload data." } + ] + }, + { + "id": "CachedResource", + "type": "object", + "description": "Information about the cached resource.", + "properties": [ + { "name": "url", "type": "string", "description": "Resource URL. This is the url of the original network request." }, + { "name": "type", "$ref": "Page.ResourceType", "description": "Type of this resource." }, + { "name": "response", "$ref": "Response", "optional": true, "description": "Cached response data." }, + { "name": "bodySize", "type": "number", "description": "Cached response body size." } + ] + }, + { + "id": "Initiator", + "type": "object", + "description": "Information about the request initiator.", + "properties": [ + { "name": "type", "type": "string", "enum": ["parser", "script", "other"], "description": "Type of this initiator." }, + { "name": "stackTrace", "$ref": "Console.StackTrace", "optional": true, "description": "Initiator JavaScript stack trace, set for Script only." }, + { "name": "url", "type": "string", "optional": true, "description": "Initiator URL, set for Parser type only." }, + { "name": "lineNumber", "type": "number", "optional": true, "description": "Initiator line number, set for Parser type only." }, + { "name": "asyncStackTrace", "$ref": "Console.AsyncStackTrace", "optional": true, "description": "Initiator asynchronous JavaScript stack trace, if available.", "hidden": true } + ] + }, + { + "id": "Cookie", + "type": "object", + "description": "Cookie object", + "properties": [ + { "name": "name", "type": "string", "description": "Cookie name." }, + { "name": "value", "type": "string", "description": "Cookie value." }, + { "name": "domain", "type": "string", "description": "Cookie domain." }, + { "name": "path", "type": "string", "description": "Cookie path." }, + { "name": "expires", "type": "number", "description": "Cookie expires." }, + { "name": "size", "type": "integer", "description": "Cookie size." }, + { "name": "httpOnly", "type": "boolean", "description": "True if cookie is http-only." }, + { "name": "secure", "type": "boolean", "description": "True if cookie is secure." }, + { "name": "session", "type": "boolean", "description": "True in case of session cookie." } + ], + "hidden": true + } + ], + "commands": [ + { + "name": "enable", + "description": "Enables network tracking, network events will now be delivered to the client." + }, + { + "name": "disable", + "description": "Disables network tracking, prevents network events from being sent to the client." + }, + { + "name": "setUserAgentOverride", + "description": "Allows overriding user agent with the given string.", + "parameters": [ + { "name": "userAgent", "type": "string", "description": "User agent to use." } + ] + }, + { + "name": "setExtraHTTPHeaders", + "description": "Specifies whether to always send extra HTTP headers with the requests from this page.", + "parameters": [ + { "name": "headers", "$ref": "Headers", "description": "Map with extra HTTP headers." } + ] + }, + { + "name": "getResponseBody", + "async": true, + "description": "Returns content served for the given request.", + "parameters": [ + { "name": "requestId", "$ref": "RequestId", "description": "Identifier of the network request to get content for." } + ], + "returns": [ + { "name": "body", "type": "string", "description": "Response body." }, + { "name": "base64Encoded", "type": "boolean", "description": "True, if content was sent as base64." } + ] + }, + { + "name": "replayXHR", + "description": "This method sends a new XMLHttpRequest which is identical to the original one. The following parameters should be identical: method, url, async, request body, extra headers, withCredentials attribute, user, password.", + "parameters": [ + { "name": "requestId", "$ref": "RequestId", "description": "Identifier of XHR to replay." } + ], + "hidden": true + }, + { + "name": "setMonitoringXHREnabled", + "parameters": [ + { "name": "enabled", "type": "boolean", "description": "Monitoring enabled state." } + ], + "description": "Toggles monitoring of XMLHttpRequest. If <code>true</code>, console will receive messages upon each XHR issued.", + "hidden": true + }, + { + "name": "canClearBrowserCache", + "description": "Tells whether clearing browser cache is supported.", + "returns": [ + { "name": "result", "type": "boolean", "description": "True if browser cache can be cleared." } + ] + }, + { + "name": "clearBrowserCache", + "description": "Clears browser cache.", + "handlers": ["browser"] + }, + { + "name": "canClearBrowserCookies", + "description": "Tells whether clearing browser cookies is supported.", + "returns": [ + { "name": "result", "type": "boolean", "description": "True if browser cookies can be cleared." } + ] + }, + { + "name": "clearBrowserCookies", + "description": "Clears browser cookies.", + "handlers": ["browser"] + }, + { + "name": "getCookies", + "returns": [ + { "name": "cookies", "type": "array", "items": { "$ref": "Cookie" }, "description": "Array of cookie objects." } + ], + "description": "Returns all browser cookies. Depending on the backend support, will return detailed cookie information in the <code>cookies</code> field.", + "handlers": ["browser"], + "async": true, + "hidden": true + }, + { + "name": "deleteCookie", + "parameters": [ + { "name": "cookieName", "type": "string", "description": "Name of the cookie to remove." }, + { "name": "url", "type": "string", "description": "URL to match cooke domain and path." } + ], + "description": "Deletes browser cookie with given name, domain and path.", + "handlers": ["browser"], + "async": true, + "hidden": true + }, + { + "name": "canEmulateNetworkConditions", + "description": "Tells whether emulation of network conditions is supported.", + "returns": [ + { "name": "result", "type": "boolean", "description": "True if emulation of network conditions is supported." } + ], + "hidden": true, + "handlers": ["browser"] + }, + { + "name": "emulateNetworkConditions", + "description": "Activates emulation of network conditions.", + "parameters": [ + { "name": "offline", "type": "boolean", "description": "True to emulate internet disconnection." }, + { "name": "latency", "type": "number", "description": "Additional latency (ms)." }, + { "name": "downloadThroughput", "type": "number", "description": "Maximal aggregated download throughput." }, + { "name": "uploadThroughput", "type": "number", "description": "Maximal aggregated upload throughput." } + ], + "hidden": true, + "handlers": ["browser", "renderer"] + }, + { + "name": "setCacheDisabled", + "parameters": [ + { "name": "cacheDisabled", "type": "boolean", "description": "Cache disabled state." } + ], + "description": "Toggles ignoring cache for each request. If <code>true</code>, cache will not be used." + }, + { + "name": "setDataSizeLimitsForTest", + "parameters": [ + { "name": "maxTotalSize", "type": "integer", "description": "Maximum total buffer size." }, + { "name": "maxResourceSize", "type": "integer", "description": "Maximum per-resource size." } + ], + "description": "For testing.", + "hidden": true + } + ], + "events": [ + { + "name": "requestWillBeSent", + "description": "Fired when page is about to send HTTP request.", + "parameters": [ + { "name": "requestId", "$ref": "RequestId", "description": "Request identifier." }, + { "name": "frameId", "$ref": "Page.FrameId", "description": "Frame identifier.", "hidden": true }, + { "name": "loaderId", "$ref": "LoaderId", "description": "Loader identifier." }, + { "name": "documentURL", "type": "string", "description": "URL of the document this request is loaded for." }, + { "name": "request", "$ref": "Request", "description": "Request data." }, + { "name": "timestamp", "$ref": "Timestamp", "description": "Timestamp." }, + { "name": "wallTime", "$ref": "Timestamp", "hidden": true, "description": "UTC Timestamp." }, + { "name": "initiator", "$ref": "Initiator", "description": "Request initiator." }, + { "name": "redirectResponse", "optional": true, "$ref": "Response", "description": "Redirect response data." }, + { "name": "type", "$ref": "Page.ResourceType", "optional": true, "hidden": true, "description": "Type of this resource." } + ] + }, + { + "name": "requestServedFromCache", + "description": "Fired if request ended up loading from cache.", + "parameters": [ + { "name": "requestId", "$ref": "RequestId", "description": "Request identifier." } + ] + }, + { + "name": "responseReceived", + "description": "Fired when HTTP response is available.", + "parameters": [ + { "name": "requestId", "$ref": "RequestId", "description": "Request identifier." }, + { "name": "frameId", "$ref": "Page.FrameId", "description": "Frame identifier.", "hidden": true }, + { "name": "loaderId", "$ref": "LoaderId", "description": "Loader identifier." }, + { "name": "timestamp", "$ref": "Timestamp", "description": "Timestamp." }, + { "name": "type", "$ref": "Page.ResourceType", "description": "Resource type." }, + { "name": "response", "$ref": "Response", "description": "Response data." } + ] + }, + { + "name": "dataReceived", + "description": "Fired when data chunk was received over the network.", + "parameters": [ + { "name": "requestId", "$ref": "RequestId", "description": "Request identifier." }, + { "name": "timestamp", "$ref": "Timestamp", "description": "Timestamp." }, + { "name": "dataLength", "type": "integer", "description": "Data chunk length." }, + { "name": "encodedDataLength", "type": "integer", "description": "Actual bytes received (might be less than dataLength for compressed encodings)." } + ] + }, + { + "name": "loadingFinished", + "description": "Fired when HTTP request has finished loading.", + "parameters": [ + { "name": "requestId", "$ref": "RequestId", "description": "Request identifier." }, + { "name": "timestamp", "$ref": "Timestamp", "description": "Timestamp." }, + { "name": "encodedDataLength", "type": "number", "description": "Total number of bytes received for this request." } + ] + }, + { + "name": "loadingFailed", + "description": "Fired when HTTP request has failed to load.", + "parameters": [ + { "name": "requestId", "$ref": "RequestId", "description": "Request identifier." }, + { "name": "timestamp", "$ref": "Timestamp", "description": "Timestamp." }, + { "name": "type", "$ref": "Page.ResourceType", "description": "Resource type." }, + { "name": "errorText", "type": "string", "description": "User friendly error message." }, + { "name": "canceled", "type": "boolean", "optional": true, "description": "True if loading was canceled." } + ] + }, + { + "name": "webSocketWillSendHandshakeRequest", + "description": "Fired when WebSocket is about to initiate handshake.", + "parameters": [ + { "name": "requestId", "$ref": "RequestId", "description": "Request identifier." }, + { "name": "timestamp", "$ref": "Timestamp", "description": "Timestamp." }, + { "name": "wallTime", "$ref": "Timestamp", "hidden": true, "description": "UTC Timestamp." }, + { "name": "request", "$ref": "WebSocketRequest", "description": "WebSocket request data." } + ], + "hidden": true + }, + { + "name": "webSocketHandshakeResponseReceived", + "description": "Fired when WebSocket handshake response becomes available.", + "parameters": [ + { "name": "requestId", "$ref": "RequestId", "description": "Request identifier." }, + { "name": "timestamp", "$ref": "Timestamp", "description": "Timestamp." }, + { "name": "response", "$ref": "WebSocketResponse", "description": "WebSocket response data." } + ], + "hidden": true + }, + { + "name": "webSocketCreated", + "description": "Fired upon WebSocket creation.", + "parameters": [ + { "name": "requestId", "$ref": "RequestId", "description": "Request identifier." }, + { "name": "url", "type": "string", "description": "WebSocket request URL." } + ], + "hidden": true + }, + { + "name": "webSocketClosed", + "description": "Fired when WebSocket is closed.", + "parameters": [ + { "name": "requestId", "$ref": "RequestId", "description": "Request identifier." }, + { "name": "timestamp", "$ref": "Timestamp", "description": "Timestamp." } + ], + "hidden": true + }, + { + "name": "webSocketFrameReceived", + "description": "Fired when WebSocket frame is received.", + "parameters": [ + { "name": "requestId", "$ref": "RequestId", "description": "Request identifier." }, + { "name": "timestamp", "$ref": "Timestamp", "description": "Timestamp." }, + { "name": "response", "$ref": "WebSocketFrame", "description": "WebSocket response data." } + ], + "hidden": true + }, + { + "name": "webSocketFrameError", + "description": "Fired when WebSocket frame error occurs.", + "parameters": [ + { "name": "requestId", "$ref": "RequestId", "description": "Request identifier." }, + { "name": "timestamp", "$ref": "Timestamp", "description": "Timestamp." }, + { "name": "errorMessage", "type": "string", "description": "WebSocket frame error message." } + ], + "hidden": true + }, + { + "name": "webSocketFrameSent", + "description": "Fired when WebSocket frame is sent.", + "parameters": [ + { "name": "requestId", "$ref": "RequestId", "description": "Request identifier." }, + { "name": "timestamp", "$ref": "Timestamp", "description": "Timestamp." }, + { "name": "response", "$ref": "WebSocketFrame", "description": "WebSocket response data." } + ], + "hidden": true + }, + { + "name": "eventSourceMessageReceived", + "description": "Fired when EventSource message is received.", + "parameters": [ + { "name": "requestId", "$ref": "RequestId", "description": "Request identifier." }, + { "name": "timestamp", "$ref": "Timestamp", "description": "Timestamp." }, + { "name": "eventName", "type": "string", "description": "Message type." }, + { "name": "eventId", "type": "string", "description": "Message identifier." }, + { "name": "data", "type": "string", "description": "Message content." } + ], + "hidden": true + } + ] + }, + { + "domain": "Database", + "hidden": true, + "types": [ + { + "id": "DatabaseId", + "type": "string", + "description": "Unique identifier of Database object.", + "hidden": true + }, + { + "id": "Database", + "type": "object", + "description": "Database object.", + "hidden": true, + "properties": [ + { "name": "id", "$ref": "DatabaseId", "description": "Database ID." }, + { "name": "domain", "type": "string", "description": "Database domain." }, + { "name": "name", "type": "string", "description": "Database name." }, + { "name": "version", "type": "string", "description": "Database version." } + ] + }, + { + "id": "Error", + "type": "object", + "description": "Database error.", + "properties": [ + { "name": "message", "type": "string", "description": "Error message." }, + { "name": "code", "type": "integer", "description": "Error code." } + ] + } + ], + "commands": [ + { + "name": "enable", + "description": "Enables database tracking, database events will now be delivered to the client." + }, + { + "name": "disable", + "description": "Disables database tracking, prevents database events from being sent to the client." + }, + { + "name": "getDatabaseTableNames", + "parameters": [ + { "name": "databaseId", "$ref": "DatabaseId" } + ], + "returns": [ + { "name": "tableNames", "type": "array", "items": { "type": "string" } } + ] + }, + { + "name": "executeSQL", + "async": true, + "parameters": [ + { "name": "databaseId", "$ref": "DatabaseId" }, + { "name": "query", "type": "string" } + ], + "returns": [ + { "name": "columnNames", "type": "array", "optional": true, "items": { "type": "string" } }, + { "name": "values", "type": "array", "optional": true, "items": { "type": "any" }}, + { "name": "sqlError", "$ref": "Error", "optional": true } + ] + } + ], + "events": [ + { + "name": "addDatabase", + "parameters": [ + { "name": "database", "$ref": "Database" } + ] + } + ] + }, + { + "domain": "IndexedDB", + "hidden": true, + "types": [ + { + "id": "DatabaseWithObjectStores", + "type": "object", + "description": "Database with an array of object stores.", + "properties": [ + { "name": "name", "type": "string", "description": "Database name." }, + { "name": "version", "type": "string", "description": "Deprecated string database version." }, + { "name": "intVersion", "type": "integer", "description": "Integer database version." }, + { "name": "objectStores", "type": "array", "items": { "$ref": "ObjectStore" }, "description": "Object stores in this database." } + ] + }, + { + "id": "ObjectStore", + "type": "object", + "description": "Object store.", + "properties": [ + { "name": "name", "type": "string", "description": "Object store name." }, + { "name": "keyPath", "$ref": "KeyPath", "description": "Object store key path." }, + { "name": "autoIncrement", "type": "boolean", "description": "If true, object store has auto increment flag set." }, + { "name": "indexes", "type": "array", "items": { "$ref": "ObjectStoreIndex" }, "description": "Indexes in this object store." } + ] + }, + { + "id": "ObjectStoreIndex", + "type": "object", + "description": "Object store index.", + "properties": [ + { "name": "name", "type": "string", "description": "Index name." }, + { "name": "keyPath", "$ref": "KeyPath", "description": "Index key path." }, + { "name": "unique", "type": "boolean", "description": "If true, index is unique." }, + { "name": "multiEntry", "type": "boolean", "description": "If true, index allows multiple entries for a key." } + ] + }, + { + "id": "Key", + "type": "object", + "description": "Key.", + "properties": [ + { "name": "type", "type": "string", "enum": ["number", "string", "date", "array"], "description": "Key type." }, + { "name": "number", "type": "number", "optional": true, "description": "Number value." }, + { "name": "string", "type": "string", "optional": true, "description": "String value." }, + { "name": "date", "type": "number", "optional": true, "description": "Date value." }, + { "name": "array", "type": "array", "optional": true, "items": { "$ref": "Key" }, "description": "Array value." } + ] + }, + { + "id": "KeyRange", + "type": "object", + "description": "Key range.", + "properties": [ + { "name": "lower", "$ref": "Key", "optional": true, "description": "Lower bound." }, + { "name": "upper", "$ref": "Key", "optional": true, "description": "Upper bound." }, + { "name": "lowerOpen", "type": "boolean", "description": "If true lower bound is open." }, + { "name": "upperOpen", "type": "boolean", "description": "If true upper bound is open." } + ] + }, + { + "id": "DataEntry", + "type": "object", + "description": "Data entry.", + "properties": [ + { "name": "key", "type": "string", "description": "JSON-stringified key object." }, + { "name": "primaryKey", "type": "string", "description": "JSON-stringified primary key object." }, + { "name": "value", "type": "string", "description": "JSON-stringified value object." } + ] + }, + { + "id": "KeyPath", + "type": "object", + "description": "Key path.", + "properties": [ + { "name": "type", "type": "string", "enum": ["null", "string", "array"], "description": "Key path type." }, + { "name": "string", "type": "string", "optional": true, "description": "String value." }, + { "name": "array", "type": "array", "optional": true, "items": { "type": "string" }, "description": "Array value." } + ] + } + ], + "commands": [ + { + "name": "enable", + "description": "Enables events from backend." + }, + { + "name": "disable", + "description": "Disables events from backend." + }, + { + "name": "requestDatabaseNames", + "async": true, + "parameters": [ + { "name": "securityOrigin", "type": "string", "description": "Security origin." } + ], + "returns": [ + { "name": "databaseNames", "type": "array", "items": { "type": "string" }, "description": "Database names for origin." } + ], + "description": "Requests database names for given security origin." + }, + { + "name": "requestDatabase", + "async": true, + "parameters": [ + { "name": "securityOrigin", "type": "string", "description": "Security origin." }, + { "name": "databaseName", "type": "string", "description": "Database name." } + ], + "returns": [ + { "name": "databaseWithObjectStores", "$ref": "DatabaseWithObjectStores", "description": "Database with an array of object stores." } + ], + "description": "Requests database with given name in given frame." + }, + { + "name": "requestData", + "async": true, + "parameters": [ + { "name": "securityOrigin", "type": "string", "description": "Security origin." }, + { "name": "databaseName", "type": "string", "description": "Database name." }, + { "name": "objectStoreName", "type": "string", "description": "Object store name." }, + { "name": "indexName", "type": "string", "description": "Index name, empty string for object store data requests." }, + { "name": "skipCount", "type": "integer", "description": "Number of records to skip." }, + { "name": "pageSize", "type": "integer", "description": "Number of records to fetch." }, + { "name": "keyRange", "$ref": "KeyRange", "optional": true, "description": "Key range." } + ], + "returns": [ + { "name": "objectStoreDataEntries", "type": "array", "items": { "$ref": "DataEntry" }, "description": "Array of object store data entries." }, + { "name": "hasMore", "type": "boolean", "description": "If true, there are more entries to fetch in the given range." } + ], + "description": "Requests data from object store or index." + }, + { + "name": "clearObjectStore", + "async": true, + "parameters": [ + { "name": "securityOrigin", "type": "string", "description": "Security origin." }, + { "name": "databaseName", "type": "string", "description": "Database name." }, + { "name": "objectStoreName", "type": "string", "description": "Object store name." } + ], + "returns": [ + ], + "description": "Clears all entries from an object store." + } + ] + }, + { + "domain": "CacheStorage", + "hidden": true, + "types": [ + { + "id": "CacheId", + "type": "string", + "description": "Unique identifier of the Cache object." + }, + { + "id": "DataEntry", + "type": "object", + "description": "Data entry.", + "properties": [ + { "name": "request", "type": "string", "description": "JSON-stringified request object." }, + { "name": "response", "type": "string", "description": "JSON-stringified response object." } + ] + }, + { + "id": "Cache", + "type": "object", + "description": "Cache identifier.", + "properties": [ + { "name": "cacheId", "$ref": "CacheId", "description": "An opaque unique id of the cache." }, + { "name": "securityOrigin", "type": "string", "description": "Security origin of the cache." }, + { "name": "cacheName", "type": "string", "description": "The name of the cache." } + ] + } + ], + "commands": [ + { + "name": "requestCacheNames", + "async": true, + "parameters": [ + { "name": "securityOrigin", "type": "string", "description": "Security origin." } + ], + "returns": [ + { "name": "caches", "type": "array", "items": { "$ref": "Cache" }, "description": "Caches for the security origin." } + ], + "description": "Requests cache names." + }, + { + "name": "requestEntries", + "async": true, + "parameters": [ + { "name": "cacheId", "$ref": "CacheId", "description": "ID of cache to get entries from." }, + { "name": "skipCount", "type": "integer", "description": "Number of records to skip." }, + { "name": "pageSize", "type": "integer", "description": "Number of records to fetch." } + ], + "returns": [ + { "name": "cacheDataEntries", "type": "array", "items": { "$ref": "DataEntry" }, "description": "Array of object store data entries." }, + { "name": "hasMore", "type": "boolean", "description": "If true, there are more entries to fetch in the given range." } + ], + "description": "Requests data from cache." + }, + { + "name": "deleteCache", + "async": true, + "parameters": [ + { "name": "cacheId", "$ref": "CacheId", "description": "Id of cache for deletion." } + ], + "description": "Deletes a cache." + } + ] + }, + { + "domain": "DOMStorage", + "hidden": true, + "description": "Query and modify DOM storage.", + "types": [ + { + "id": "StorageId", + "type": "object", + "description": "DOM Storage identifier.", + "hidden": true, + "properties": [ + { "name": "securityOrigin", "type": "string", "description": "Security origin for the storage." }, + { "name": "isLocalStorage", "type": "boolean", "description": "Whether the storage is local storage (not session storage)." } + ] + }, + { + "id": "Item", + "type": "array", + "description": "DOM Storage item.", + "hidden": true, + "items": { "type": "string" } + } + ], + "commands": [ + { + "name": "enable", + "description": "Enables storage tracking, storage events will now be delivered to the client." + }, + { + "name": "disable", + "description": "Disables storage tracking, prevents storage events from being sent to the client." + }, + { + "name": "getDOMStorageItems", + "parameters": [ + { "name": "storageId", "$ref": "StorageId" } + ], + "returns": [ + { "name": "entries", "type": "array", "items": { "$ref": "Item" } } + ] + }, + { + "name": "setDOMStorageItem", + "parameters": [ + { "name": "storageId", "$ref": "StorageId" }, + { "name": "key", "type": "string" }, + { "name": "value", "type": "string" } + ] + }, + { + "name": "removeDOMStorageItem", + "parameters": [ + { "name": "storageId", "$ref": "StorageId" }, + { "name": "key", "type": "string" } + ] + } + ], + "events": [ + { + "name": "domStorageItemsCleared", + "parameters": [ + { "name": "storageId", "$ref": "StorageId" } + ] + }, + { + "name": "domStorageItemRemoved", + "parameters": [ + { "name": "storageId", "$ref": "StorageId" }, + { "name": "key", "type": "string" } + ] + }, + { + "name": "domStorageItemAdded", + "parameters": [ + { "name": "storageId", "$ref": "StorageId" }, + { "name": "key", "type": "string" }, + { "name": "newValue", "type": "string" } + ] + }, + { + "name": "domStorageItemUpdated", + "parameters": [ + { "name": "storageId", "$ref": "StorageId" }, + { "name": "key", "type": "string" }, + { "name": "oldValue", "type": "string" }, + { "name": "newValue", "type": "string" } + ] + } + ] + }, + { + "domain": "ApplicationCache", + "hidden": true, + "types": [ + { + "id": "ApplicationCacheResource", + "type": "object", + "description": "Detailed application cache resource information.", + "properties": [ + { "name": "url", "type": "string", "description": "Resource url." }, + { "name": "size", "type": "integer", "description": "Resource size." }, + { "name": "type", "type": "string", "description": "Resource type." } + ] + }, + { + "id": "ApplicationCache", + "type": "object", + "description": "Detailed application cache information.", + "properties": [ + { "name": "manifestURL", "type": "string", "description": "Manifest URL." }, + { "name": "size", "type": "number", "description": "Application cache size." }, + { "name": "creationTime", "type": "number", "description": "Application cache creation time." }, + { "name": "updateTime", "type": "number", "description": "Application cache update time." }, + { "name": "resources", "type": "array", "items": { "$ref": "ApplicationCacheResource" }, "description": "Application cache resources." } + ] + }, + { + "id": "FrameWithManifest", + "type": "object", + "description": "Frame identifier - manifest URL pair.", + "properties": [ + { "name": "frameId", "$ref": "Page.FrameId", "description": "Frame identifier." }, + { "name": "manifestURL", "type": "string", "description": "Manifest URL." }, + { "name": "status", "type": "integer", "description": "Application cache status." } + ] + } + ], + "commands": [ + { + "name": "getFramesWithManifests", + "returns": [ + { "name": "frameIds", "type": "array", "items": { "$ref": "FrameWithManifest" }, "description": "Array of frame identifiers with manifest urls for each frame containing a document associated with some application cache." } + ], + "description": "Returns array of frame identifiers with manifest urls for each frame containing a document associated with some application cache." + }, + { + "name": "enable", + "description": "Enables application cache domain notifications." + }, + { + "name": "getManifestForFrame", + "parameters": [ + { "name": "frameId", "$ref": "Page.FrameId", "description": "Identifier of the frame containing document whose manifest is retrieved." } + ], + "returns": [ + { "name": "manifestURL", "type": "string", "description": "Manifest URL for document in the given frame." } + ], + "description": "Returns manifest URL for document in the given frame." + }, + { + "name": "getApplicationCacheForFrame", + "parameters": [ + { "name": "frameId", "$ref": "Page.FrameId", "description": "Identifier of the frame containing document whose application cache is retrieved." } + ], + "returns": [ + { "name": "applicationCache", "$ref": "ApplicationCache", "description": "Relevant application cache data for the document in given frame." } + ], + "description": "Returns relevant application cache data for the document in given frame." + } + ], + "events": [ + { + "name": "applicationCacheStatusUpdated", + "parameters": [ + { "name": "frameId", "$ref": "Page.FrameId", "description": "Identifier of the frame containing document whose application cache updated status." }, + { "name": "manifestURL", "type": "string", "description": "Manifest URL." }, + { "name": "status", "type": "integer", "description": "Updated application cache status." } + ] + }, + { + "name": "networkStateUpdated", + "parameters": [ + { "name": "isNowOnline", "type": "boolean" } + ] + } + ] + }, + { + "domain": "FileSystem", + "hidden": true, + "types": [ + { + "id": "Entry", + "type": "object", + "properties": [ + { "name": "url", "type": "string", "description": "filesystem: URL for the entry." }, + { "name": "name", "type": "string", "description": "The name of the file or directory." }, + { "name": "isDirectory", "type": "boolean", "description": "True if the entry is a directory." }, + { "name": "mimeType", "type": "string", "optional": true, "description": "MIME type of the entry, available for a file only." }, + { "name": "resourceType", "$ref": "Page.ResourceType", "optional": true, "description": "ResourceType of the entry, available for a file only." }, + { "name": "isTextFile", "type": "boolean", "optional": true, "description": "True if the entry is a text file." } + ], + "description": "Represents a browser side file or directory." + }, + { + "id": "Metadata", + "type": "object", + "properties": [ + { "name": "modificationTime", "type": "number", "description": "Modification time." }, + { "name": "size", "type": "number", "description": "File size. This field is always zero for directories." } + ], + "description": "Represents metadata of a file or entry." + } + ], + "commands": [ + { + "name": "enable", + "description": "Enables events from backend." + }, + { + "name": "disable", + "description": "Disables events from backend." + }, + { + "name": "requestFileSystemRoot", + "async": true, + "parameters": [ + { "name": "origin", "type": "string", "description": "Security origin of requesting FileSystem. One of frames in current page needs to have this security origin." }, + { "name": "type", "type": "string", "enum": ["temporary", "persistent"], "description": "FileSystem type of requesting FileSystem." } + ], + "returns": [ + { "name": "errorCode", "type": "integer", "description": "0, if no error. Otherwise, errorCode is set to FileError::ErrorCode value." }, + { "name": "root", "$ref": "Entry", "optional": true, "description": "Contains root of the requested FileSystem if the command completed successfully." } + ], + "description": "Returns root directory of the FileSystem, if exists." + }, + { + "name": "requestDirectoryContent", + "async": true, + "parameters": [ + { "name": "url", "type": "string", "description": "URL of the directory that the frontend is requesting to read from." } + ], + "returns": [ + { "name": "errorCode", "type": "integer", "description": "0, if no error. Otherwise, errorCode is set to FileError::ErrorCode value." }, + { "name": "entries", "type": "array", "items": { "$ref": "Entry" }, "optional": true, "description": "Contains all entries on directory if the command completed successfully." } + ], + "description": "Returns content of the directory." + }, + { + "name": "requestMetadata", + "async": true, + "parameters": [ + { "name": "url", "type": "string", "description": "URL of the entry that the frontend is requesting to get metadata from." } + ], + "returns": [ + { "name": "errorCode", "type": "integer", "description": "0, if no error. Otherwise, errorCode is set to FileError::ErrorCode value." }, + { "name": "metadata", "$ref": "Metadata", "optional": true, "description": "Contains metadata of the entry if the command completed successfully." } + ], + "description": "Returns metadata of the entry." + }, + { + "name": "requestFileContent", + "async": true, + "parameters": [ + { "name": "url", "type": "string", "description": "URL of the file that the frontend is requesting to read from." }, + { "name": "readAsText", "type": "boolean", "description": "True if the content should be read as text, otherwise the result will be returned as base64 encoded text." }, + { "name": "start", "type": "integer", "optional": true, "description": "Specifies the start of range to read." }, + { "name": "end", "type": "integer", "optional": true, "description": "Specifies the end of range to read exclusively." }, + { "name": "charset", "type": "string", "optional": true, "description": "Overrides charset of the content when content is served as text." } + ], + "returns": [ + { "name": "errorCode", "type": "integer", "description": "0, if no error. Otherwise, errorCode is set to FileError::ErrorCode value." }, + { "name": "content", "type": "string", "optional": true, "description": "Content of the file." }, + { "name": "charset", "type": "string", "optional": true, "description": "Charset of the content if it is served as text." } + ], + "description": "Returns content of the file. Result should be sliced into [start, end)." + }, + { + "name": "deleteEntry", + "async": true, + "parameters": [ + { "name": "url", "type": "string", "description": "URL of the entry to delete." } + ], + "returns": [ + { "name": "errorCode", "type": "integer", "description": "0, if no error. Otherwise errorCode is set to FileError::ErrorCode value." } + ], + "description": "Deletes specified entry. If the entry is a directory, the agent deletes children recursively." + } + ] + }, + { + "domain": "DOM", + "description": "This domain exposes DOM read/write operations. Each DOM Node is represented with its mirror object that has an <code>id</code>. This <code>id</code> can be used to get additional information on the Node, resolve it into the JavaScript object wrapper, etc. It is important that client receives DOM events only for the nodes that are known to the client. Backend keeps track of the nodes that were sent to the client and never sends the same node twice. It is client's responsibility to collect information about the nodes that were sent to the client.<p>Note that <code>iframe</code> owner elements will return corresponding document elements as their child nodes.</p>", + "types": [ + { + "id": "NodeId", + "type": "integer", + "description": "Unique DOM node identifier." + }, + { + "id": "BackendNodeId", + "type": "integer", + "description": "Unique DOM node identifier used to reference a node that may not have been pushed to the front-end.", + "hidden": true + }, + { + "id": "BackendNode", + "type": "object", + "properties": [ + { "name": "nodeType", "type": "integer", "description": "<code>Node</code>'s nodeType." }, + { "name": "nodeName", "type": "string", "description": "<code>Node</code>'s nodeName." }, + { "name": "backendNodeId", "$ref": "BackendNodeId" } + ], + "hidden": true, + "description": "Backend node with a friendly name." + }, + { + "id": "PseudoType", + "type": "string", + "enum": [ + "first-line", + "first-letter", + "before", + "after", + "backdrop", + "selection", + "first-line-inherited", + "scrollbar", + "scrollbar-thumb", + "scrollbar-button", + "scrollbar-track", + "scrollbar-track-piece", + "scrollbar-corner", + "resizer", + "input-list-button" + ], + "description": "Pseudo element type." + }, + { + "id": "ShadowRootType", + "type": "string", + "enum": ["user-agent", "author"], + "description": "Shadow root type." + }, + { + "id": "Node", + "type": "object", + "properties": [ + { "name": "nodeId", "$ref": "NodeId", "description": "Node identifier that is passed into the rest of the DOM messages as the <code>nodeId</code>. Backend will only push node with given <code>id</code> once. It is aware of all requested nodes and will only fire DOM events for nodes known to the client." }, + { "name": "nodeType", "type": "integer", "description": "<code>Node</code>'s nodeType." }, + { "name": "nodeName", "type": "string", "description": "<code>Node</code>'s nodeName." }, + { "name": "localName", "type": "string", "description": "<code>Node</code>'s localName." }, + { "name": "nodeValue", "type": "string", "description": "<code>Node</code>'s nodeValue." }, + { "name": "childNodeCount", "type": "integer", "optional": true, "description": "Child count for <code>Container</code> nodes." }, + { "name": "children", "type": "array", "optional": true, "items": { "$ref": "Node" }, "description": "Child nodes of this node when requested with children." }, + { "name": "attributes", "type": "array", "optional": true, "items": { "type": "string" }, "description": "Attributes of the <code>Element</code> node in the form of flat array <code>[name1, value1, name2, value2]</code>." }, + { "name": "documentURL", "type": "string", "optional": true, "description": "Document URL that <code>Document</code> or <code>FrameOwner</code> node points to." }, + { "name": "baseURL", "type": "string", "optional": true, "description": "Base URL that <code>Document</code> or <code>FrameOwner</code> node uses for URL completion.", "hidden": true }, + { "name": "publicId", "type": "string", "optional": true, "description": "<code>DocumentType</code>'s publicId." }, + { "name": "systemId", "type": "string", "optional": true, "description": "<code>DocumentType</code>'s systemId." }, + { "name": "internalSubset", "type": "string", "optional": true, "description": "<code>DocumentType</code>'s internalSubset." }, + { "name": "xmlVersion", "type": "string", "optional": true, "description": "<code>Document</code>'s XML version in case of XML documents." }, + { "name": "name", "type": "string", "optional": true, "description": "<code>Attr</code>'s name." }, + { "name": "value", "type": "string", "optional": true, "description": "<code>Attr</code>'s value." }, + { "name": "pseudoType", "$ref": "PseudoType", "optional": true, "description": "Pseudo element type for this node." }, + { "name": "shadowRootType", "$ref": "ShadowRootType", "optional": true, "description": "Shadow root type." }, + { "name": "frameId", "$ref": "Page.FrameId", "optional": true, "description": "Frame ID for frame owner elements.", "hidden": true }, + { "name": "contentDocument", "$ref": "Node", "optional": true, "description": "Content document for frame owner elements." }, + { "name": "shadowRoots", "type": "array", "optional": true, "items": { "$ref": "Node" }, "description": "Shadow root list for given element host.", "hidden": true }, + { "name": "templateContent", "$ref": "Node", "optional": true, "description": "Content document fragment for template elements.", "hidden": true }, + { "name": "pseudoElements", "type": "array", "items": { "$ref": "Node" }, "optional": true, "description": "Pseudo elements associated with this node.", "hidden": true }, + { "name": "importedDocument", "$ref": "Node", "optional": true, "description": "Import document for the HTMLImport links." }, + { "name": "distributedNodes", "type": "array", "items": { "$ref": "BackendNode" }, "optional": true, "description": "Distributed nodes for given insertion point.", "hidden": true } + ], + "description": "DOM interaction is implemented in terms of mirror objects that represent the actual DOM nodes. DOMNode is a base node mirror type." + }, + { + "id": "EventListener", + "type": "object", + "hidden": true, + "properties": [ + { "name": "type", "type": "string", "description": "<code>EventListener</code>'s type." }, + { "name": "useCapture", "type": "boolean", "description": "<code>EventListener</code>'s useCapture." }, + { "name": "isAttribute", "type": "boolean", "description": "<code>EventListener</code>'s isAttribute." }, + { "name": "nodeId", "$ref": "NodeId", "description": "Target <code>DOMNode</code> id." }, + { "name": "location", "$ref": "Debugger.Location", "description": "Handler code location." }, + { "name": "handler", "$ref": "Runtime.RemoteObject", "optional": true, "description": "Event handler function value." } + ], + "description": "DOM interaction is implemented in terms of mirror objects that represent the actual DOM nodes. DOMNode is a base node mirror type." + }, + { + "id": "RGBA", + "type": "object", + "properties": [ + { "name": "r", "type": "integer", "description": "The red component, in the [0-255] range." }, + { "name": "g", "type": "integer", "description": "The green component, in the [0-255] range." }, + { "name": "b", "type": "integer", "description": "The blue component, in the [0-255] range." }, + { "name": "a", "type": "number", "optional": true, "description": "The alpha component, in the [0-1] range (default: 1)." } + ], + "description": "A structure holding an RGBA color." + }, + { + "id": "Quad", + "type": "array", + "items": { "type": "number" }, + "minItems": 8, + "maxItems": 8, + "description": "An array of quad vertices, x immediately followed by y for each point, points clock-wise.", + "hidden": true + }, + { + "id": "BoxModel", + "type": "object", + "hidden": true, + "properties": [ + { "name": "content", "$ref": "Quad", "description": "Content box" }, + { "name": "padding", "$ref": "Quad", "description": "Padding box" }, + { "name": "border", "$ref": "Quad", "description": "Border box" }, + { "name": "margin", "$ref": "Quad", "description": "Margin box" }, + { "name": "width", "type": "integer", "description": "Node width" }, + { "name": "height", "type": "integer", "description": "Node height" }, + { "name": "shapeOutside", "$ref": "ShapeOutsideInfo", "optional": true, "description": "Shape outside coordinates" } + ], + "description": "Box model." + }, + { + "id": "ShapeOutsideInfo", + "type": "object", + "hidden": true, + "properties": [ + { "name": "bounds", "$ref": "Quad", "description": "Shape bounds" }, + { "name": "shape", "type": "array", "items": { "type": "any"}, "description": "Shape coordinate details" }, + { "name": "marginShape", "type": "array", "items": { "type": "any"}, "description": "Margin shape bounds" } + ], + "description": "CSS Shape Outside details." + }, + { + "id": "Rect", + "type": "object", + "hidden": true, + "properties": [ + { "name": "x", "type": "number", "description": "X coordinate" }, + { "name": "y", "type": "number", "description": "Y coordinate" }, + { "name": "width", "type": "number", "description": "Rectangle width" }, + { "name": "height", "type": "number", "description": "Rectangle height" } + ], + "description": "Rectangle." + }, + { + "id": "HighlightConfig", + "type": "object", + "properties": [ + { "name": "showInfo", "type": "boolean", "optional": true, "description": "Whether the node info tooltip should be shown (default: false)." }, + { "name": "showRulers", "type": "boolean", "optional": true, "description": "Whether the rulers should be shown (default: false)." }, + { "name": "showExtensionLines", "type": "boolean", "optional": true, "description": "Whether the extension lines from node to the rulers should be shown (default: false)." }, + { "name": "contentColor", "$ref": "RGBA", "optional": true, "description": "The content box highlight fill color (default: transparent)." }, + { "name": "paddingColor", "$ref": "RGBA", "optional": true, "description": "The padding highlight fill color (default: transparent)." }, + { "name": "borderColor", "$ref": "RGBA", "optional": true, "description": "The border highlight fill color (default: transparent)." }, + { "name": "marginColor", "$ref": "RGBA", "optional": true, "description": "The margin highlight fill color (default: transparent)." }, + { "name": "eventTargetColor", "$ref": "RGBA", "optional": true, "hidden": true, "description": "The event target element highlight fill color (default: transparent)." }, + { "name": "shapeColor", "$ref": "RGBA", "optional": true, "hidden": true, "description": "The shape outside fill color (default: transparent)." }, + { "name": "shapeMarginColor", "$ref": "RGBA", "optional": true, "hidden": true, "description": "The shape margin fill color (default: transparent)." } + ], + "description": "Configuration data for the highlighting of page elements." + } + ], + "commands": [ + { + "name": "enable", + "description": "Enables DOM agent for the given page." + }, + { + "name": "disable", + "description": "Disables DOM agent for the given page." + }, + { + "name": "getDocument", + "returns": [ + { "name": "root", "$ref": "Node", "description": "Resulting node." } + ], + "description": "Returns the root DOM node to the caller." + }, + { + "name": "requestChildNodes", + "parameters": [ + { "name": "nodeId", "$ref": "NodeId", "description": "Id of the node to get children for." }, + { "name": "depth", "type": "integer", "optional": true, "description": "The maximum depth at which children should be retrieved, defaults to 1. Use -1 for the entire subtree or provide an integer larger than 0.", "hidden": true } + ], + "description": "Requests that children of the node with given id are returned to the caller in form of <code>setChildNodes</code> events where not only immediate children are retrieved, but all children down to the specified depth." + }, + { + "name": "querySelector", + "parameters": [ + { "name": "nodeId", "$ref": "NodeId", "description": "Id of the node to query upon." }, + { "name": "selector", "type": "string", "description": "Selector string." } + ], + "returns": [ + { "name": "nodeId", "$ref": "NodeId", "description": "Query selector result." } + ], + "description": "Executes <code>querySelector</code> on a given node." + }, + { + "name": "querySelectorAll", + "parameters": [ + { "name": "nodeId", "$ref": "NodeId", "description": "Id of the node to query upon." }, + { "name": "selector", "type": "string", "description": "Selector string." } + ], + "returns": [ + { "name": "nodeIds", "type": "array", "items": { "$ref": "NodeId" }, "description": "Query selector result." } + ], + "description": "Executes <code>querySelectorAll</code> on a given node." + }, + { + "name": "setNodeName", + "parameters": [ + { "name": "nodeId", "$ref": "NodeId", "description": "Id of the node to set name for." }, + { "name": "name", "type": "string", "description": "New node's name." } + ], + "returns": [ + { "name": "nodeId", "$ref": "NodeId", "description": "New node's id." } + ], + "description": "Sets node name for a node with given id." + }, + { + "name": "setNodeValue", + "parameters": [ + { "name": "nodeId", "$ref": "NodeId", "description": "Id of the node to set value for." }, + { "name": "value", "type": "string", "description": "New node's value." } + ], + "description": "Sets node value for a node with given id." + }, + { + "name": "removeNode", + "parameters": [ + { "name": "nodeId", "$ref": "NodeId", "description": "Id of the node to remove." } + ], + "description": "Removes node with given id." + }, + { + "name": "setAttributeValue", + "parameters": [ + { "name": "nodeId", "$ref": "NodeId", "description": "Id of the element to set attribute for." }, + { "name": "name", "type": "string", "description": "Attribute name." }, + { "name": "value", "type": "string", "description": "Attribute value." } + ], + "description": "Sets attribute for an element with given id." + }, + { + "name": "setAttributesAsText", + "parameters": [ + { "name": "nodeId", "$ref": "NodeId", "description": "Id of the element to set attributes for." }, + { "name": "text", "type": "string", "description": "Text with a number of attributes. Will parse this text using HTML parser." }, + { "name": "name", "type": "string", "optional": true, "description": "Attribute name to replace with new attributes derived from text in case text parsed successfully." } + ], + "description": "Sets attributes on element with given id. This method is useful when user edits some existing attribute value and types in several attribute name/value pairs." + }, + { + "name": "removeAttribute", + "parameters": [ + { "name": "nodeId", "$ref": "NodeId", "description": "Id of the element to remove attribute from." }, + { "name": "name", "type": "string", "description": "Name of the attribute to remove." } + ], + "description": "Removes attribute with given name from an element with given id." + }, + { + "name": "getEventListenersForNode", + "parameters": [ + { "name": "nodeId", "$ref": "NodeId", "description": "Id of the node to get listeners for." }, + { "name": "objectGroup", "type": "string", "optional": true, "description": "Symbolic group name for handler value. Handler value is not returned without this parameter specified." } + ], + "returns": [ + { "name": "listeners", "type": "array", "items": { "$ref": "EventListener" }, "description": "Array of relevant listeners." } + ], + "description": "Returns event listeners relevant to the node.", + "hidden": true + }, + { + "name": "getOuterHTML", + "parameters": [ + { "name": "nodeId", "$ref": "NodeId", "description": "Id of the node to get markup for." } + ], + "returns": [ + { "name": "outerHTML", "type": "string", "description": "Outer HTML markup." } + ], + "description": "Returns node's HTML markup." + }, + { + "name": "setOuterHTML", + "parameters": [ + { "name": "nodeId", "$ref": "NodeId", "description": "Id of the node to set markup for." }, + { "name": "outerHTML", "type": "string", "description": "Outer HTML markup to set." } + ], + "description": "Sets node HTML markup, returns new node id." + }, + { + "name": "performSearch", + "parameters": [ + { "name": "query", "type": "string", "description": "Plain text or query selector or XPath search query." }, + { "name": "includeUserAgentShadowDOM", "type": "boolean", "optional": true, "description": "True to search in user agent shadow DOM.", "hidden": true } + ], + "returns": [ + { "name": "searchId", "type": "string", "description": "Unique search session identifier." }, + { "name": "resultCount", "type": "integer", "description": "Number of search results." } + ], + "description": "Searches for a given string in the DOM tree. Use <code>getSearchResults</code> to access search results or <code>cancelSearch</code> to end this search session.", + "hidden": true + }, + { + "name": "getSearchResults", + "parameters": [ + { "name": "searchId", "type": "string", "description": "Unique search session identifier." }, + { "name": "fromIndex", "type": "integer", "description": "Start index of the search result to be returned." }, + { "name": "toIndex", "type": "integer", "description": "End index of the search result to be returned." } + ], + "returns": [ + { "name": "nodeIds", "type": "array", "items": { "$ref": "NodeId" }, "description": "Ids of the search result nodes." } + ], + "description": "Returns search results from given <code>fromIndex</code> to given <code>toIndex</code> from the sarch with the given identifier.", + "hidden": true + }, + { + "name": "discardSearchResults", + "parameters": [ + { "name": "searchId", "type": "string", "description": "Unique search session identifier." } + ], + "description": "Discards search results from the session with the given id. <code>getSearchResults</code> should no longer be called for that search.", + "hidden": true + }, + { + "name": "requestNode", + "parameters": [ + { "name": "objectId", "$ref": "Runtime.RemoteObjectId", "description": "JavaScript object id to convert into node." } + ], + "returns": [ + { "name": "nodeId", "$ref": "NodeId", "description": "Node id for given object." } + ], + "description": "Requests that the node is sent to the caller given the JavaScript node object reference. All nodes that form the path from the node to the root are also sent to the client as a series of <code>setChildNodes</code> notifications." + }, + { + "name": "setInspectModeEnabled", + "hidden": true, + "parameters": [ + { "name": "enabled", "type": "boolean", "description": "True to enable inspection mode, false to disable it." }, + { "name": "inspectUAShadowDOM", "type": "boolean", "optional": true, "description": "True to enable inspection mode for user agent shadow DOM." }, + { "name": "highlightConfig", "$ref": "HighlightConfig", "optional": true, "description": "A descriptor for the highlight appearance of hovered-over nodes. May be omitted if <code>enabled == false</code>." } + ], + "description": "Enters the 'inspect' mode. In this mode, elements that user is hovering over are highlighted. Backend then generates 'inspectNodeRequested' event upon element selection." + }, + { + "name": "highlightRect", + "parameters": [ + { "name": "x", "type": "integer", "description": "X coordinate" }, + { "name": "y", "type": "integer", "description": "Y coordinate" }, + { "name": "width", "type": "integer", "description": "Rectangle width" }, + { "name": "height", "type": "integer", "description": "Rectangle height" }, + { "name": "color", "$ref": "RGBA", "optional": true, "description": "The highlight fill color (default: transparent)." }, + { "name": "outlineColor", "$ref": "RGBA", "optional": true, "description": "The highlight outline color (default: transparent)." } + ], + "description": "Highlights given rectangle. Coordinates are absolute with respect to the main frame viewport." + }, + { + "name": "highlightQuad", + "parameters": [ + { "name": "quad", "$ref": "Quad", "description": "Quad to highlight" }, + { "name": "color", "$ref": "RGBA", "optional": true, "description": "The highlight fill color (default: transparent)." }, + { "name": "outlineColor", "$ref": "RGBA", "optional": true, "description": "The highlight outline color (default: transparent)." } + ], + "description": "Highlights given quad. Coordinates are absolute with respect to the main frame viewport.", + "hidden": true + }, + { + "name": "highlightNode", + "parameters": [ + { "name": "highlightConfig", "$ref": "HighlightConfig", "description": "A descriptor for the highlight appearance." }, + { "name": "nodeId", "$ref": "NodeId", "optional": true, "description": "Identifier of the node to highlight." }, + { "name": "backendNodeId", "$ref": "BackendNodeId", "optional": true, "description": "Identifier of the backend node to highlight." }, + { "name": "objectId", "$ref": "Runtime.RemoteObjectId", "optional": true, "description": "JavaScript object id of the node to be highlighted.", "hidden": true } + ], + "description": "Highlights DOM node with given id or with the given JavaScript object wrapper. Either nodeId or objectId must be specified." + }, + { + "name": "hideHighlight", + "description": "Hides DOM node highlight." + }, + { + "name": "highlightFrame", + "parameters": [ + { "name": "frameId", "$ref": "Page.FrameId", "description": "Identifier of the frame to highlight." }, + { "name": "contentColor", "$ref": "RGBA", "optional": true, "description": "The content box highlight fill color (default: transparent)." }, + { "name": "contentOutlineColor", "$ref": "RGBA", "optional": true, "description": "The content box highlight outline color (default: transparent)." } + ], + "description": "Highlights owner element of the frame with given id.", + "hidden": true + }, + { + "name": "pushNodeByPathToFrontend", + "parameters": [ + { "name": "path", "type": "string", "description": "Path to node in the proprietary format." } + ], + "returns": [ + { "name": "nodeId", "$ref": "NodeId", "description": "Id of the node for given path." } + ], + "description": "Requests that the node is sent to the caller given its path. // FIXME, use XPath", + "hidden": true + }, + { + "name": "pushNodesByBackendIdsToFrontend", + "parameters": [ + { "name": "backendNodeIds", "type": "array", "items": {"$ref": "BackendNodeId"}, "description": "The array of backend node ids." } + ], + "returns": [ + { "name": "nodeIds", "type": "array", "items": {"$ref": "NodeId"}, "description": "The array of ids of pushed nodes that correspond to the backend ids specified in backendNodeIds." } + ], + "description": "Requests that a batch of nodes is sent to the caller given their backend node ids.", + "hidden": true + }, + { + "name": "setInspectedNode", + "parameters": [ + { "name": "nodeId", "$ref": "NodeId", "description": "DOM node id to be accessible by means of $x command line API." } + ], + "description": "Enables console to refer to the node with given id via $x (see Command Line API for more details $x functions).", + "hidden": true + }, + { + "name": "resolveNode", + "parameters": [ + { "name": "nodeId", "$ref": "NodeId", "description": "Id of the node to resolve." }, + { "name": "objectGroup", "type": "string", "optional": true, "description": "Symbolic group name that can be used to release multiple objects." } + ], + "returns": [ + { "name": "object", "$ref": "Runtime.RemoteObject", "description": "JavaScript object wrapper for given node." } + ], + "description": "Resolves JavaScript node object for given node id." + }, + { + "name": "getAttributes", + "parameters": [ + { "name": "nodeId", "$ref": "NodeId", "description": "Id of the node to retrieve attibutes for." } + ], + "returns": [ + { "name": "attributes", "type": "array", "items": { "type": "string" }, "description": "An interleaved array of node attribute names and values." } + ], + "description": "Returns attributes for the specified node." + }, + { + "name": "copyTo", + "parameters": [ + { "name": "nodeId", "$ref": "NodeId", "description": "Id of the node to copy." }, + { "name": "targetNodeId", "$ref": "NodeId", "description": "Id of the element to drop the copy into." }, + { "name": "insertBeforeNodeId", "$ref": "NodeId", "optional": true, "description": "Drop the copy before this node (if absent, the copy becomes the last child of <code>targetNodeId</code>)." } + ], + "returns": [ + { "name": "nodeId", "$ref": "NodeId", "description": "Id of the node clone." } + ], + "description": "Creates a deep copy of the specified node and places it into the target container before the given anchor.", + "hidden": true + }, + { + "name": "moveTo", + "parameters": [ + { "name": "nodeId", "$ref": "NodeId", "description": "Id of the node to move." }, + { "name": "targetNodeId", "$ref": "NodeId", "description": "Id of the element to drop the moved node into." }, + { "name": "insertBeforeNodeId", "$ref": "NodeId", "optional": true, "description": "Drop node before this one (if absent, the moved node becomes the last child of <code>targetNodeId</code>)." } + ], + "returns": [ + { "name": "nodeId", "$ref": "NodeId", "description": "New id of the moved node." } + ], + "description": "Moves node into the new container, places it before the given anchor." + }, + { + "name": "undo", + "description": "Undoes the last performed action.", + "hidden": true + }, + { + "name": "redo", + "description": "Re-does the last undone action.", + "hidden": true + }, + { + "name": "markUndoableState", + "description": "Marks last undoable state.", + "hidden": true + }, + { + "name": "focus", + "parameters": [ + { "name": "nodeId", "$ref": "NodeId", "description": "Id of the node to focus." } + ], + "description": "Focuses the given element.", + "hidden": true + }, + { + "name": "setFileInputFiles", + "parameters": [ + { "name": "nodeId", "$ref": "NodeId", "description": "Id of the file input node to set files for." }, + { "name": "files", "type": "array", "items": { "type": "string" }, "description": "Array of file paths to set." } + ], + "description": "Sets files for the given file input element.", + "hidden": true, + "handlers": ["browser", "renderer"] + }, + { + "name": "getBoxModel", + "parameters": [ + { "name": "nodeId", "$ref": "NodeId", "description": "Id of the node to get box model for." } + ], + "returns": [ + { "name": "model", "$ref": "BoxModel", "description": "Box model for the node." } + ], + "description": "Returns boxes for the currently selected nodes.", + "hidden": true + }, + { + "name": "getNodeForLocation", + "parameters": [ + { "name": "x", "type": "integer", "description": "X coordinate." }, + { "name": "y", "type": "integer", "description": "Y coordinate." } + ], + "returns": [ + { "name": "nodeId", "$ref": "NodeId", "description": "Id of the node at given coordinates." } + ], + "description": "Returns node id at given location.", + "hidden": true + }, + { + "name": "getRelayoutBoundary", + "parameters": [ + { "name": "nodeId", "$ref": "NodeId", "description": "Id of the node." } + ], + "returns": [ + { "name": "nodeId", "$ref": "NodeId", "description": "Relayout boundary node id for the given node." } + ], + "description": "Returns the id of the nearest ancestor that is a relayout boundary.", + "hidden": true + }, + { + "name": "getHighlightObjectForTest", + "parameters": [ + { "name": "nodeId", "$ref": "NodeId", "description": "Id of the node to get highlight object for." } + ], + "returns": [ + { "name": "highlight", "type": "object", "description": "Highlight data for the node." } + ], + "description": "For testing.", + "hidden": true + } + ], + "events": [ + { + "name": "documentUpdated", + "description": "Fired when <code>Document</code> has been totally updated. Node ids are no longer valid." + }, + { + "name": "inspectNodeRequested", + "parameters": [ + { "name": "backendNodeId", "$ref": "BackendNodeId", "description": "Id of the node to inspect." } + ], + "description": "Fired when the node should be inspected. This happens after call to <code>setInspectModeEnabled</code>.", + "hidden" : true + }, + { + "name": "setChildNodes", + "parameters": [ + { "name": "parentId", "$ref": "NodeId", "description": "Parent node id to populate with children." }, + { "name": "nodes", "type": "array", "items": { "$ref": "Node" }, "description": "Child nodes array." } + ], + "description": "Fired when backend wants to provide client with the missing DOM structure. This happens upon most of the calls requesting node ids." + }, + { + "name": "attributeModified", + "parameters": [ + { "name": "nodeId", "$ref": "NodeId", "description": "Id of the node that has changed." }, + { "name": "name", "type": "string", "description": "Attribute name." }, + { "name": "value", "type": "string", "description": "Attribute value." } + ], + "description": "Fired when <code>Element</code>'s attribute is modified." + }, + { + "name": "attributeRemoved", + "parameters": [ + { "name": "nodeId", "$ref": "NodeId", "description": "Id of the node that has changed." }, + { "name": "name", "type": "string", "description": "A ttribute name." } + ], + "description": "Fired when <code>Element</code>'s attribute is removed." + }, + { + "name": "inlineStyleInvalidated", + "parameters": [ + { "name": "nodeIds", "type": "array", "items": { "$ref": "NodeId" }, "description": "Ids of the nodes for which the inline styles have been invalidated." } + ], + "description": "Fired when <code>Element</code>'s inline style is modified via a CSS property modification.", + "hidden": true + }, + { + "name": "characterDataModified", + "parameters": [ + { "name": "nodeId", "$ref": "NodeId", "description": "Id of the node that has changed." }, + { "name": "characterData", "type": "string", "description": "New text value." } + ], + "description": "Mirrors <code>DOMCharacterDataModified</code> event." + }, + { + "name": "childNodeCountUpdated", + "parameters": [ + { "name": "nodeId", "$ref": "NodeId", "description": "Id of the node that has changed." }, + { "name": "childNodeCount", "type": "integer", "description": "New node count." } + ], + "description": "Fired when <code>Container</code>'s child node count has changed." + }, + { + "name": "childNodeInserted", + "parameters": [ + { "name": "parentNodeId", "$ref": "NodeId", "description": "Id of the node that has changed." }, + { "name": "previousNodeId", "$ref": "NodeId", "description": "If of the previous siblint." }, + { "name": "node", "$ref": "Node", "description": "Inserted node data." } + ], + "description": "Mirrors <code>DOMNodeInserted</code> event." + }, + { + "name": "childNodeRemoved", + "parameters": [ + { "name": "parentNodeId", "$ref": "NodeId", "description": "Parent id." }, + { "name": "nodeId", "$ref": "NodeId", "description": "Id of the node that has been removed." } + ], + "description": "Mirrors <code>DOMNodeRemoved</code> event." + }, + { + "name": "shadowRootPushed", + "parameters": [ + { "name": "hostId", "$ref": "NodeId", "description": "Host element id." }, + { "name": "root", "$ref": "Node", "description": "Shadow root." } + ], + "description": "Called when shadow root is pushed into the element.", + "hidden": true + }, + { + "name": "shadowRootPopped", + "parameters": [ + { "name": "hostId", "$ref": "NodeId", "description": "Host element id." }, + { "name": "rootId", "$ref": "NodeId", "description": "Shadow root id." } + ], + "description": "Called when shadow root is popped from the element.", + "hidden": true + }, + { + "name": "pseudoElementAdded", + "parameters": [ + { "name": "parentId", "$ref": "NodeId", "description": "Pseudo element's parent element id." }, + { "name": "pseudoElement", "$ref": "Node", "description": "The added pseudo element." } + ], + "description": "Called when a pseudo element is added to an element.", + "hidden": true + }, + { + "name": "pseudoElementRemoved", + "parameters": [ + { "name": "parentId", "$ref": "NodeId", "description": "Pseudo element's parent element id." }, + { "name": "pseudoElementId", "$ref": "NodeId", "description": "The removed pseudo element id." } + ], + "description": "Called when a pseudo element is removed from an element.", + "hidden": true + }, + { + "name": "distributedNodesUpdated", + "parameters": [ + { "name": "insertionPointId", "$ref": "NodeId", "description": "Insertion point where distrubuted nodes were updated." }, + { "name": "distributedNodes", "type": "array", "items": { "$ref": "BackendNode" }, "description": "Distributed nodes for given insertion point." } + ], + "description": "Called when distrubution is changed.", + "hidden": true + } + ] + }, + { + "domain": "CSS", + "hidden": true, + "description": "This domain exposes CSS read/write operations. All CSS objects (stylesheets, rules, and styles) have an associated <code>id</code> used in subsequent operations on the related object. Each object type has a specific <code>id</code> structure, and those are not interchangeable between objects of different kinds. CSS objects can be loaded using the <code>get*ForNode()</code> calls (which accept a DOM node id). A client can also discover all the existing stylesheets with the <code>getAllStyleSheets()</code> method (or keeping track of the <code>styleSheetAdded</code>/<code>styleSheetRemoved</code> events) and subsequently load the required stylesheet contents using the <code>getStyleSheet[Text]()</code> methods.", + "types": [ + { + "id": "StyleSheetId", + "type": "string" + }, + { + "id": "StyleSheetOrigin", + "type": "string", + "enum": ["injected", "user-agent", "inspector", "regular"], + "description": "Stylesheet type: \"injected\" for stylesheets injected via extension, \"user-agent\" for user-agent stylesheets, \"inspector\" for stylesheets created by the inspector (i.e. those holding the \"via inspector\" rules), \"regular\" for regular stylesheets." + }, + { + "id": "PseudoIdMatches", + "type": "object", + "properties": [ + { "name": "pseudoId", "type": "integer", "description": "Pseudo style identifier (see <code>enum PseudoId</code> in <code>ComputedStyleConstants.h</code>)."}, + { "name": "matches", "type": "array", "items": { "$ref": "RuleMatch" }, "description": "Matches of CSS rules applicable to the pseudo style."} + ], + "description": "CSS rule collection for a single pseudo style." + }, + { + "id": "InheritedStyleEntry", + "type": "object", + "properties": [ + { "name": "inlineStyle", "$ref": "CSSStyle", "optional": true, "description": "The ancestor node's inline style, if any, in the style inheritance chain." }, + { "name": "matchedCSSRules", "type": "array", "items": { "$ref": "RuleMatch" }, "description": "Matches of CSS rules matching the ancestor node in the style inheritance chain." } + ], + "description": "Inherited CSS rule collection from ancestor node." + }, + { + "id": "RuleMatch", + "type": "object", + "properties": [ + { "name": "rule", "$ref": "CSSRule", "description": "CSS rule in the match." }, + { "name": "matchingSelectors", "type": "array", "items": { "type": "integer" }, "description": "Matching selector indices in the rule's selectorList selectors (0-based)." } + ], + "description": "Match data for a CSS rule." + }, + { + "id": "Selector", + "type": "object", + "properties": [ + { "name": "value", "type": "string", "description": "Selector text." }, + { "name": "range", "$ref": "SourceRange", "optional": true, "description": "Selector range in the underlying resource (if available)." } + ], + "description": "Data for a simple selector (these are delimited by commas in a selector list)." + }, + { + "id": "SelectorList", + "type": "object", + "properties": [ + { "name": "selectors", "type": "array", "items": { "$ref": "Selector" }, "description": "Selectors in the list." }, + { "name": "text", "type": "string", "description": "Rule selector text." } + ], + "description": "Selector list data." + }, + { + "id": "CSSStyleSheetHeader", + "type": "object", + "properties": [ + { "name": "styleSheetId", "$ref": "StyleSheetId", "description": "The stylesheet identifier."}, + { "name": "frameId", "$ref": "Page.FrameId", "description": "Owner frame identifier."}, + { "name": "sourceURL", "type": "string", "description": "Stylesheet resource URL."}, + { "name": "sourceMapURL", "type": "string", "optional": true, "description": "URL of source map associated with the stylesheet (if any)." }, + { "name": "origin", "$ref": "StyleSheetOrigin", "description": "Stylesheet origin."}, + { "name": "title", "type": "string", "description": "Stylesheet title."}, + { "name": "ownerNode", "$ref": "DOM.BackendNodeId", "optional": true, "description": "The backend id for the owner node of the stylesheet." }, + { "name": "disabled", "type": "boolean", "description": "Denotes whether the stylesheet is disabled."}, + { "name": "hasSourceURL", "type": "boolean", "optional": true, "description": "Whether the sourceURL field value comes from the sourceURL comment." }, + { "name": "isInline", "type": "boolean", "description": "Whether this stylesheet is created for STYLE tag by parser. This flag is not set for document.written STYLE tags." }, + { "name": "startLine", "type": "number", "description": "Line offset of the stylesheet within the resource (zero based)." }, + { "name": "startColumn", "type": "number", "description": "Column offset of the stylesheet within the resource (zero based)." } + ], + "description": "CSS stylesheet metainformation." + }, + { + "id": "CSSRule", + "type": "object", + "properties": [ + { "name": "styleSheetId", "$ref": "StyleSheetId", "optional": true, "description": "The css style sheet identifier (absent for user agent stylesheet and user-specified stylesheet rules) this rule came from." }, + { "name": "selectorList", "$ref": "SelectorList", "description": "Rule selector data." }, + { "name": "origin", "$ref": "StyleSheetOrigin", "description": "Parent stylesheet's origin."}, + { "name": "style", "$ref": "CSSStyle", "description": "Associated style declaration." }, + { "name": "media", "type": "array", "items": { "$ref": "CSSMedia" }, "optional": true, "description": "Media list array (for rules involving media queries). The array enumerates media queries starting with the innermost one, going outwards." } + ], + "description": "CSS rule representation." + }, + { + "id": "SourceRange", + "type": "object", + "properties": [ + { "name": "startLine", "type": "integer", "description": "Start line of range." }, + { "name": "startColumn", "type": "integer", "description": "Start column of range (inclusive)." }, + { "name": "endLine", "type": "integer", "description": "End line of range" }, + { "name": "endColumn", "type": "integer", "description": "End column of range (exclusive)." } + ], + "description": "Text range within a resource. All numbers are zero-based." + }, + { + "id": "ShorthandEntry", + "type": "object", + "properties": [ + { "name": "name", "type": "string", "description": "Shorthand name." }, + { "name": "value", "type": "string", "description": "Shorthand value." } + ] + }, + { + "id": "CSSComputedStyleProperty", + "type": "object", + "properties": [ + { "name": "name", "type": "string", "description": "Computed style property name." }, + { "name": "value", "type": "string", "description": "Computed style property value." } + ] + }, + { + "id": "CSSStyle", + "type": "object", + "properties": [ + { "name": "styleSheetId", "$ref": "StyleSheetId", "optional": true, "description": "The css style sheet identifier (absent for user agent stylesheet and user-specified stylesheet rules) this rule came from." }, + { "name": "cssProperties", "type": "array", "items": { "$ref": "CSSProperty" }, "description": "CSS properties in the style." }, + { "name": "shorthandEntries", "type": "array", "items": { "$ref": "ShorthandEntry" }, "description": "Computed values for all shorthands found in the style." }, + { "name": "cssText", "type": "string", "optional": true, "description": "Style declaration text (if available)." }, + { "name": "range", "$ref": "SourceRange", "optional": true, "description": "Style declaration range in the enclosing stylesheet (if available)." } + ], + "description": "CSS style representation." + }, + { + "id": "CSSProperty", + "type": "object", + "properties": [ + { "name": "name", "type": "string", "description": "The property name." }, + { "name": "value", "type": "string", "description": "The property value." }, + { "name": "important", "type": "boolean", "optional": true, "description": "Whether the property has \"!important\" annotation (implies <code>false</code> if absent)." }, + { "name": "implicit", "type": "boolean", "optional": true, "description": "Whether the property is implicit (implies <code>false</code> if absent)." }, + { "name": "text", "type": "string", "optional": true, "description": "The full property text as specified in the style." }, + { "name": "parsedOk", "type": "boolean", "optional": true, "description": "Whether the property is understood by the browser (implies <code>true</code> if absent)." }, + { "name": "disabled", "type": "boolean", "optional": true, "description": "Whether the property is disabled by the user (present for source-based properties only)." }, + { "name": "range", "$ref": "SourceRange", "optional": true, "description": "The entire property range in the enclosing style declaration (if available)." } + ], + "description": "CSS property declaration data." + }, + { + "id": "CSSMedia", + "type": "object", + "properties": [ + { "name": "text", "type": "string", "description": "Media query text." }, + { "name": "source", "type": "string", "enum": ["mediaRule", "importRule", "linkedSheet", "inlineSheet"], "description": "Source of the media query: \"mediaRule\" if specified by a @media rule, \"importRule\" if specified by an @import rule, \"linkedSheet\" if specified by a \"media\" attribute in a linked stylesheet's LINK tag, \"inlineSheet\" if specified by a \"media\" attribute in an inline stylesheet's STYLE tag." }, + { "name": "sourceURL", "type": "string", "optional": true, "description": "URL of the document containing the media query description." }, + { "name": "range", "$ref": "SourceRange", "optional": true, "description": "The associated rule (@media or @import) header range in the enclosing stylesheet (if available)." }, + { "name": "parentStyleSheetId", "$ref": "StyleSheetId", "optional": true, "description": "Identifier of the stylesheet containing this object (if exists)." }, + { "name": "mediaList", "type": "array", "items": { "$ref": "MediaQuery" }, "optional": true, "hidden": true, "description": "Array of media queries." } + ], + "description": "CSS media rule descriptor." + }, + { + "id": "MediaQuery", + "type": "object", + "properties": [ + { "name": "expressions", "type": "array", "items": { "$ref": "MediaQueryExpression" }, "description": "Array of media query expressions." }, + { "name": "active", "type": "boolean", "description": "Whether the media query condition is satisfied." } + ], + "description": "Media query descriptor.", + "hidden": true + }, + { + "id": "MediaQueryExpression", + "type": "object", + "properties": [ + { "name": "value", "type": "number", "description": "Media query expression value."}, + { "name": "unit", "type": "string", "description": "Media query expression units."}, + { "name": "feature", "type": "string", "description": "Media query expression feature."}, + { "name": "valueRange", "$ref": "SourceRange", "optional": true, "description": "The associated range of the value text in the enclosing stylesheet (if available)." }, + { "name": "computedLength", "type": "number", "optional": true, "description": "Computed length of media query expression (if applicable)."} + ], + "description": "Media query expression descriptor.", + "hidden": true + }, + { + "id": "PlatformFontUsage", + "type": "object", + "properties": [ + { "name": "familyName", "type": "string", "description": "Font's family name reported by platform."}, + { "name": "glyphCount", "type": "number", "description": "Amount of glyphs that were rendered with this font."} + ], + "description": "Information about amount of glyphs that were rendered with given font.", + "hidden": true + } + ], + "commands": [ + { + "name": "enable", + "async": true, + "description": "Enables the CSS agent for the given page. Clients should not assume that the CSS agent has been enabled until the result of this command is received." + }, + { + "name": "disable", + "description": "Disables the CSS agent for the given page." + }, + { + "name": "getMatchedStylesForNode", + "parameters": [ + { "name": "nodeId", "$ref": "DOM.NodeId" }, + { "name": "excludePseudo", "type": "boolean", "optional": true, "description": "Whether to exclude pseudo styles (default: false)." }, + { "name": "excludeInherited", "type": "boolean", "optional": true, "description": "Whether to exclude inherited styles (default: false)." } + ], + "returns": [ + { "name": "matchedCSSRules", "type": "array", "items": { "$ref": "RuleMatch" }, "optional": true, "description": "CSS rules matching this node, from all applicable stylesheets." }, + { "name": "pseudoElements", "type": "array", "items": { "$ref": "PseudoIdMatches" }, "optional": true, "description": "Pseudo style matches for this node." }, + { "name": "inherited", "type": "array", "items": { "$ref": "InheritedStyleEntry" }, "optional": true, "description": "A chain of inherited styles (from the immediate node parent up to the DOM tree root)." } + ], + "description": "Returns requested styles for a DOM node identified by <code>nodeId</code>." + }, + { + "name": "getInlineStylesForNode", + "parameters": [ + { "name": "nodeId", "$ref": "DOM.NodeId" } + ], + "returns": [ + { "name": "inlineStyle", "$ref": "CSSStyle", "optional": true, "description": "Inline style for the specified DOM node." }, + { "name": "attributesStyle", "$ref": "CSSStyle", "optional": true, "description": "Attribute-defined element style (e.g. resulting from \"width=20 height=100%\")."} + ], + "description": "Returns the styles defined inline (explicitly in the \"style\" attribute and implicitly, using DOM attributes) for a DOM node identified by <code>nodeId</code>." + }, + { + "name": "getComputedStyleForNode", + "parameters": [ + { "name": "nodeId", "$ref": "DOM.NodeId" } + ], + "returns": [ + { "name": "computedStyle", "type": "array", "items": { "$ref": "CSSComputedStyleProperty" }, "description": "Computed style for the specified DOM node." } + ], + "description": "Returns the computed style for a DOM node identified by <code>nodeId</code>." + }, + { + "name": "getPlatformFontsForNode", + "parameters": [ + { "name": "nodeId", "$ref": "DOM.NodeId" } + ], + "returns": [ + { "name": "cssFamilyName", "type": "string", "description": "Font family name which is determined by computed style." }, + { "name": "fonts", "type": "array", "items": { "$ref": "PlatformFontUsage" }, "description": "Usage statistics for every employed platform font." } + ], + "description": "Requests information about platform fonts which we used to render child TextNodes in the given node.", + "hidden": true + }, + { + "name": "getStyleSheetText", + "parameters": [ + { "name": "styleSheetId", "$ref": "StyleSheetId" } + ], + "returns": [ + { "name": "text", "type": "string", "description": "The stylesheet text." } + ], + "description": "Returns the current textual content and the URL for a stylesheet." + }, + { + "name": "setStyleSheetText", + "parameters": [ + { "name": "styleSheetId", "$ref": "StyleSheetId" }, + { "name": "text", "type": "string" } + ], + "description": "Sets the new stylesheet text." + }, + { + "name": "setPropertyText", + "parameters": [ + { "name": "styleSheetId", "$ref": "StyleSheetId" }, + { "name": "range", "$ref": "SourceRange", "description": "Either a source range of the property to be edited or an empty range representing a position for the property insertion." }, + { "name": "text", "type": "string" } + ], + "returns": [ + { "name": "style", "$ref": "CSSStyle", "description": "The resulting style after the property text modification." } + ], + "description": "Either replaces a property identified by <code>styleSheetId</code> and <code>range</code> with <code>text</code> or inserts a new property <code>text</code> at the position identified by an empty <code>range</code>." + }, + { + "name": "setRuleSelector", + "parameters": [ + { "name": "styleSheetId", "$ref": "StyleSheetId" }, + { "name": "range", "$ref": "SourceRange" }, + { "name": "selector", "type": "string" } + ], + "returns": [ + { "name": "rule", "$ref": "CSSRule", "description": "The resulting rule after the selector modification." } + ], + "description": "Modifies the rule selector." + }, + { + "name": "setMediaText", + "parameters": [ + { "name": "styleSheetId", "$ref": "StyleSheetId" }, + { "name": "range", "$ref": "SourceRange" }, + { "name": "text", "type": "string" } + ], + "returns": [ + { "name": "media", "$ref": "CSSMedia", "description": "The resulting CSS media rule after modification." } + ], + "description": "Modifies the rule selector." + }, + { + "name": "createStyleSheet", + "parameters": [ + { "name": "frameId", "$ref": "Page.FrameId", "description": "Identifier of the frame where \"via-inspector\" stylesheet should be created."} + ], + "returns": [ + { "name": "styleSheetId", "$ref": "StyleSheetId", "description": "Identifier of the created \"via-inspector\" stylesheet." } + ], + "description": "Creates a new special \"via-inspector\" stylesheet in the frame with given <code>frameId</code>." + }, + { + "name": "addRule", + "parameters": [ + { "name": "styleSheetId", "$ref": "StyleSheetId", "description": "The css style sheet identifier where a new rule should be inserted." }, + { "name": "ruleText", "type": "string", "description": "The text of a new rule." }, + { "name": "location", "$ref": "SourceRange", "description": "Text position of a new rule in the target style sheet." } + ], + "returns": [ + { "name": "rule", "$ref": "CSSRule", "description": "The newly created rule." } + ], + "description": "Inserts a new rule with the given <code>ruleText</code> in a stylesheet with given <code>styleSheetId</code>, at the position specified by <code>location</code>." + }, + { + "name": "forcePseudoState", + "parameters": [ + { "name": "nodeId", "$ref": "DOM.NodeId", "description": "The element id for which to force the pseudo state." }, + { "name": "forcedPseudoClasses", "type": "array", "items": { "type": "string", "enum": ["active", "focus", "hover", "visited"] }, "description": "Element pseudo classes to force when computing the element's style." } + ], + "description": "Ensures that the given node will have specified pseudo-classes whenever its style is computed by the browser." + }, + { + "name": "getMediaQueries", + "returns": [ + { "name": "medias", "type": "array", "items": { "$ref": "CSSMedia" } } + ], + "description": "Returns all media queries parsed by the rendering engine.", + "hidden": true + } + ], + "events": [ + { + "name": "mediaQueryResultChanged", + "description": "Fires whenever a MediaQuery result changes (for example, after a browser window has been resized.) The current implementation considers only viewport-dependent media features." + }, + { + "name": "styleSheetChanged", + "parameters": [ + { "name": "styleSheetId", "$ref": "StyleSheetId" } + ], + "description": "Fired whenever a stylesheet is changed as a result of the client operation." + }, + { + "name": "styleSheetAdded", + "parameters": [ + { "name": "header", "$ref": "CSSStyleSheetHeader", "description": "Added stylesheet metainfo." } + ], + "description": "Fired whenever an active document stylesheet is added." + }, + { + "name": "styleSheetRemoved", + "parameters": [ + { "name": "styleSheetId", "$ref": "StyleSheetId", "description": "Identifier of the removed stylesheet." } + ], + "description": "Fired whenever an active document stylesheet is removed." + } + ] + }, + { + "domain": "Timeline", + "description": "Timeline domain is deprecated. Please use Tracing instead.", + "types": [ + { + "id": "TimelineEvent", + "type": "object", + "properties": [ + { "name": "type", "type": "string", "description": "Event type." }, + { "name": "data", "type": "object", "description": "Event data." }, + { "name": "startTime", "type": "number", "description": "Start time." }, + { "name": "endTime", "type": "number", "optional": true, "description": "End time." }, + { "name": "children", "type": "array", "optional": true, "items": { "$ref": "TimelineEvent" }, "description": "Nested records." }, + { "name": "thread", "type": "string", "optional": true, "hidden": true, "description": "If present, identifies the thread that produced the event." }, + { "name": "stackTrace", "$ref": "Console.StackTrace", "optional": true, "hidden": true, "description": "Stack trace." }, + { "name": "frameId", "type": "string", "optional": true, "hidden": true, "description": "Unique identifier of the frame within the page that the event relates to." } + ], + "description": "Timeline record contains information about the recorded activity." + } + ], + "commands": [ + { + "name": "enable", + "description": "Deprecated." + }, + { + "name": "disable", + "description": "Deprecated." + }, + { + "name": "start", + "parameters": [ + { "name": "maxCallStackDepth", "optional": true, "type": "integer", "description": "Samples JavaScript stack traces up to <code>maxCallStackDepth</code>, defaults to 5." }, + { "name": "bufferEvents", "optional": true, "type": "boolean", "hidden": true, "description": "Whether instrumentation events should be buffered and returned upon <code>stop</code> call." }, + { "name": "liveEvents", "optional": true, "type": "string", "hidden": true, "description": "Coma separated event types to issue although bufferEvents is set."}, + { "name": "includeCounters", "optional": true, "type": "boolean", "hidden": true, "description": "Whether counters data should be included into timeline events." }, + { "name": "includeGPUEvents", "optional": true, "type": "boolean", "hidden": true, "description": "Whether events from GPU process should be collected." } + ], + "description": "Deprecated." + }, + { + "name": "stop", + "description": "Deprecated." + } + ], + "events": [ + { + "name": "eventRecorded", + "parameters": [ + { "name": "record", "$ref": "TimelineEvent", "description": "Timeline event record data." } + ], + "description": "Deprecated." + } + ] + }, + { + "domain": "Debugger", + "description": "Debugger domain exposes JavaScript debugging capabilities. It allows setting and removing breakpoints, stepping through execution, exploring stack traces, etc.", + "types": [ + { + "id": "BreakpointId", + "type": "string", + "description": "Breakpoint identifier." + }, + { + "id": "ScriptId", + "type": "string", + "description": "Unique script identifier." + }, + { + "id": "CallFrameId", + "type": "string", + "description": "Call frame identifier." + }, + { + "id": "Location", + "type": "object", + "properties": [ + { "name": "scriptId", "$ref": "ScriptId", "description": "Script identifier as reported in the <code>Debugger.scriptParsed</code>." }, + { "name": "lineNumber", "type": "integer", "description": "Line number in the script (0-based)." }, + { "name": "columnNumber", "type": "integer", "optional": true, "description": "Column number in the script (0-based)." } + ], + "description": "Location in the source code." + }, + { + "id": "FunctionDetails", + "hidden": true, + "type": "object", + "properties": [ + { "name": "location", "$ref": "Location", "optional": true, "description": "Location of the function, none for native functions." }, + { "name": "functionName", "type": "string", "description": "Name of the function." }, + { "name": "isGenerator", "type": "boolean", "description": "Whether this is a generator function." }, + { "name": "scopeChain", "type": "array", "optional": true, "items": { "$ref": "Scope" }, "description": "Scope chain for this closure." } + ], + "description": "Information about the function." + }, + { + "id": "GeneratorObjectDetails", + "hidden": true, + "type": "object", + "properties": [ + { "name": "function", "$ref": "Runtime.RemoteObject", "description": "Generator function." }, + { "name": "functionName", "type": "string", "description": "Name of the generator function." }, + { "name": "status", "type": "string", "enum": ["running", "suspended", "closed"], "description": "Current generator object status." }, + { "name": "location", "$ref": "Location", "optional": true, "description": "If suspended, location where generator function was suspended (e.g. location of the last 'yield'). Otherwise, location of the generator function." } + ], + "description": "Information about the generator object." + }, + { + "id": "CollectionEntry", + "hidden": true, + "type": "object", + "properties": [ + { "name": "key", "$ref": "Runtime.RemoteObject", "optional": true, "description": "Entry key of a map-like collection, otherwise not provided." }, + { "name": "value", "$ref": "Runtime.RemoteObject", "description": "Entry value." } + ], + "description": "Collection entry." + }, + { + "id": "CallFrame", + "type": "object", + "properties": [ + { "name": "callFrameId", "$ref": "CallFrameId", "description": "Call frame identifier. This identifier is only valid while the virtual machine is paused." }, + { "name": "functionName", "type": "string", "description": "Name of the JavaScript function called on this call frame." }, + { "name": "functionLocation", "$ref": "Location", "optional": true, "hidden": true, "description": "Location in the source code." }, + { "name": "location", "$ref": "Location", "description": "Location in the source code." }, + { "name": "scopeChain", "type": "array", "items": { "$ref": "Scope" }, "description": "Scope chain for this call frame." }, + { "name": "this", "$ref": "Runtime.RemoteObject", "description": "<code>this</code> object for this call frame." }, + { "name": "returnValue", "$ref": "Runtime.RemoteObject", "optional": true, "hidden": true, "description": "The value being returned, if the function is at return point." } + ], + "description": "JavaScript call frame. Array of call frames form the call stack." + }, + { + "id": "StackTrace", + "type": "object", + "properties": [ + { "name": "callFrames", "type": "array", "items": { "$ref": "CallFrame" }, "description": "Call frames of the stack trace." }, + { "name": "description", "type": "string", "optional": true, "description": "String label of this stack trace. For async traces this may be a name of the function that initiated the async call." }, + { "name": "asyncStackTrace", "$ref": "StackTrace", "optional": true, "description": "Async stack trace, if any." } + ], + "description": "JavaScript call stack, including async stack traces.", + "hidden": true + }, + { + "id": "Scope", + "type": "object", + "properties": [ + { "name": "type", "type": "string", "enum": ["global", "local", "with", "closure", "catch", "block", "script"], "description": "Scope type." }, + { "name": "object", "$ref": "Runtime.RemoteObject", "description": "Object representing the scope. For <code>global</code> and <code>with</code> scopes it represents the actual object; for the rest of the scopes, it is artificial transient object enumerating scope variables as its properties." } + ], + "description": "Scope description." + }, + { + "id": "ExceptionDetails", + "type": "object", + "description": "Detailed information on exception (or error) that was thrown during script compilation or execution.", + "properties": [ + { "name": "text", "type": "string", "description": "Exception text." }, + { "name": "url", "type": "string", "optional": true, "description": "URL of the message origin." }, + { "name": "scriptId", "type": "string", "optional": true, "description": "Script ID of the message origin." }, + { "name": "line", "type": "integer", "optional": true, "description": "Line number in the resource that generated this message." }, + { "name": "column", "type": "integer", "optional": true, "description": "Column number in the resource that generated this message." }, + { "name": "stackTrace", "$ref": "Console.StackTrace", "optional": true, "description": "JavaScript stack trace for assertions and error messages." } + ] + }, + { + "id": "SetScriptSourceError", + "type": "object", + "properties": [ + { "name": "compileError", "optional": true, "type": "object", "properties": + [ + { "name": "message", "type": "string", "description": "Compiler error message" }, + { "name": "lineNumber", "type": "integer", "description": "Compile error line number (1-based)" }, + { "name": "columnNumber", "type": "integer", "description": "Compile error column number (1-based)" } + ] + } + ], + "description": "Error data for setScriptSource command. compileError is a case type for uncompilable script source error.", + "hidden": true + }, + { + "id": "PromiseDetails", + "type": "object", + "description": "Information about the promise.", + "properties": [ + { "name": "id", "type": "integer", "description": "Unique id of the promise." }, + { "name": "status", "type": "string", "enum": ["pending", "resolved", "rejected"], "description": "Status of the promise." }, + { "name": "parentId", "type": "integer", "optional": true, "description": "Id of the parent promise." }, + { "name": "callFrame", "$ref": "Console.CallFrame", "optional": true, "description": "Top call frame on promise creation."}, + { "name": "creationTime", "type": "number", "optional": true, "description": "Creation time of the promise." }, + { "name": "settlementTime", "type": "number", "optional": true, "description": "Settlement time of the promise." }, + { "name": "creationStack", "$ref": "Console.StackTrace", "optional": true, "description": "JavaScript stack trace on promise creation." }, + { "name": "asyncCreationStack", "$ref": "Console.AsyncStackTrace", "optional": true, "description": "JavaScript asynchronous stack trace on promise creation, if available." }, + { "name": "settlementStack", "$ref": "Console.StackTrace", "optional": true, "description": "JavaScript stack trace on promise settlement." }, + { "name": "asyncSettlementStack", "$ref": "Console.AsyncStackTrace", "optional": true, "description": "JavaScript asynchronous stack trace on promise settlement, if available." } + ], + "hidden": true + }, + { + "id": "AsyncOperation", + "type": "object", + "description": "Information about the async operation.", + "properties": [ + { "name": "id", "type": "integer", "description": "Unique id of the async operation." }, + { "name": "description", "type": "string", "description": "String description of the async operation." }, + { "name": "stackTrace", "$ref": "Console.StackTrace", "optional": true, "description": "Stack trace where async operation was scheduled." }, + { "name": "asyncStackTrace", "$ref": "Console.AsyncStackTrace", "optional": true, "description": "Asynchronous stack trace where async operation was scheduled, if available." } + ], + "hidden": true + }, + { + "id": "SearchMatch", + "type": "object", + "description": "Search match for resource.", + "properties": [ + { "name": "lineNumber", "type": "number", "description": "Line number in resource content." }, + { "name": "lineContent", "type": "string", "description": "Line with match content." } + ], + "hidden": true + } + ], + "commands": [ + { + "name": "enable", + "description": "Enables debugger for the given page. Clients should not assume that the debugging has been enabled until the result for this command is received." + }, + { + "name": "disable", + "description": "Disables debugger for given page." + }, + { + "name": "setBreakpointsActive", + "parameters": [ + { "name": "active", "type": "boolean", "description": "New value for breakpoints active state." } + ], + "description": "Activates / deactivates all breakpoints on the page." + }, + { + "name": "setSkipAllPauses", + "hidden": true, + "parameters": [ + { "name": "skipped", "type": "boolean", "description": "New value for skip pauses state." } + ], + "description": "Makes page not interrupt on any pauses (breakpoint, exception, dom exception etc)." + }, + { + "name": "setBreakpointByUrl", + "parameters": [ + { "name": "lineNumber", "type": "integer", "description": "Line number to set breakpoint at." }, + { "name": "url", "type": "string", "optional": true, "description": "URL of the resources to set breakpoint on." }, + { "name": "urlRegex", "type": "string", "optional": true, "description": "Regex pattern for the URLs of the resources to set breakpoints on. Either <code>url</code> or <code>urlRegex</code> must be specified." }, + { "name": "columnNumber", "type": "integer", "optional": true, "description": "Offset in the line to set breakpoint at." }, + { "name": "condition", "type": "string", "optional": true, "description": "Expression to use as a breakpoint condition. When specified, debugger will only stop on the breakpoint if this expression evaluates to true." } + ], + "returns": [ + { "name": "breakpointId", "$ref": "BreakpointId", "description": "Id of the created breakpoint for further reference." }, + { "name": "locations", "type": "array", "items": { "$ref": "Location" }, "description": "List of the locations this breakpoint resolved into upon addition." } + ], + "description": "Sets JavaScript breakpoint at given location specified either by URL or URL regex. Once this command is issued, all existing parsed scripts will have breakpoints resolved and returned in <code>locations</code> property. Further matching script parsing will result in subsequent <code>breakpointResolved</code> events issued. This logical breakpoint will survive page reloads." + }, + { + "name": "setBreakpoint", + "parameters": [ + { "name": "location", "$ref": "Location", "description": "Location to set breakpoint in." }, + { "name": "condition", "type": "string", "optional": true, "description": "Expression to use as a breakpoint condition. When specified, debugger will only stop on the breakpoint if this expression evaluates to true." } + ], + "returns": [ + { "name": "breakpointId", "$ref": "BreakpointId", "description": "Id of the created breakpoint for further reference." }, + { "name": "actualLocation", "$ref": "Location", "description": "Location this breakpoint resolved into." } + ], + "description": "Sets JavaScript breakpoint at a given location." + }, + { + "name": "removeBreakpoint", + "parameters": [ + { "name": "breakpointId", "$ref": "BreakpointId" } + ], + "description": "Removes JavaScript breakpoint." + }, + { + "name": "continueToLocation", + "parameters": [ + { "name": "location", "$ref": "Location", "description": "Location to continue to." }, + { "name": "interstatementLocation", "type": "boolean", "optional": true, "hidden": true, "description": "Allows breakpoints at the intemediate positions inside statements." } + ], + "description": "Continues execution until specific location is reached." + }, + { + "name": "stepOver", + "description": "Steps over the statement." + }, + { + "name": "stepInto", + "description": "Steps into the function call." + }, + { + "name": "stepOut", + "description": "Steps out of the function call." + }, + { + "name": "pause", + "description": "Stops on the next JavaScript statement." + }, + { + "name": "resume", + "description": "Resumes JavaScript execution." + }, + { + "name": "stepIntoAsync", + "description": "Steps into the first async operation handler that was scheduled by or after the current statement.", + "hidden": true + }, + { + "name": "searchInContent", + "parameters": [ + { "name": "scriptId", "$ref": "ScriptId", "description": "Id of the script to search in." }, + { "name": "query", "type": "string", "description": "String to search for." }, + { "name": "caseSensitive", "type": "boolean", "optional": true, "description": "If true, search is case sensitive." }, + { "name": "isRegex", "type": "boolean", "optional": true, "description": "If true, treats string parameter as regex." } + ], + "returns": [ + { "name": "result", "type": "array", "items": { "$ref": "SearchMatch" }, "description": "List of search matches." } + ], + "description": "Searches for given string in script content." + }, + { + "name": "canSetScriptSource", + "returns": [ + { "name": "result", "type": "boolean", "description": "True if <code>setScriptSource</code> is supported." } + ], + "description": "Always returns true." + }, + { + "name": "setScriptSource", + "parameters": [ + { "name": "scriptId", "$ref": "ScriptId", "description": "Id of the script to edit." }, + { "name": "scriptSource", "type": "string", "description": "New content of the script." }, + { "name": "preview", "type": "boolean", "optional": true, "description": " If true the change will not actually be applied. Preview mode may be used to get result description without actually modifying the code.", "hidden": true } + ], + "returns": [ + { "name": "callFrames", "type": "array", "optional": true, "items": { "$ref": "CallFrame" }, "description": "New stack trace in case editing has happened while VM was stopped." }, + { "name": "result", "type": "object", "optional": true, "description": "VM-specific description of the changes applied.", "hidden": true }, + { "name": "asyncStackTrace", "$ref": "StackTrace", "optional": true, "description": "Async stack trace, if any.", "hidden": true } + ], + "error": { + "$ref": "SetScriptSourceError" + }, + "description": "Edits JavaScript source live." + }, + { + "name": "restartFrame", + "parameters": [ + { "name": "callFrameId", "$ref": "CallFrameId", "description": "Call frame identifier to evaluate on." } + ], + "returns": [ + { "name": "callFrames", "type": "array", "items": { "$ref": "CallFrame" }, "description": "New stack trace." }, + { "name": "result", "type": "object", "description": "VM-specific description." }, + { "name": "asyncStackTrace", "$ref": "StackTrace", "optional": true, "description": "Async stack trace, if any." } + ], + "hidden": true, + "description": "Restarts particular call frame from the beginning." + }, + { + "name": "getScriptSource", + "parameters": [ + { "name": "scriptId", "$ref": "ScriptId", "description": "Id of the script to get source for." } + ], + "returns": [ + { "name": "scriptSource", "type": "string", "description": "Script source." } + ], + "description": "Returns source for the script with given id." + }, + { + "name": "getFunctionDetails", + "hidden": true, + "parameters": [ + { "name": "functionId", "$ref": "Runtime.RemoteObjectId", "description": "Id of the function to get details for." } + ], + "returns": [ + { "name": "details", "$ref": "FunctionDetails", "description": "Information about the function." } + ], + "description": "Returns detailed information on given function." + }, + { + "name": "getGeneratorObjectDetails", + "hidden": true, + "parameters": [ + { "name": "objectId", "$ref": "Runtime.RemoteObjectId", "description": "Id of the generator object to get details for." } + ], + "returns": [ + { "name": "details", "$ref": "GeneratorObjectDetails", "description": "Information about the generator object." } + ], + "description": "Returns detailed information on given generator object." + }, + { + "name": "getCollectionEntries", + "hidden": true, + "parameters": [ + { "name": "objectId", "$ref": "Runtime.RemoteObjectId", "description": "Id of the collection to get entries for." } + ], + "returns": [ + { "name": "entries", "type": "array", "items": { "$ref": "CollectionEntry" }, "description": "Array of collection entries." } + ], + "description": "Returns entries of given collection." + }, + { + "name": "setPauseOnExceptions", + "parameters": [ + { "name": "state", "type": "string", "enum": ["none", "uncaught", "all"], "description": "Pause on exceptions mode." } + ], + "description": "Defines pause on exceptions state. Can be set to stop on all exceptions, uncaught exceptions or no exceptions. Initial pause on exceptions state is <code>none</code>." + }, + { + "name": "evaluateOnCallFrame", + "parameters": [ + { "name": "callFrameId", "$ref": "CallFrameId", "description": "Call frame identifier to evaluate on." }, + { "name": "expression", "type": "string", "description": "Expression to evaluate." }, + { "name": "objectGroup", "type": "string", "optional": true, "description": "String object group name to put result into (allows rapid releasing resulting object handles using <code>releaseObjectGroup</code>)." }, + { "name": "includeCommandLineAPI", "type": "boolean", "optional": true, "description": "Specifies whether command line API should be available to the evaluated expression, defaults to false.", "hidden": true }, + { "name": "doNotPauseOnExceptionsAndMuteConsole", "type": "boolean", "optional": true, "description": "Specifies whether evaluation should stop on exceptions and mute console. Overrides setPauseOnException state.", "hidden": true }, + { "name": "returnByValue", "type": "boolean", "optional": true, "description": "Whether the result is expected to be a JSON object that should be sent by value." }, + { "name": "generatePreview", "type": "boolean", "optional": true, "hidden": true, "description": "Whether preview should be generated for the result." } + ], + "returns": [ + { "name": "result", "$ref": "Runtime.RemoteObject", "description": "Object wrapper for the evaluation result." }, + { "name": "wasThrown", "type": "boolean", "optional": true, "description": "True if the result was thrown during the evaluation." }, + { "name": "exceptionDetails", "$ref": "ExceptionDetails", "optional": true, "hidden": true, "description": "Exception details."} + ], + "description": "Evaluates expression on a given call frame." + }, + { + "name": "compileScript", + "hidden": true, + "parameters": [ + { "name": "expression", "type": "string", "description": "Expression to compile." }, + { "name": "sourceURL", "type": "string", "description": "Source url to be set for the script." }, + { "name": "persistScript", "type": "boolean", "description": "Specifies whether the compiled script should be persisted." }, + { "name": "executionContextId", "$ref": "Runtime.ExecutionContextId", "optional": true, "description": "Specifies in which isolated context to perform script run. Each content script lives in an isolated context and this parameter may be used to specify one of those contexts. If the parameter is omitted or 0 the evaluation will be performed in the context of the inspected page." } + ], + "returns": [ + { "name": "scriptId", "$ref": "ScriptId", "optional": true, "description": "Id of the script." }, + { "name": "exceptionDetails", "$ref": "ExceptionDetails", "optional": true, "description": "Exception details."} + ], + "description": "Compiles expression." + }, + { + "name": "runScript", + "hidden": true, + "parameters": [ + { "name": "scriptId", "$ref": "ScriptId", "description": "Id of the script to run." }, + { "name": "executionContextId", "$ref": "Runtime.ExecutionContextId", "optional": true, "description": "Specifies in which isolated context to perform script run. Each content script lives in an isolated context and this parameter may be used to specify one of those contexts. If the parameter is omitted or 0 the evaluation will be performed in the context of the inspected page." }, + { "name": "objectGroup", "type": "string", "optional": true, "description": "Symbolic group name that can be used to release multiple objects." }, + { "name": "doNotPauseOnExceptionsAndMuteConsole", "type": "boolean", "optional": true, "description": "Specifies whether script run should stop on exceptions and mute console. Overrides setPauseOnException state." } + ], + "returns": [ + { "name": "result", "$ref": "Runtime.RemoteObject", "description": "Run result." }, + { "name": "exceptionDetails", "$ref": "ExceptionDetails", "optional": true, "description": "Exception details."} + ], + "description": "Runs script with given id in a given context." + }, + { + "name": "setVariableValue", + "parameters": [ + { "name": "scopeNumber", "type": "integer", "description": "0-based number of scope as was listed in scope chain. Only 'local', 'closure' and 'catch' scope types are allowed. Other scopes could be manipulated manually." }, + { "name": "variableName", "type": "string", "description": "Variable name." }, + { "name": "newValue", "$ref": "Runtime.CallArgument", "description": "New variable value." }, + { "name": "callFrameId", "$ref": "CallFrameId", "optional": true, "description": "Id of callframe that holds variable." }, + { "name": "functionObjectId", "$ref": "Runtime.RemoteObjectId", "optional": true, "description": "Object id of closure (function) that holds variable." } + ], + "hidden": true, + "description": "Changes value of variable in a callframe or a closure. Either callframe or function must be specified. Object-based scopes are not supported and must be mutated manually." + }, + { + "name": "getStepInPositions", + "parameters": [ + { "name": "callFrameId", "$ref": "CallFrameId", "description": "Id of a call frame where the current statement should be analized" } + ], + "returns": [ + { "name": "stepInPositions", "type": "array", "items": { "$ref": "Location" }, "optional": true, "description": "experimental" } + ], + "hidden": true, + "description": "Lists all positions where step-in is possible for a current statement in a specified call frame" + }, + { + "name": "getBacktrace", + "returns": [ + { "name": "callFrames", "type": "array", "items": { "$ref": "CallFrame" }, "description": "Call stack the virtual machine stopped on." }, + { "name": "asyncStackTrace", "$ref": "StackTrace", "optional": true, "description": "Async stack trace, if any." } + ], + "hidden": true, + "description": "Returns call stack including variables changed since VM was paused. VM must be paused." + }, + { + "name": "skipStackFrames", + "parameters": [ + { "name": "script", "type": "string", "optional": true, "description": "Regular expression defining the scripts to ignore while stepping." }, + { "name": "skipContentScripts", "type": "boolean", "optional": true, "description": "True, if all content scripts should be ignored." } + ], + "hidden": true, + "description": "Makes backend skip steps in the sources with names matching given pattern. VM will try leave blacklisted scripts by performing 'step in' several times, finally resorting to 'step out' if unsuccessful." + }, + { + "name": "setAsyncCallStackDepth", + "parameters": [ + { "name": "maxDepth", "type": "integer", "description": "Maximum depth of async call stacks. Setting to <code>0</code> will effectively disable collecting async call stacks (default)." } + ], + "hidden": true, + "description": "Enables or disables async call stacks tracking." + }, + { + "name": "enablePromiseTracker", + "parameters": [ + { "name": "captureStacks", "type": "boolean", "optional": true, "description": "Whether to capture stack traces for promise creation and settlement events (default: false)." } + ], + "hidden": true, + "description": "Enables promise tracking, information about <code>Promise</code>s created or updated will now be stored on the backend." + }, + { + "name": "disablePromiseTracker", + "hidden": true, + "description": "Disables promise tracking." + }, + { + "name": "getPromises", + "returns": [ + { "name": "promises", "type": "array", "items": { "$ref": "PromiseDetails" }, "description": "Information about stored promises." } + ], + "hidden": true, + "description": "Returns detailed information about all <code>Promise</code>s that were created or updated after the <code>enablePromiseTracker</code> command, and have not been garbage collected yet." + }, + { + "name": "getPromiseById", + "parameters": [ + { "name": "promiseId", "type": "integer" }, + { "name": "objectGroup", "type": "string", "optional": true, "description": "Symbolic group name that can be used to release multiple objects." } + ], + "returns": [ + { "name": "promise", "$ref": "Runtime.RemoteObject", "description": "Object wrapper for <code>Promise</code> with specified ID, if any." } + ], + "hidden": true, + "description": "Returns <code>Promise</code> with specified ID." + }, + { + "name": "flushAsyncOperationEvents", + "hidden": true, + "description": "Fires pending <code>asyncOperationStarted</code> events (if any), as if a debugger stepping session has just been started." + }, + { + "name": "setAsyncOperationBreakpoint", + "parameters": [ + { "name": "operationId", "type": "integer", "description": "ID of the async operation to set breakpoint for." } + ], + "hidden": true, + "description": "Sets breakpoint on AsyncOperation callback handler." + }, + { + "name": "removeAsyncOperationBreakpoint", + "parameters": [ + { "name": "operationId", "type": "integer", "description": "ID of the async operation to remove breakpoint for." } + ], + "hidden": true, + "description": "Removes AsyncOperation breakpoint." + } + ], + "events": [ + { + "name": "globalObjectCleared", + "description": "Called when global has been cleared and debugger client should reset its state. Happens upon navigation or reload." + }, + { + "name": "scriptParsed", + "parameters": [ + { "name": "scriptId", "$ref": "ScriptId", "description": "Identifier of the script parsed." }, + { "name": "url", "type": "string", "description": "URL or name of the script parsed (if any)." }, + { "name": "startLine", "type": "integer", "description": "Line offset of the script within the resource with given URL (for script tags)." }, + { "name": "startColumn", "type": "integer", "description": "Column offset of the script within the resource with given URL." }, + { "name": "endLine", "type": "integer", "description": "Last line of the script." }, + { "name": "endColumn", "type": "integer", "description": "Length of the last line of the script." }, + { "name": "isContentScript", "type": "boolean", "optional": true, "description": "Determines whether this script is a user extension script." }, + { "name": "isInternalScript", "type": "boolean", "optional": true, "description": "Determines whether this script is an internal script.", "hidden": true }, + { "name": "sourceMapURL", "type": "string", "optional": true, "description": "URL of source map associated with script (if any)." }, + { "name": "hasSourceURL", "type": "boolean", "optional": true, "description": "True, if this script has sourceURL.", "hidden": true } + ], + "description": "Fired when virtual machine parses script. This event is also fired for all known and uncollected scripts upon enabling debugger." + }, + { + "name": "scriptFailedToParse", + "parameters": [ + { "name": "scriptId", "$ref": "ScriptId", "description": "Identifier of the script parsed." }, + { "name": "url", "type": "string", "description": "URL or name of the script parsed (if any)." }, + { "name": "startLine", "type": "integer", "description": "Line offset of the script within the resource with given URL (for script tags)." }, + { "name": "startColumn", "type": "integer", "description": "Column offset of the script within the resource with given URL." }, + { "name": "endLine", "type": "integer", "description": "Last line of the script." }, + { "name": "endColumn", "type": "integer", "description": "Length of the last line of the script." }, + { "name": "isContentScript", "type": "boolean", "optional": true, "description": "Determines whether this script is a user extension script." }, + { "name": "isInternalScript", "type": "boolean", "optional": true, "description": "Determines whether this script is an internal script.", "hidden": true }, + { "name": "sourceMapURL", "type": "string", "optional": true, "description": "URL of source map associated with script (if any)." }, + { "name": "hasSourceURL", "type": "boolean", "optional": true, "description": "True, if this script has sourceURL.", "hidden": true } + ], + "description": "Fired when virtual machine fails to parse the script." + }, + { + "name": "breakpointResolved", + "parameters": [ + { "name": "breakpointId", "$ref": "BreakpointId", "description": "Breakpoint unique identifier." }, + { "name": "location", "$ref": "Location", "description": "Actual breakpoint location." } + ], + "description": "Fired when breakpoint is resolved to an actual script and location." + }, + { + "name": "paused", + "parameters": [ + { "name": "callFrames", "type": "array", "items": { "$ref": "CallFrame" }, "description": "Call stack the virtual machine stopped on." }, + { "name": "reason", "type": "string", "enum": [ "XHR", "DOM", "EventListener", "exception", "assert", "CSPViolation", "debugCommand", "promiseRejection", "AsyncOperation", "other" ], "description": "Pause reason." }, + { "name": "data", "type": "object", "optional": true, "description": "Object containing break-specific auxiliary properties." }, + { "name": "hitBreakpoints", "type": "array", "optional": true, "items": { "type": "string" }, "description": "Hit breakpoints IDs", "hidden": true }, + { "name": "asyncStackTrace", "$ref": "StackTrace", "optional": true, "description": "Async stack trace, if any.", "hidden": true } + ], + "description": "Fired when the virtual machine stopped on breakpoint or exception or any other stop criteria." + }, + { + "name": "resumed", + "description": "Fired when the virtual machine resumed execution." + }, + { + "name": "promiseUpdated", + "parameters": [ + { "name": "eventType", "type": "string", "enum": ["new", "update", "gc"], "description": "Type of the event." }, + { "name": "promise", "$ref": "PromiseDetails", "description": "Information about the updated <code>Promise</code>." } + ], + "description": "Fired when a <code>Promise</code> is created, updated or garbage collected.", + "hidden": true + }, + { + "name": "asyncOperationStarted", + "parameters": [ + { "name": "operation", "$ref": "AsyncOperation", "description": "Information about the async operation." } + ], + "description": "Fired when an async operation is scheduled (while in a debugger stepping session).", + "hidden": true + }, + { + "name": "asyncOperationCompleted", + "parameters": [ + { "name": "id", "type": "integer", "description": "ID of the async operation that was completed." } + ], + "description": "Fired when an async operation is completed (while in a debugger stepping session).", + "hidden": true + } + ] + }, + { + "domain": "DOMDebugger", + "description": "DOM debugging allows setting breakpoints on particular DOM operations and events. JavaScript execution will stop on these operations as if there was a regular breakpoint set.", + "types": [ + { + "id": "DOMBreakpointType", + "type": "string", + "enum": ["subtree-modified", "attribute-modified", "node-removed"], + "description": "DOM breakpoint type." + } + ], + "commands": [ + { + "name": "setDOMBreakpoint", + "parameters": [ + { "name": "nodeId", "$ref": "DOM.NodeId", "description": "Identifier of the node to set breakpoint on." }, + { "name": "type", "$ref": "DOMBreakpointType", "description": "Type of the operation to stop upon." } + ], + "description": "Sets breakpoint on particular operation with DOM." + }, + { + "name": "removeDOMBreakpoint", + "parameters": [ + { "name": "nodeId", "$ref": "DOM.NodeId", "description": "Identifier of the node to remove breakpoint from." }, + { "name": "type", "$ref": "DOMBreakpointType", "description": "Type of the breakpoint to remove." } + ], + "description": "Removes DOM breakpoint that was set using <code>setDOMBreakpoint</code>." + }, + { + "name": "setEventListenerBreakpoint", + "parameters": [ + { "name": "eventName", "type": "string", "description": "DOM Event name to stop on (any DOM event will do)." }, + { "name": "targetName", "type": "string", "optional": true, "description": "EventTarget interface name to stop on. If equal to <code>\"*\"</code> or not provided, will stop on any EventTarget.", "hidden": true } + ], + "description": "Sets breakpoint on particular DOM event." + }, + { + "name": "removeEventListenerBreakpoint", + "parameters": [ + { "name": "eventName", "type": "string", "description": "Event name." }, + { "name": "targetName", "type": "string", "optional": true, "description": "EventTarget interface name.", "hidden": true } + ], + "description": "Removes breakpoint on particular DOM event." + }, + { + "name": "setInstrumentationBreakpoint", + "parameters": [ + { "name": "eventName", "type": "string", "description": "Instrumentation name to stop on." } + ], + "description": "Sets breakpoint on particular native event.", + "hidden": true + }, + { + "name": "removeInstrumentationBreakpoint", + "parameters": [ + { "name": "eventName", "type": "string", "description": "Instrumentation name to stop on." } + ], + "description": "Removes breakpoint on particular native event.", + "hidden": true + }, + { + "name": "setXHRBreakpoint", + "parameters": [ + { "name": "url", "type": "string", "description": "Resource URL substring. All XHRs having this substring in the URL will get stopped upon." } + ], + "description": "Sets breakpoint on XMLHttpRequest." + }, + { + "name": "removeXHRBreakpoint", + "parameters": [ + { "name": "url", "type": "string", "description": "Resource URL substring." } + ], + "description": "Removes breakpoint from XMLHttpRequest." + } + ] + }, + { + "domain": "Profiler", + "hidden": true, + "types": [ + { + "id": "CPUProfileNode", + "type": "object", + "description": "CPU Profile node. Holds callsite information, execution statistics and child nodes.", + "properties": [ + { "name": "functionName", "type": "string", "description": "Function name." }, + { "name": "scriptId", "$ref": "Debugger.ScriptId", "description": "Script identifier." }, + { "name": "url", "type": "string", "description": "URL." }, + { "name": "lineNumber", "type": "integer", "description": "1-based line number of the function start position." }, + { "name": "columnNumber", "type": "integer", "description": "1-based column number of the function start position." }, + { "name": "hitCount", "type": "integer", "description": "Number of samples where this node was on top of the call stack." }, + { "name": "callUID", "type": "number", "description": "Call UID." }, + { "name": "children", "type": "array", "items": { "$ref": "CPUProfileNode" }, "description": "Child nodes." }, + { "name": "deoptReason", "type": "string", "description": "The reason of being not optimized. The function may be deoptimized or marked as don't optimize."}, + { "name": "id", "type": "integer", "description": "Unique id of the node." }, + { "name": "positionTicks", "type": "array", "items": { "$ref": "PositionTickInfo" }, "description": "An array of source position ticks." } + ] + }, + { + "id": "CPUProfile", + "type": "object", + "description": "Profile.", + "properties": [ + { "name": "head", "$ref": "CPUProfileNode" }, + { "name": "startTime", "type": "number", "description": "Profiling start time in seconds." }, + { "name": "endTime", "type": "number", "description": "Profiling end time in seconds." }, + { "name": "samples", "optional": true, "type": "array", "items": { "type": "integer" }, "description": "Ids of samples top nodes." }, + { "name": "timestamps", "optional": true, "type": "array", "items": { "type": "number" }, "description": "Timestamps of the samples in microseconds." } + ] + }, + { + "id": "PositionTickInfo", + "type": "object", + "description": "Specifies a number of samples attributed to a certain source position.", + "properties": [ + { "name": "line", "type": "integer", "description": "Source line number (1-based)." }, + { "name": "ticks", "type": "integer", "description": "Number of samples attributed to the source line." } + ] + } + ], + "commands": [ + { + "name": "enable" + }, + { + "name": "disable" + }, + { + "name": "setSamplingInterval", + "parameters": [ + { "name": "interval", "type": "integer", "description": "New sampling interval in microseconds." } + ], + "description": "Changes CPU profiler sampling interval. Must be called before CPU profiles recording started." + }, + { + "name": "start" + }, + { + "name": "stop", + "returns": [ + { "name": "profile", "$ref": "CPUProfile", "description": "Recorded profile." } + ] + } + ], + "events": [ + { + "name": "consoleProfileStarted", + "parameters": [ + { "name": "id", "type": "string" }, + { "name": "location", "$ref": "Debugger.Location", "description": "Location of console.profile()." }, + { "name": "title", "type": "string", "optional": true, "description": "Profile title passed as argument to console.profile()." } + + ], + "description": "Sent when new profile recodring is started using console.profile() call." + }, + { + "name": "consoleProfileFinished", + "parameters": [ + { "name": "id", "type": "string" }, + { "name": "location", "$ref": "Debugger.Location", "description": "Location of console.profileEnd()." }, + { "name": "profile", "$ref": "CPUProfile" }, + { "name": "title", "type": "string", "optional": true, "description": "Profile title passed as argunet to console.profile()." } + ] + } + ] + }, + { + "domain": "HeapProfiler", + "hidden": true, + "types": [ + { + "id": "HeapSnapshotObjectId", + "type": "string", + "description": "Heap snapshot object id." + } + ], + "commands": [ + { + "name": "enable" + }, + { + "name": "disable" + }, + { + "name": "startTrackingHeapObjects", + "parameters": [ + { "name": "trackAllocations", "type": "boolean", "optional": true } + ] + }, + { + "name": "stopTrackingHeapObjects", + "parameters": [ + { "name": "reportProgress", "type": "boolean", "optional": true, "description": "If true 'reportHeapSnapshotProgress' events will be generated while snapshot is being taken when the tracking is stopped." } + ] + + }, + { + "name": "takeHeapSnapshot", + "parameters": [ + { "name": "reportProgress", "type": "boolean", "optional": true, "description": "If true 'reportHeapSnapshotProgress' events will be generated while snapshot is being taken." } + ] + }, + { + "name": "collectGarbage" + }, + { + "name": "getObjectByHeapObjectId", + "parameters": [ + { "name": "objectId", "$ref": "HeapSnapshotObjectId" }, + { "name": "objectGroup", "type": "string", "optional": true, "description": "Symbolic group name that can be used to release multiple objects." } + ], + "returns": [ + { "name": "result", "$ref": "Runtime.RemoteObject", "description": "Evaluation result." } + ] + }, + { + "name": "addInspectedHeapObject", + "parameters": [ + { "name": "heapObjectId", "$ref": "HeapSnapshotObjectId", "description": "Heap snapshot object id to be accessible by means of $x command line API." } + ], + "description": "Enables console to refer to the node with given id via $x (see Command Line API for more details $x functions)." + }, + { + "name": "getHeapObjectId", + "parameters": [ + { "name": "objectId", "$ref": "Runtime.RemoteObjectId", "description": "Identifier of the object to get heap object id for." } + ], + "returns": [ + { "name": "heapSnapshotObjectId", "$ref": "HeapSnapshotObjectId", "description": "Id of the heap snapshot object corresponding to the passed remote object id." } + ] + } + ], + "events": [ + { + "name": "addHeapSnapshotChunk", + "parameters": [ + { "name": "chunk", "type": "string" } + ] + }, + { + "name": "resetProfiles" + }, + { + "name": "reportHeapSnapshotProgress", + "parameters": [ + { "name": "done", "type": "integer" }, + { "name": "total", "type": "integer" }, + { "name": "finished", "type": "boolean", "optional": true } + ] + }, + { + "name": "lastSeenObjectId", + "description": "If heap objects tracking has been started then backend regulary sends a current value for last seen object id and corresponding timestamp. If the were changes in the heap since last event then one or more heapStatsUpdate events will be sent before a new lastSeenObjectId event.", + "parameters": [ + { "name": "lastSeenObjectId", "type": "integer" }, + { "name": "timestamp", "type": "number" } + ] + }, + { + "name": "heapStatsUpdate", + "description": "If heap objects tracking has been started then backend may send update for one or more fragments", + "parameters": [ + { "name": "statsUpdate", "type": "array", "items": { "type": "integer" }, "description": "An array of triplets. Each triplet describes a fragment. The first integer is the fragment index, the second integer is a total count of objects for the fragment, the third integer is a total size of the objects for the fragment."} + ] + } + ] + }, + { + "domain": "Worker", + "hidden": true, + "types": [], + "commands": [ + { + "name": "enable" + }, + { + "name": "disable" + }, + { + "name": "sendMessageToWorker", + "parameters": [ + { "name": "workerId", "type": "string" }, + { "name": "message", "type": "string" } + ] + }, + { + "name": "connectToWorker", + "parameters": [ + { "name": "workerId", "type": "string" } + ] + }, + { + "name": "disconnectFromWorker", + "parameters": [ + { "name": "workerId", "type": "string" } + ] + }, + { + "name": "setAutoconnectToWorkers", + "parameters": [ + { "name": "value", "type": "boolean" } + ] + } + ], + "events": [ + { + "name": "workerCreated", + "parameters": [ + { "name": "workerId", "type": "string" }, + { "name": "url", "type": "string" }, + { "name": "inspectorConnected", "type": "boolean" } + ] + }, + { + "name": "workerTerminated", + "parameters": [ + { "name": "workerId", "type": "string" } + ] + }, + { + "name": "dispatchMessageFromWorker", + "parameters": [ + { "name": "workerId", "type": "string" }, + { "name": "message", "type": "string" } + ] + } + ] + }, + { + "domain": "ServiceWorker", + "hidden": true, + "types": [ + { + "id": "ServiceWorkerRegistration", + "type": "object", + "description": "ServiceWorker registration.", + "properties": [ + { "name": "registrationId", "type": "string" }, + { "name": "scopeURL", "type": "string" }, + { "name": "isDeleted", "type": "boolean", "optional": true } + ] + }, + { + "id": "ServiceWorkerVersionRunningStatus", + "type": "string", + "enum": ["stopped", "starting", "running", "stopping"] + }, + { + "id": "ServiceWorkerVersionStatus", + "type": "string", + "enum": ["new", "installing", "installed", "activating", "activated", "redundant"] + }, + { + "id": "ServiceWorkerVersion", + "type": "object", + "description": "ServiceWorker version.", + "properties": [ + { "name": "versionId", "type": "string" }, + { "name": "registrationId", "type": "string" }, + { "name": "scriptURL", "type": "string" }, + { "name": "runningStatus", "$ref": "ServiceWorkerVersionRunningStatus" }, + { "name": "status", "$ref": "ServiceWorkerVersionStatus" }, + { "name": "scriptLastModified", "type": "number", "optional": true, "description": "The Last-Modified header value of the main script." }, + { "name": "scriptResponseTime", "type": "number", "optional": true, "description": "The time at which the response headers of the main script were received from the server. For cached script it is the last time the cache entry was validated." } + ] + }, + { + "id": "ServiceWorkerErrorMessage", + "type": "object", + "description": "ServiceWorker error message.", + "properties": [ + { "name": "errorMessage", "type": "string" }, + { "name": "registrationId", "type": "string" }, + { "name": "versionId", "type": "string" }, + { "name": "sourceURL", "type": "string" }, + { "name": "lineNumber", "type": "integer" }, + { "name": "columnNumber", "type": "integer" } + ] + } + ], + "commands": [ + { + "name": "enable", + "handlers": ["browser"] + }, + { + "name": "disable", + "handlers": ["browser"] + }, + { + "name": "sendMessage", + "parameters": [ + { "name": "workerId", "type": "string" }, + { "name": "message", "type": "string" } + ], + "handlers": ["browser"] + }, + { + "name": "stop", + "parameters": [ + { "name": "workerId", "type": "string" } + ], + "handlers": ["browser"] + }, + { + "name": "unregister", + "parameters": [ + { "name": "scopeURL", "type": "string" } + ], + "handlers": ["browser"] + }, + { + "name": "updateRegistration", + "parameters": [ + { "name": "scopeURL", "type": "string" } + ], + "handlers": ["browser"] + }, + { + "name": "startWorker", + "parameters": [ + { "name": "scopeURL", "type": "string" } + ], + "handlers": ["browser"] + }, + { + "name": "stopWorker", + "parameters": [ + { "name": "versionId", "type": "string" } + ], + "handlers": ["browser"] + }, + { + "name": "inspectWorker", + "parameters": [ + { "name": "versionId", "type": "string" } + ], + "handlers": ["browser"] + }, + { + "name": "setDebugOnStart", + "parameters": [ + { "name": "debugOnStart", "type": "boolean" } + ], + "handlers": ["browser"] + }, + { + "name": "deliverPushMessage", + "parameters": [ + { "name": "origin", "type": "string" }, + { "name": "registrationId", "type": "string" }, + { "name": "data", "type": "string" } + ], + "handlers": ["browser"] + } + ], + "events": [ + { + "name": "workerCreated", + "parameters": [ + { "name": "workerId", "type": "string" }, + { "name": "url", "type": "string" } + ], + "handlers": ["browser"] + }, + { + "name": "workerTerminated", + "parameters": [ + { "name": "workerId", "type": "string" } + ], + "handlers": ["browser"] + }, + { + "name": "dispatchMessage", + "parameters": [ + { "name": "workerId", "type": "string" }, + { "name": "message", "type": "string" } + ], + "handlers": ["browser"] + }, + { + "name": "workerRegistrationUpdated", + "parameters": [ + { "name": "registrations", "type": "array", "items": { "$ref": "ServiceWorkerRegistration" } } + ], + "handlers": ["browser"] + }, + { + "name": "workerVersionUpdated", + "parameters": [ + { "name": "versions", "type": "array", "items": { "$ref": "ServiceWorkerVersion" } } + ], + "handlers": ["browser"] + }, + { + "name": "workerErrorReported", + "parameters": [ + { "name": "errorMessage", "$ref": "ServiceWorkerErrorMessage" } + ], + "handlers": ["browser"] + }, + { + "name": "debugOnStartUpdated", + "parameters": [ + { "name": "debugOnStart", "type": "boolean" } + ], + "handlers": ["browser"] + } + ] + }, + { + "domain": "Canvas", + "hidden": true, + "types": [ + { + "id": "ResourceId", + "type": "string", + "description": "Unique resource identifier." + }, + { + "id": "ResourceStateDescriptor", + "type": "object", + "description": "Resource state descriptor.", + "properties": [ + { "name": "name", "type": "string", "description": "State name." }, + { "name": "enumValueForName", "type": "string", "optional": true, "description": "String representation of the enum value, if <code>name</code> stands for an enum." }, + { "name": "value", "$ref": "CallArgument", "optional": true, "description": "The value associated with the particular state." }, + { "name": "values", "type": "array", "items": { "$ref": "ResourceStateDescriptor" }, "optional": true, "description": "Array of values associated with the particular state. Either <code>value</code> or <code>values</code> will be specified." }, + { "name": "isArray", "type": "boolean", "optional": true, "description": "True iff the given <code>values</code> items stand for an array rather than a list of grouped states." } + ] + }, + { + "id": "ResourceState", + "type": "object", + "description": "Resource state.", + "properties": [ + { "name": "id", "$ref": "ResourceId" }, + { "name": "traceLogId", "$ref": "TraceLogId" }, + { "name": "descriptors", "type": "array", "items": { "$ref": "ResourceStateDescriptor" }, "optional": true, "description": "Describes current <code>Resource</code> state." }, + { "name": "imageURL", "type": "string", "optional": true, "description": "Screenshot image data URL." } + ] + }, + { + "id": "CallArgument", + "type": "object", + "properties": [ + { "name": "description", "type": "string", "description": "String representation of the object." }, + { "name": "enumName", "type": "string", "optional": true, "description": "Enum name, if any, that stands for the value (for example, a WebGL enum name)." }, + { "name": "resourceId", "$ref": "ResourceId", "optional": true, "description": "Resource identifier. Specified for <code>Resource</code> objects only." }, + { "name": "type", "type": "string", "optional": true, "enum": ["object", "function", "undefined", "string", "number", "boolean"], "description": "Object type. Specified for non <code>Resource</code> objects only." }, + { "name": "subtype", "type": "string", "optional": true, "enum": ["array", "null", "node", "regexp", "date", "map", "set", "iterator", "generator", "error"], "description": "Object subtype hint. Specified for <code>object</code> type values only." }, + { "name": "remoteObject", "$ref": "Runtime.RemoteObject", "optional": true, "description": "The <code>RemoteObject</code>, if requested." } + ] + }, + { + "id": "Call", + "type": "object", + "properties": [ + { "name": "contextId", "$ref": "ResourceId" }, + { "name": "functionName", "type": "string", "optional": true }, + { "name": "arguments", "type": "array", "items": { "$ref": "CallArgument" }, "optional": true }, + { "name": "result", "$ref": "CallArgument", "optional": true }, + { "name": "isDrawingCall", "type": "boolean", "optional": true }, + { "name": "isFrameEndCall", "type": "boolean", "optional": true }, + { "name": "property", "type": "string", "optional": true }, + { "name": "value", "$ref": "CallArgument", "optional": true }, + { "name": "sourceURL", "type": "string", "optional": true }, + { "name": "lineNumber", "type": "integer", "optional": true }, + { "name": "columnNumber", "type": "integer", "optional": true } + ] + }, + { + "id": "TraceLogId", + "type": "string", + "description": "Unique trace log identifier." + }, + { + "id": "TraceLog", + "type": "object", + "properties": [ + { "name": "id", "$ref": "TraceLogId" }, + { "name": "calls", "type": "array", "items": { "$ref": "Call" } }, + { "name": "contexts", "type": "array", "items": { "$ref": "CallArgument" } }, + { "name": "startOffset", "type": "integer" }, + { "name": "alive", "type": "boolean" }, + { "name": "totalAvailableCalls", "type": "number" } + ] + } + ], + "commands": [ + { + "name": "enable", + "description": "Enables Canvas inspection." + }, + { + "name": "disable", + "description": "Disables Canvas inspection." + }, + { + "name": "dropTraceLog", + "parameters": [ + { "name": "traceLogId", "$ref": "TraceLogId" } + ] + }, + { + "name": "hasUninstrumentedCanvases", + "returns": [ + { "name": "result", "type": "boolean" } + ], + "description": "Checks if there is any uninstrumented canvas in the inspected page." + }, + { + "name": "captureFrame", + "parameters": [ + { "name": "frameId", "$ref": "Page.FrameId", "optional": true, "description": "Identifier of the frame containing document whose canvases are to be captured. If omitted, main frame is assumed." } + ], + "returns": [ + { "name": "traceLogId", "$ref": "TraceLogId", "description": "Identifier of the trace log containing captured canvas calls." } + ], + "description": "Starts (or continues) a canvas frame capturing which will be stopped automatically after the next frame is prepared." + }, + { + "name": "startCapturing", + "parameters": [ + { "name": "frameId", "$ref": "Page.FrameId", "optional": true, "description": "Identifier of the frame containing document whose canvases are to be captured. If omitted, main frame is assumed." } + ], + "returns": [ + { "name": "traceLogId", "$ref": "TraceLogId", "description": "Identifier of the trace log containing captured canvas calls." } + ], + "description": "Starts (or continues) consecutive canvas frames capturing. The capturing is stopped by the corresponding stopCapturing command." + }, + { + "name": "stopCapturing", + "parameters": [ + { "name": "traceLogId", "$ref": "TraceLogId" } + ] + }, + { + "name": "getTraceLog", + "parameters": [ + { "name": "traceLogId", "$ref": "TraceLogId" }, + { "name": "startOffset", "type": "integer", "optional": true }, + { "name": "maxLength", "type": "integer", "optional": true } + ], + "returns": [ + { "name": "traceLog", "$ref": "TraceLog" } + ] + }, + { + "name": "replayTraceLog", + "parameters": [ + { "name": "traceLogId", "$ref": "TraceLogId" }, + { "name": "stepNo", "type": "integer", "description": "Last call index in the trace log to replay (zero based)." } + ], + "returns": [ + { "name": "resourceState", "$ref": "ResourceState" }, + { "name": "replayTime", "type": "number", "description": "Replay time (in milliseconds)." } + ] + }, + { + "name": "getResourceState", + "parameters": [ + { "name": "traceLogId", "$ref": "TraceLogId" }, + { "name": "resourceId", "$ref": "ResourceId" } + ], + "returns": [ + { "name": "resourceState", "$ref": "ResourceState" } + ] + }, + { + "name": "evaluateTraceLogCallArgument", + "parameters": [ + { "name": "traceLogId", "$ref": "TraceLogId" }, + { "name": "callIndex", "type": "integer", "description": "Index of the call to evaluate on (zero based)." }, + { "name": "argumentIndex", "type": "integer", "description": "Index of the argument to evaluate (zero based). Provide <code>-1</code> to evaluate call result." }, + { "name": "objectGroup", "type": "string", "optional": true, "description": "String object group name to put result into (allows rapid releasing resulting object handles using <code>Runtime.releaseObjectGroup</code>)." } + ], + "returns": [ + { "name": "result", "$ref": "Runtime.RemoteObject", "optional": true, "description": "Object wrapper for the evaluation result." }, + { "name": "resourceState", "$ref": "ResourceState", "optional": true, "description": "State of the <code>Resource</code> object." } + ], + "description": "Evaluates a given trace call argument or its result." + } + ], + "events": [ + { + "name": "contextCreated", + "parameters": [ + { "name": "frameId", "$ref": "Page.FrameId", "description": "Identifier of the frame containing a canvas with a context." } + ], + "description": "Fired when a canvas context has been created in the given frame. The context may not be instrumented (see hasUninstrumentedCanvases command)." + }, + { + "name": "traceLogsRemoved", + "parameters": [ + { "name": "frameId", "$ref": "Page.FrameId", "optional": true, "description": "If given, trace logs from the given frame were removed." }, + { "name": "traceLogId", "$ref": "TraceLogId", "optional": true, "description": "If given, trace log with the given ID was removed." } + ], + "description": "Fired when a set of trace logs were removed from the backend. If no parameters are given, all trace logs were removed." + } + ] + }, + { + "domain": "Input", + "types": [ + { + "id": "TouchPoint", + "type": "object", + "hidden": true, + "properties": [ + { "name": "state", "type": "string", "enum": ["touchPressed", "touchReleased", "touchMoved", "touchStationary", "touchCancelled"], "description": "State of the touch point." }, + { "name": "x", "type": "integer", "description": "X coordinate of the event relative to the main frame's viewport."}, + { "name": "y", "type": "integer", "description": "Y coordinate of the event relative to the main frame's viewport. 0 refers to the top of the viewport and Y increases as it proceeds towards the bottom of the viewport."}, + { "name": "radiusX", "type": "integer", "optional": true, "description": "X radius of the touch area (default: 1)."}, + { "name": "radiusY", "type": "integer", "optional": true, "description": "Y radius of the touch area (default: 1)."}, + { "name": "rotationAngle", "type": "number", "optional": true, "description": "Rotation angle (default: 0.0)."}, + { "name": "force", "type": "number", "optional": true, "description": "Force (default: 1.0)."}, + { "name": "id", "type": "number", "optional": true, "description": "Identifier used to track touch sources between events, must be unique within an event."} + ] + }, + { + "id": "GestureSourceType", + "type": "string", + "hidden": true, + "enum": ["default", "touch", "mouse"] + } + ], + "commands": [ + { + "name": "dispatchKeyEvent", + "parameters": [ + { "name": "type", "type": "string", "enum": ["keyDown", "keyUp", "rawKeyDown", "char"], "description": "Type of the key event." }, + { "name": "modifiers", "type": "integer", "optional": true, "description": "Bit field representing pressed modifier keys. Alt=1, Ctrl=2, Meta/Command=4, Shift=8 (default: 0)." }, + { "name": "timestamp", "type": "number", "optional": true, "description": "Time at which the event occurred. Measured in UTC time in seconds since January 1, 1970 (default: current time)." }, + { "name": "text", "type": "string", "optional": true, "description": "Text as generated by processing a virtual key code with a keyboard layout. Not needed for for <code>keyUp</code> and <code>rawKeyDown</code> events (default: \"\")" }, + { "name": "unmodifiedText", "type": "string", "optional": true, "description": "Text that would have been generated by the keyboard if no modifiers were pressed (except for shift). Useful for shortcut (accelerator) key handling (default: \"\")." }, + { "name": "keyIdentifier", "type": "string", "optional": true, "description": "Unique key identifier (e.g., 'U+0041') (default: \"\")." }, + { "name": "code", "type": "string", "optional": true, "description": "Unique DOM defined string value for each physical key (e.g., 'KeyA') (default: \"\")." }, + { "name": "windowsVirtualKeyCode", "type": "integer", "optional": true, "description": "Windows virtual key code (default: 0)." }, + { "name": "nativeVirtualKeyCode", "type": "integer", "optional": true, "description": "Native virtual key code (default: 0)." }, + { "name": "autoRepeat", "type": "boolean", "optional": true, "description": "Whether the event was generated from auto repeat (default: false)." }, + { "name": "isKeypad", "type": "boolean", "optional": true, "description": "Whether the event was generated from the keypad (default: false)." }, + { "name": "isSystemKey", "type": "boolean", "optional": true, "description": "Whether the event was a system key event (default: false)." } + ], + "description": "Dispatches a key event to the page.", + "handlers": ["browser"] + }, + { + "name": "dispatchMouseEvent", + "parameters": [ + { "name": "type", "type": "string", "enum": ["mousePressed", "mouseReleased", "mouseMoved"], "description": "Type of the mouse event." }, + { "name": "x", "type": "integer", "description": "X coordinate of the event relative to the main frame's viewport."}, + { "name": "y", "type": "integer", "description": "Y coordinate of the event relative to the main frame's viewport. 0 refers to the top of the viewport and Y increases as it proceeds towards the bottom of the viewport."}, + { "name": "modifiers", "type": "integer", "optional": true, "description": "Bit field representing pressed modifier keys. Alt=1, Ctrl=2, Meta/Command=4, Shift=8 (default: 0)." }, + { "name": "timestamp", "type": "number", "optional": true, "description": "Time at which the event occurred. Measured in UTC time in seconds since January 1, 1970 (default: current time)." }, + { "name": "button", "type": "string", "enum": ["none", "left", "middle", "right"], "optional": true, "description": "Mouse button (default: \"none\")." }, + { "name": "clickCount", "type": "integer", "optional": true, "description": "Number of times the mouse button was clicked (default: 0)." } + ], + "description": "Dispatches a mouse event to the page.", + "handlers": ["browser"] + }, + { + "name": "dispatchTouchEvent", + "hidden": true, + "parameters": [ + { "name": "type", "type": "string", "enum": ["touchStart", "touchEnd", "touchMove"], "description": "Type of the touch event." }, + { "name": "touchPoints", "type": "array", "items": { "$ref": "TouchPoint" }, "description": "Touch points." }, + { "name": "modifiers", "type": "integer", "optional": true, "description": "Bit field representing pressed modifier keys. Alt=1, Ctrl=2, Meta/Command=4, Shift=8 (default: 0)." }, + { "name": "timestamp", "type": "number", "optional": true, "description": "Time at which the event occurred. Measured in UTC time in seconds since January 1, 1970 (default: current time)." } + ], + "description": "Dispatches a touch event to the page." + }, + { + "name": "emulateTouchFromMouseEvent", + "hidden": true, + "parameters": [ + { "name": "type", "type": "string", "enum": ["mousePressed", "mouseReleased", "mouseMoved", "mouseWheel"], "description": "Type of the mouse event." }, + { "name": "x", "type": "integer", "description": "X coordinate of the mouse pointer in DIP."}, + { "name": "y", "type": "integer", "description": "Y coordinate of the mouse pointer in DIP."}, + { "name": "timestamp", "type": "number", "description": "Time at which the event occurred. Measured in UTC time in seconds since January 1, 1970." }, + { "name": "button", "type": "string", "enum": ["none", "left", "middle", "right"], "description": "Mouse button." }, + { "name": "deltaX", "type": "number", "optional": true, "description": "X delta in DIP for mouse wheel event (default: 0)."}, + { "name": "deltaY", "type": "number", "optional": true, "description": "Y delta in DIP for mouse wheel event (default: 0)."}, + { "name": "modifiers", "type": "integer", "optional": true, "description": "Bit field representing pressed modifier keys. Alt=1, Ctrl=2, Meta/Command=4, Shift=8 (default: 0)." }, + { "name": "clickCount", "type": "integer", "optional": true, "description": "Number of times the mouse button was clicked (default: 0)." } + ], + "description": "Emulates touch event from the mouse event parameters.", + "handlers": ["browser"] + }, + { + "name": "synthesizePinchGesture", + "async": true, + "parameters": [ + { "name": "x", "type": "integer", "description": "X coordinate of the start of the gesture in CSS pixels." }, + { "name": "y", "type": "integer", "description": "Y coordinate of the start of the gesture in CSS pixels." }, + { "name": "scaleFactor", "type": "number", "description": "Relative scale factor after zooming (>1.0 zooms in, <1.0 zooms out)." }, + { "name": "relativeSpeed", "type": "integer", "optional": true, "description": "Relative pointer speed in pixels per second (default: 800)." }, + { "name": "gestureSourceType", "$ref": "GestureSourceType", "optional": true, "description": "Which type of input events to be generated (default: 'default', which queries the platform for the preferred input type)." } + ], + "description": "Synthesizes a pinch gesture over a time period by issuing appropriate touch events.", + "hidden": true, + "handlers": ["browser"] + }, + { + "name": "synthesizeScrollGesture", + "async": true, + "parameters": [ + { "name": "x", "type": "integer", "description": "X coordinate of the start of the gesture in CSS pixels." }, + { "name": "y", "type": "integer", "description": "Y coordinate of the start of the gesture in CSS pixels." }, + { "name": "xDistance", "type": "integer", "optional": true, "description": "The distance to scroll along the X axis (positive to scroll left)." }, + { "name": "yDistance", "type": "integer", "optional": true, "description": "The distance to scroll along the Y axis (positive to scroll up)." }, + { "name": "xOverscroll", "type": "integer", "optional": true, "description": "The number of additional pixels to scroll back along the X axis, in addition to the given distance." }, + { "name": "yOverscroll", "type": "integer", "optional": true, "description": "The number of additional pixels to scroll back along the Y axis, in addition to the given distance." }, + { "name": "preventFling", "type": "boolean", "optional": true, "description": "Prevent fling (default: true)." }, + { "name": "speed", "type": "integer", "optional": true, "description": "Swipe speed in pixels per second (default: 800)." }, + { "name": "gestureSourceType", "$ref": "GestureSourceType", "optional": true, "description": "Which type of input events to be generated (default: 'default', which queries the platform for the preferred input type)." } + ], + "description": "Synthesizes a scroll gesture over a time period by issuing appropriate touch events.", + "hidden": true, + "handlers": ["browser"] + }, + { + "name": "synthesizeTapGesture", + "async": true, + "parameters": [ + { "name": "x", "type": "integer", "description": "X coordinate of the start of the gesture in CSS pixels." }, + { "name": "y", "type": "integer", "description": "Y coordinate of the start of the gesture in CSS pixels." }, + { "name": "duration", "type": "integer", "optional": true, "description": "Duration between touchdown and touchup events in ms (default: 50)." }, + { "name": "tapCount", "type": "integer", "optional": true, "description": "Number of times to perform the tap (e.g. 2 for double tap, default: 1)." }, + { "name": "gestureSourceType", "$ref": "GestureSourceType", "optional": true, "description": "Which type of input events to be generated (default: 'default', which queries the platform for the preferred input type)." } + ], + "description": "Synthesizes a tap gesture over a time period by issuing appropriate touch events.", + "hidden": true, + "handlers": ["browser"] + } + ], + "events": [] + }, + { + "domain": "LayerTree", + "hidden": true, + "types": [ + { + "id": "LayerId", + "type": "string", + "description": "Unique Layer identifier." + }, + { + "id": "SnapshotId", + "type": "string", + "description": "Unique snapshot identifier." + }, + { + "id": "ScrollRect", + "type": "object", + "description": "Rectangle where scrolling happens on the main thread.", + "properties": [ + { "name": "rect", "$ref": "DOM.Rect", "description": "Rectangle itself." }, + { "name": "type", "type": "string", "enum": ["RepaintsOnScroll", "TouchEventHandler", "WheelEventHandler"], "description": "Reason for rectangle to force scrolling on the main thread" } + ] + }, + { + "id": "PictureTile", + "type": "object", + "description": "Serialized fragment of layer picture along with its offset within the layer.", + "properties": [ + { "name": "x", "type": "number", "description": "Offset from owning layer left boundary" }, + { "name": "y", "type": "number", "description": "Offset from owning layer top boundary" }, + { "name": "picture", "type": "string", "description": "Base64-encoded snapshot data." } + ] + }, + { + "id": "Layer", + "type": "object", + "description": "Information about a compositing layer.", + "properties": [ + { "name": "layerId", "$ref": "LayerId", "description": "The unique id for this layer." }, + { "name": "parentLayerId", "$ref": "LayerId", "optional": true, "description": "The id of parent (not present for root)." }, + { "name": "backendNodeId", "$ref": "DOM.BackendNodeId", "optional": true, "description": "The backend id for the node associated with this layer." }, + { "name": "offsetX", "type": "number", "description": "Offset from parent layer, X coordinate." }, + { "name": "offsetY", "type": "number", "description": "Offset from parent layer, Y coordinate." }, + { "name": "width", "type": "number", "description": "Layer width." }, + { "name": "height", "type": "number", "description": "Layer height." }, + { "name": "transform", "type": "array", "items": { "type": "number" }, "minItems": 16, "maxItems": 16, "optional": true, "description": "Transformation matrix for layer, default is identity matrix" }, + { "name": "anchorX", "type": "number", "optional": true, "description": "Transform anchor point X, absent if no transform specified" }, + { "name": "anchorY", "type": "number", "optional": true, "description": "Transform anchor point Y, absent if no transform specified" }, + { "name": "anchorZ", "type": "number", "optional": true, "description": "Transform anchor point Z, absent if no transform specified" }, + { "name": "paintCount", "type": "integer", "description": "Indicates how many time this layer has painted." }, + { "name": "drawsContent", "type": "boolean", "description": "Indicates whether this layer hosts any content, rather than being used for transform/scrolling purposes only." }, + { "name": "invisible", "type": "boolean", "optional": true, "description": "Set if layer is not visible." }, + { "name": "scrollRects", "type": "array", "items": { "$ref": "ScrollRect"}, "optional": true, "description": "Rectangles scrolling on main thread only."} + ] + }, + { + "id": "PaintProfile", + "type": "array", + "description": "Array of timings, one per paint step.", + "items": { + "type": "number", + "description": "A time in seconds since the end of previous step (for the first step, time since painting started)" + } + } + ], + "commands": [ + { + "name": "enable", + "description": "Enables compositing tree inspection." + }, + { + "name": "disable", + "description": "Disables compositing tree inspection." + }, + { + "name": "compositingReasons", + "parameters": [ + { "name": "layerId", "$ref": "LayerId", "description": "The id of the layer for which we want to get the reasons it was composited." } + ], + "description": "Provides the reasons why the given layer was composited.", + "returns": [ + { "name": "compositingReasons", "type": "array", "items": { "type": "string" }, "description": "A list of strings specifying reasons for the given layer to become composited." } + ] + }, + { + "name": "makeSnapshot", + "parameters": [ + { "name": "layerId", "$ref": "LayerId", "description": "The id of the layer." } + ], + "description": "Returns the layer snapshot identifier.", + "returns": [ + { "name": "snapshotId", "$ref": "SnapshotId", "description": "The id of the layer snapshot." } + ] + }, + { + "name": "loadSnapshot", + "parameters": [ + { "name": "tiles", "type": "array", "items": { "$ref": "PictureTile" }, "minItems": 1, "description": "An array of tiles composing the snapshot." } + ], + "description": "Returns the snapshot identifier.", + "returns": [ + { "name": "snapshotId", "$ref": "SnapshotId", "description": "The id of the snapshot." } + ] + }, + { + "name": "releaseSnapshot", + "parameters": [ + { "name": "snapshotId", "$ref": "SnapshotId", "description": "The id of the layer snapshot." } + ], + "description": "Releases layer snapshot captured by the back-end." + }, + { + "name": "profileSnapshot", + "parameters": [ + { "name": "snapshotId", "$ref": "SnapshotId", "description": "The id of the layer snapshot." }, + { "name": "minRepeatCount", "type": "integer", "optional": true, "description": "The maximum number of times to replay the snapshot (1, if not specified)." }, + { "name": "minDuration", "type": "number", "optional": true, "description": "The minimum duration (in seconds) to replay the snapshot." }, + { "name": "clipRect", "$ref": "DOM.Rect", "optional": true, "description": "The clip rectangle to apply when replaying the snapshot." } + ], + "returns": [ + { "name": "timings", "type": "array", "items": { "$ref": "PaintProfile" }, "description": "The array of paint profiles, one per run." } + ] + }, + { + "name": "replaySnapshot", + "parameters": [ + { "name": "snapshotId", "$ref": "SnapshotId", "description": "The id of the layer snapshot." }, + { "name": "fromStep", "type": "integer", "optional": true, "description": "The first step to replay from (replay from the very start if not specified)." }, + { "name": "toStep", "type": "integer", "optional": true, "description": "The last step to replay to (replay till the end if not specified)." }, + { "name": "scale", "type": "number", "optional": true, "description": "The scale to apply while replaying (defaults to 1)." } + ], + "description": "Replays the layer snapshot and returns the resulting bitmap.", + "returns": [ + { "name": "dataURL", "type": "string", "description": "A data: URL for resulting image." } + ] + }, + { + "name": "snapshotCommandLog", + "parameters": [ + { "name": "snapshotId", "$ref": "SnapshotId", "description": "The id of the layer snapshot." } + ], + "description": "Replays the layer snapshot and returns canvas log.", + "returns": [ + { "name": "commandLog", "type": "array", "items": { "type": "object" }, "description": "The array of canvas function calls." } + ] + } + ], + "events": [ + { + "name": "layerTreeDidChange", + "parameters": [ + { "name": "layers", "type": "array", "items": { "$ref": "Layer" }, "optional": true, "description": "Layer tree, absent if not in the comspositing mode." } + ] + }, + { + "name": "layerPainted", + "parameters": [ + { "name": "layerId", "$ref": "LayerId", "description": "The id of the painted layer." }, + { "name": "clip", "$ref": "DOM.Rect", "description": "Clip rectangle." } + ] + } + ] + }, + { + "domain": "DeviceOrientation", + "hidden": true, + "commands": [ + { + "name": "setDeviceOrientationOverride", + "description": "Overrides the Device Orientation.", + "parameters": [ + { "name": "alpha", "type": "number", "description": "Mock alpha"}, + { "name": "beta", "type": "number", "description": "Mock beta"}, + { "name": "gamma", "type": "number", "description": "Mock gamma"} + ] + }, + { + "name": "clearDeviceOrientationOverride", + "description": "Clears the overridden Device Orientation." + } + ] + }, + { + "domain": "Tracing", + "commands": [ + { + "name": "start", + "async": true, + "description": "Start trace events collection.", + "parameters": [ + { "name": "categories", "type": "string", "optional": true, "description": "Category/tag filter" }, + { "name": "options", "type": "string", "optional": true, "description": "Tracing options" }, + { "name": "bufferUsageReportingInterval", "type": "number", "optional": true, "description": "If set, the agent will issue bufferUsage events at this interval, specified in milliseconds" } + ], + "handlers": ["browser", "renderer"] + }, + { + "name": "end", + "async": true, + "description": "Stop trace events collection.", + "handlers": ["browser", "renderer"] + }, + { + "name": "getCategories", + "async": true, + "description": "Gets supported tracing categories.", + "returns": [ + { "name": "categories", "type": "array", "items": { "type": "string" }, "description": "A list of supported tracing categories." } + ], + "handlers": ["browser"] + } + ], + "events": [ + { + "name": "dataCollected", + "parameters": [ + { "name": "value", "type": "array", "items": { "type": "object" } } + ], + "description": "Contains an bucket of collected trace events. When tracing is stopped collected events will be send as a sequence of dataCollected events followed by tracingComplete event.", + "handlers": ["browser"] + }, + { + "name": "tracingComplete", + "description": "Signals that tracing is stopped and there is no trace buffers pending flush, all data were delivered via dataCollected events.", + "handlers": ["browser"] + }, + { + "name": "bufferUsage", + "parameters": [ + { "name": "percentFull", "type": "number", "optional": true, "description": "A number in range [0..1] that indicates the used size of event buffer as a fraction of its total size." }, + { "name": "eventCount", "type": "number", "optional": true, "description": "An approximate number of events in the trace log." }, + { "name": "value", "type": "number", "optional": true, "description": "A number in range [0..1] that indicates the used size of event buffer as a fraction of its total size." } + ], + "handlers": ["browser"] + } + ] + }, + { + "domain": "Power", + "hidden": true, + "types": [ + { + "id": "PowerEvent", + "type": "object", + "properties": [ + { "name": "type", "type": "string", "description": "Power Event Type." }, + { "name": "timestamp", "type": "number", "description": "Power Event Time, in milliseconds." }, + { "name": "value", "type": "number", "description": "Power Event Value." } + ], + "description": "PowerEvent item" + } + ], + "commands": [ + { + "name": "start", + "description": "Start power events collection.", + "parameters": [], + "handlers": ["browser", "frontend"] + }, + { + "name": "end", + "description": "Stop power events collection.", + "parameters": [], + "handlers": ["browser", "frontend"] + }, + { + "name": "canProfilePower", + "description": "Tells whether power profiling is supported.", + "returns": [ + { "name": "result", "type": "boolean", "description": "True if power profiling is supported." } + ], + "hidden": true, + "handlers": ["browser", "frontend"] + }, + { + "name": "getAccuracyLevel", + "description": "Describes the accuracy level of the data provider.", + "returns": [ + { "name": "result", "type": "string", "enum": ["high", "moderate", "low"] } + ], + "handlers": ["browser", "frontend"] + } + ], + "events": [ + { + "name": "dataAvailable", + "parameters": [ + {"name": "value", "type": "array", "items": { "$ref": "PowerEvent" }, "description": "List of power events." } + ], + "handlers": ["browser", "frontend"] + } + ] + }, + { + "domain": "Animation", + "hidden": true, + "types": [ + { + "id": "AnimationPlayer", + "type": "object", + "hidden": true, + "properties": [ + { "name": "id", "type": "string", "description": "<code>AnimationPlayer</code>'s id." }, + { "name": "pausedState", "type": "boolean", "hidden": "true", "description": "<code>AnimationPlayer</code>'s internal paused state." }, + { "name": "playState", "type": "string", "description": "<code>AnimationPlayer</code>'s play state." }, + { "name": "playbackRate", "type": "number", "description": "<code>AnimationPlayer</code>'s playback rate." }, + { "name": "startTime", "type": "number", "description": "<code>AnimationPlayer</code>'s start time." }, + { "name": "currentTime", "type": "number", "description": "<code>AnimationPlayer</code>'s current time." }, + { "name": "source", "$ref": "AnimationNode", "description": "<code>AnimationPlayer</code>'s source animation node." }, + { "name": "type", "type": "string", "enum": ["CSSTransition", "CSSAnimation", "WebAnimation"], "description": "Animation type of <code>AnimationPlayer</code>." } + ], + "description": "AnimationPlayer instance." + }, + { + "id": "AnimationNode", + "type": "object", + "hidden": true, + "properties": [ + { "name": "delay", "type": "number", "description": "<code>AnimationNode</code>'s delay." }, + { "name": "endDelay", "type": "number", "description": "<code>AnimationNode</code>'s end delay." }, + { "name": "playbackRate", "type": "number", "description": "<code>AnimationNode</code>'s playbackRate." }, + { "name": "iterationStart", "type": "number", "description": "<code>AnimationNode</code>'s iteration start." }, + { "name": "iterations", "type": "number", "description": "<code>AnimationNode</code>'s iterations." }, + { "name": "duration", "type": "number", "description": "<code>AnimationNode</code>'s iteration duration." }, + { "name": "direction", "type": "string", "description": "<code>AnimationNode</code>'s playback direction." }, + { "name": "fill", "type": "string", "description": "<code>AnimationNode</code>'s fill mode." }, + { "name": "name", "type": "string", "description": "<code>AnimationNode</code>'s name." }, + { "name": "backendNodeId", "$ref": "DOM.BackendNodeId", "description": "<code>AnimationNode</code>'s target node." }, + { "name": "keyframesRule", "$ref": "KeyframesRule", "optional": true, "description": "<code>AnimationNode</code>'s keyframes." }, + { "name": "easing", "type": "string", "description": "<code>AnimationNode</code>'s timing function." } + ], + "description": "AnimationNode instance" + }, + { + "id": "KeyframesRule", + "type": "object", + "properties": [ + { "name": "name", "type": "string", "optional": true, "description": "CSS keyframed animation's name." }, + { "name": "keyframes", "type": "array", "items": { "$ref": "KeyframeStyle" }, "description": "List of animation keyframes." } + ], + "description": "Keyframes Rule" + }, + { + "id": "KeyframeStyle", + "type": "object", + "properties": [ + { "name": "offset", "type": "string", "description": "Keyframe's time offset." }, + { "name": "easing", "type": "string", "description": "<code>AnimationNode</code>'s timing function." } + ], + "description": "Keyframe Style" + } + ], + "commands": [ + { + "name": "enable", + "description": "Enables animation domain notifications." + }, + { + "name": "getAnimationPlayersForNode", + "parameters": [ + { "name": "nodeId", "$ref": "DOM.NodeId", "description": "Id of the node to get animation players for." }, + { "name": "includeSubtreeAnimations", "type": "boolean", "description": "Include animations from elements subtree." } + ], + "returns": [ + { "name": "animationPlayers", "type": "array", "items": { "$ref": "AnimationPlayer" }, "description": "Array of animation players." } + ], + "description": "Returns animation players relevant to the node.", + "hidden": true + }, + { + "name": "getPlaybackRate", + "returns": [ + { "name": "playbackRate", "type": "number", "description": "Playback rate for animations on page."} + ], + "description": "Gets the playback rate of the document timeline." + }, + { + "name": "setPlaybackRate", + "parameters": [ + { "name": "playbackRate", "type": "number", "description": "Playback rate for animations on page" } + ], + "description": "Sets the playback rate of the document timeline." + }, + { + "name": "setCurrentTime", + "parameters": [ + { "name": "currentTime", "type": "number", "description": "Current time for the page animation timeline" } + ], + "description": "Sets the current time of the document timeline." + }, + { + "name": "setTiming", + "parameters": [ + { "name": "playerId", "type": "string", "description": "AnimationPlayer id." }, + { "name": "duration", "type": "number", "description": "Duration of the animation." }, + { "name": "delay", "type": "number", "description": "Delay of the animation." } + ], + "description": "Sets the timing of an animation node." + } + ], + "events": [ + { + "name": "animationPlayerCreated", + "parameters": [ + { "name": "player", "$ref": "AnimationPlayer", "description": "AnimationPlayer that was created." }, + { "name": "resetTimeline", "type": "boolean", "description": "Whether the timeline should be reset." } + ], + "description": "Event for each animation player that has been created." + }, + { + "name": "animationPlayerCanceled", + "parameters": [ + { "name": "playerId", "type": "string", "description": "Id of the AnimationPlayer that was cancelled." } + ], + "description": "Event for AnimationPlayers in the frontend that have been cancelled." + } + ] + }, + { + "domain": "Accessibility", + "hidden": true, + "types": [ + { + "id": "AXNodeId", + "type": "string", + "description": "Unique accessibility node identifier." + }, + { + "id": "AXValueType", + "type": "string", + "enum": [ "boolean", "tristate", "booleanOrUndefined", "idref", "idrefList", "integer", "number", "string", "token", "tokenList", "domRelation", "role", "internalRole" ], + "description": "Enum of possible property types." + }, + { + "id": "AXPropertySourceType", + "type": "string", + "enum": [ "attribute", "implicit", "style" ], + "description": "Enum of possible property sources." + }, + { + "id": "AXPropertySource", + "type": "object", + "properties": [ + { "name": "name", "type": "string", "description": "The name/label of this source." }, + { "name": "sourceType", "$ref": "AXPropertySourceType", "description": "What type of source this is." }, + { "name": "value", "type": "any", "description": "The value of this property source." }, + { "name": "type", "$ref": "AXValueType", "description": "What type the value should be interpreted as." }, + { "name": "invalid", "type": "boolean", "description": "Whether the value for this property is invalid.", "optional": true }, + { "name": "invalidReason", "type": "string", "description": "Reason for the value being invalid, if it is.", "optional": true } + ], + "description": "A single source for a computed AX property." + }, + { + "id": "AXRelatedNode", + "type": "object", + "properties": [ + { "name": "idref", "type": "string", "description": "The IDRef value provided, if any.", "optional": true }, + { "name": "backendNodeId", "$ref": "DOM.BackendNodeId", "description": "The BackendNodeId of the related node." } + ] + }, + { + "id": "AXProperty", + "type": "object", + "properties": [ + { "name": "name", "type": "string", "description": "The name of this property." }, + { "name": "value", "$ref": "AXValue", "description": "The value of this property." } + ] + }, + { + "id": "AXValue", + "type": "object", + "properties": [ + { "name": "type", "$ref": "AXValueType", "description": "The type of this value." }, + + { "name": "value", "type": "any", "description": "The computed value of this property.", "optional": true }, + { "name": "relatedNodeValue", "$ref": "AXRelatedNode", "description": "The related node value, if any.", "optional": true }, + { "name": "relatedNodeArrayValue", "type": "array", "items": { "$ref": "AXRelatedNode" }, "description": "Multiple relted nodes, if applicable.", "optional": true }, + { "name": "sources", "type": "array", "items": { "$ref": "AXPropertySource" }, "description": "The sources which contributed to the computation of this property.", "optional": true } + ], + "description": "A single computed AX property." + }, + { + "id": "AXGlobalStates", + "type": "string", + "enum": [ "disabled", "hidden", "hiddenRoot", "invalid" ], + "description": "States which apply to every AX node." + }, + { + "id": "AXLiveRegionAttributes", + "type": "string", + "enum": [ "live", "atomic", "relevant", "busy", "root" ], + "description": "Attributes which apply to nodes in live regions." + }, + { + "id": "AXWidgetAttributes", + "type": "string", + "enum": [ "autocomplete", "haspopup", "level", "multiselectable", "orientation", "multiline", "readonly", "required", "valuemin", "valuemax", "valuetext" ], + "Description": "Attributes which apply to widgets." + }, + { + "id": "AXWidgetStates", + "type": "string", + "enum": [ "checked", "expanded", "pressed", "selected" ], + "description": "States which apply to widgets." + }, + { + "id": "AXRelationshipAttributes", + "type": "string", + "enum": [ "activedescendant", "flowto", "controls", "describedby", "labelledby", "owns" ], + "description": "Relationships between elements other than parent/child/sibling." + }, + { + "id": "AXNode", + "type": "object", + "properties": [ + { "name": "nodeId", "$ref": "AXNodeId", "description": "Unique identifier for this node." }, + { "name": "role", "$ref": "AXValue", "description": "This <code>Node</code>'s role, whether explicit or implicit." }, + { "name": "name", "$ref": "AXValue", "description": "The accessible name for this <code>Node</code>.", "optional": true }, + { "name": "description", "$ref": "AXValue", "description": "The accessible description for this <code>Node</code>.", "optional": true }, + { "name": "value", "$ref": "AXValue", "description": "The value for this <code>Node</code>.", "optional": true }, + { "name": "help", "$ref": "AXValue", "description": "Help.", "optional": true }, + { "name": "properties", "type": "array", "items": { "$ref": "AXProperty" }, "description": "All other properties" } + ], + "description": "A node in the accessibility tree." + } + ], + "commands": [ + { + "name": "getAXNode", + "parameters": [ + { "name": "nodeId", "$ref": "DOM.NodeId", "description": "ID of node to get accessibility node for." } + ], + "returns": [ + { "name": "accessibilityNode", "$ref": "AXNode", "description": "The <code>Accessibility.AXNode</code> for this DOM node, if it exists.", "optional": true } + ], + "description": "Fetches the accessibility node for this DOM node, if it exists.", + "hidden": true + } + ] + }] +} \ No newline at end of file diff --git a/AutoWebPerf/ChromeProcessInfo.cs b/AutoWebPerf/ChromeProcessInfo.cs deleted file mode 100644 index 34cdf77f7455c630b50dba58444bb81a1589499c..0000000000000000000000000000000000000000 --- a/AutoWebPerf/ChromeProcessInfo.cs +++ /dev/null @@ -1,16 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Diagnostics; -using System.IO; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace AutoWebPerf -{ - class ChromeProcessInfo - { - public DirectoryInfo ChromeUserDirectory { get; set; } - public Process ChromeProcess { get; set; } - } -} diff --git a/AutoWebPerf/Program.cs b/AutoWebPerf/Program.cs index 94509113471909affdb964ce00f63a5c76e35bb7..1727b71b495dcfe40e60dc8f7a9dfde415950c34 100644 --- a/AutoWebPerf/Program.cs +++ b/AutoWebPerf/Program.cs @@ -1,6 +1,4 @@ -using AutoWebPerf.Chrome; -using AutoWebPerf.Chrome.Messages; -using AutoWebPerf.Chrome.Messages.Network; +using ChromeDevTools; using System; using System.Collections.Generic; using System.Diagnostics; @@ -9,6 +7,7 @@ using System.Linq; using System.Text; using System.Threading; using System.Threading.Tasks; +using ChromeDevTools.Protocol; using WebSocket4Net; namespace AutoWebPerf @@ -17,88 +16,33 @@ namespace AutoWebPerf { static void Main(string[] args) { - IChromeProxy _chromeProxy = null; - ChromeProcessInfo chromeProcessInfo = null; + IChromeProcess chromeProcess = null; try { - chromeProcessInfo = StartChrome(); - - var c = new ChromeWrapper("http://localhost:" + ChromeRemoteDebuggingPort); - var sessions = c.GetAvailableSessions(); - foreach (var s in sessions) - Console.WriteLine(s.url); - - if (sessions.Count == 0) - throw new Exception("All debugging sessions are taken."); - - - - // Will drive first tab session - var sessionWSEndpoint = sessions.Last().webSocketDebuggerUrl; // new tab window - c.SetActiveSession(sessionWSEndpoint); - c.NavigateTo("http://www.google.com"); - - - var requestFactory = new RequestFactory(); - _chromeProxy = new ChromeProxy(sessionWSEndpoint, new ResponseFactory(requestFactory)); - _chromeProxy.Init().Wait(); - var result = _chromeProxy.PublishAsync(requestFactory.CreateNetworkEnableRequest()).Result; - _chromeProxy.Subscribe<RequestWillBeSentResponse>((o, e) => - { - Console.WriteLine("We got it!"); - }); - _chromeProxy.PublishAsync(requestFactory.CreateNavigateRequest("http://www.google.com")).Wait(); - + var chromeProcessFactory = new ChromeProcessFactory(); + chromeProcess = chromeProcessFactory.Create(9222); + var endpointUrl = chromeProcess.GetSessions().Result.LastOrDefault(); + var chromeSessionFactory = new ChromeSessionFactory(); + + var chromeSession = chromeSessionFactory.Create(endpointUrl); + var pageEnableResult = chromeSession.SendAsync<ChromeDevTools.Protocol.Page.EnableCommand>().Result; + chromeSession.Subscribe<ChromeDevTools.Protocol.Network.ResponseReceivedEvent>((o, e) => + { + Console.WriteLine("Response Received"); + }); Console.ReadLine(); } finally { - if(null != _chromeProxy) - { - _chromeProxy.Dispose(); + if (null != chromeProcess) + { + chromeProcess.Dispose(); } - KillChrome(chromeProcessInfo); - } - - } - - private static void KillChrome(ChromeProcessInfo chromeProcessInfo) - { - try - { - chromeProcessInfo.ChromeProcess.Kill(); - } catch - { - // right now, the process has been killed ... so i'm swallowing this during setup/testing - } - try - { - chromeProcessInfo.ChromeUserDirectory.Delete(true); - } catch - { - Thread.Sleep(500); - chromeProcessInfo.ChromeUserDirectory.Delete(true); } - } - private static ChromeProcessInfo StartChrome() - { - string path = Path.GetRandomFileName(); - var directoryInfo = Directory.CreateDirectory(Path.Combine(Path.GetTempPath(), path)); - var remoteDebuggingArg = "--remote-debugging-port=" + ChromeRemoteDebuggingPort; - var userDirectoryArg = "--user-data-dir=\"" + directoryInfo.FullName + "\""; - var chromeProcessArgs = remoteDebuggingArg + " " + userDirectoryArg + " --bwsi --no-first-run"; - var processStartInfo = new ProcessStartInfo(@"C:\Program Files (x86)\Google\Chrome\Application\chrome.exe", chromeProcessArgs); - var chromeProcess = Process.Start(processStartInfo); - return new ChromeProcessInfo - { - ChromeProcess = chromeProcess, - ChromeUserDirectory = directoryInfo - }; } - - public const int ChromeRemoteDebuggingPort = 9222; + } } diff --git a/AutoWebPerf/Chrome/Messages/IError.cs b/ChromeDevTools/ChromeController.cs similarity index 69% rename from AutoWebPerf/Chrome/Messages/IError.cs rename to ChromeDevTools/ChromeController.cs index 2d91b4cfc6a0d1e04c1fd5f8f0bdbc6fd12b72df..6cf1e4f59eec060d41793541a2db74507f5b2216 100644 --- a/AutoWebPerf/Chrome/Messages/IError.cs +++ b/ChromeDevTools/ChromeController.cs @@ -4,9 +4,9 @@ using System.Linq; using System.Text; using System.Threading.Tasks; -namespace AutoWebPerf.Chrome.Messages +namespace ChromeDevTools { - interface IError + class ChromeController { } } diff --git a/ChromeDevTools/ChromeDevTools.csproj b/ChromeDevTools/ChromeDevTools.csproj new file mode 100644 index 0000000000000000000000000000000000000000..3e152b3469717cebc39250168372786623004a6e --- /dev/null +++ b/ChromeDevTools/ChromeDevTools.csproj @@ -0,0 +1,898 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" /> + <PropertyGroup> + <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> + <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> + <ProjectGuid>{C2508EE5-AAB2-4275-88C9-7DA9D1961336}</ProjectGuid> + <OutputType>Library</OutputType> + <AppDesignerFolder>Properties</AppDesignerFolder> + <RootNamespace>ChromeDevTools</RootNamespace> + <AssemblyName>ChromeDevTools</AssemblyName> + <TargetFrameworkVersion>v4.5</TargetFrameworkVersion> + <FileAlignment>512</FileAlignment> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> + <DebugSymbols>true</DebugSymbols> + <DebugType>full</DebugType> + <Optimize>false</Optimize> + <OutputPath>bin\Debug\</OutputPath> + <DefineConstants>DEBUG;TRACE</DefineConstants> + <ErrorReport>prompt</ErrorReport> + <WarningLevel>4</WarningLevel> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> + <DebugType>pdbonly</DebugType> + <Optimize>true</Optimize> + <OutputPath>bin\Release\</OutputPath> + <DefineConstants>TRACE</DefineConstants> + <ErrorReport>prompt</ErrorReport> + <WarningLevel>4</WarningLevel> + </PropertyGroup> + <ItemGroup> + <Reference Include="Newtonsoft.Json"> + <HintPath>..\AutoWebPerf\packages\Newtonsoft.Json.6.0.8\lib\net45\Newtonsoft.Json.dll</HintPath> + </Reference> + <Reference Include="System" /> + <Reference Include="System.Core" /> + <Reference Include="System.Xml.Linq" /> + <Reference Include="System.Data.DataSetExtensions" /> + <Reference Include="Microsoft.CSharp" /> + <Reference Include="System.Data" /> + <Reference Include="System.Xml" /> + <Reference Include="WebSocket4Net"> + <HintPath>..\AutoWebPerf\packages\WebSocket4Net.0.12\lib\net45\WebSocket4Net.dll</HintPath> + </Reference> + </ItemGroup> + <ItemGroup> + <Compile Include="ChromeController.cs" /> + <Compile Include="ChromeProcessFactory.cs" /> + <Compile Include="ChromeProcess.cs" /> + <Compile Include="ChromeSession.cs" /> + <Compile Include="ChromeSessionFactory.cs" /> + <Compile Include="Command.cs" /> + <Compile Include="CommandAttribute.cs" /> + <Compile Include="Extensions\JTokenExtensions.cs" /> + <Compile Include="IChromeProcess.cs" /> + <Compile Include="IChromeProcessFactory.cs" /> + <Compile Include="IChromeSession.cs" /> + <Compile Include="IChromeSessionFactory.cs" /> + <Compile Include="IMethodNameAttribute.cs" /> + <Compile Include="MethodTypeMap.cs" /> + <Compile Include="Extensions\ObjectExtensions.cs" /> + <Compile Include="CommandFactory.cs" /> + <Compile Include="CommandResponse.cs" /> + <Compile Include="CommandResponseAttribute.cs" /> + <Compile Include="CommandResponseFactory.cs" /> + <Compile Include="CommandResponseHandler.cs" /> + <Compile Include="ErrorResponse.cs" /> + <Compile Include="Event.cs" /> + <Compile Include="EventAttribute.cs" /> + <Compile Include="EventFactory.cs" /> + <Compile Include="ICommandFactory.cs" /> + <Compile Include="ICommandResponseFactory.cs" /> + <Compile Include="IEventFactory.cs" /> + <Compile Include="IMethodTypeMap.cs" /> + <Compile Include="Properties\AssemblyInfo.cs" /> + <Compile Include="ProtocolNameAttribute.cs" /> + <Compile Include="Protocol\Accessibility\AXGlobalStates.cs" /> + <Compile Include="Protocol\Accessibility\AXLiveRegionAttributes.cs" /> + <Compile Include="Protocol\Accessibility\AXNode.cs" /> + <Compile Include="Protocol\Accessibility\AXProperty.cs" /> + <Compile Include="Protocol\Accessibility\AXPropertySource.cs" /> + <Compile Include="Protocol\Accessibility\AXPropertySourceType.cs" /> + <Compile Include="Protocol\Accessibility\AXRelatedNode.cs" /> + <Compile Include="Protocol\Accessibility\AXRelationshipAttributes.cs" /> + <Compile Include="Protocol\Accessibility\AXValue.cs" /> + <Compile Include="Protocol\Accessibility\AXValueType.cs" /> + <Compile Include="Protocol\Accessibility\AXWidgetAttributes.cs" /> + <Compile Include="Protocol\Accessibility\AXWidgetStates.cs" /> + <Compile Include="Protocol\Accessibility\GetAXNodeCommand.cs" /> + <Compile Include="Protocol\Accessibility\GetAXNodeCommandResponse.cs" /> + <Compile Include="Protocol\Animation\AnimationNode.cs" /> + <Compile Include="Protocol\Animation\AnimationPlayer.cs" /> + <Compile Include="Protocol\Animation\AnimationPlayerCanceledEvent.cs" /> + <Compile Include="Protocol\Animation\AnimationPlayerCreatedEvent.cs" /> + <Compile Include="Protocol\Animation\EnableCommand.cs" /> + <Compile Include="Protocol\Animation\EnableCommandResponse.cs" /> + <Compile Include="Protocol\Animation\GetAnimationPlayersForNodeCommand.cs" /> + <Compile Include="Protocol\Animation\GetAnimationPlayersForNodeCommandResponse.cs" /> + <Compile Include="Protocol\Animation\GetPlaybackRateCommand.cs" /> + <Compile Include="Protocol\Animation\GetPlaybackRateCommandResponse.cs" /> + <Compile Include="Protocol\Animation\KeyframesRule.cs" /> + <Compile Include="Protocol\Animation\KeyframeStyle.cs" /> + <Compile Include="Protocol\Animation\SetCurrentTimeCommand.cs" /> + <Compile Include="Protocol\Animation\SetCurrentTimeCommandResponse.cs" /> + <Compile Include="Protocol\Animation\SetPlaybackRateCommand.cs" /> + <Compile Include="Protocol\Animation\SetPlaybackRateCommandResponse.cs" /> + <Compile Include="Protocol\Animation\SetTimingCommand.cs" /> + <Compile Include="Protocol\Animation\SetTimingCommandResponse.cs" /> + <Compile Include="Protocol\ApplicationCache\ApplicationCache.cs" /> + <Compile Include="Protocol\ApplicationCache\ApplicationCacheResource.cs" /> + <Compile Include="Protocol\ApplicationCache\ApplicationCacheStatusUpdatedEvent.cs" /> + <Compile Include="Protocol\ApplicationCache\EnableCommand.cs" /> + <Compile Include="Protocol\ApplicationCache\EnableCommandResponse.cs" /> + <Compile Include="Protocol\ApplicationCache\FrameWithManifest.cs" /> + <Compile Include="Protocol\ApplicationCache\GetApplicationCacheForFrameCommand.cs" /> + <Compile Include="Protocol\ApplicationCache\GetApplicationCacheForFrameCommandResponse.cs" /> + <Compile Include="Protocol\ApplicationCache\GetFramesWithManifestsCommand.cs" /> + <Compile Include="Protocol\ApplicationCache\GetFramesWithManifestsCommandResponse.cs" /> + <Compile Include="Protocol\ApplicationCache\GetManifestForFrameCommand.cs" /> + <Compile Include="Protocol\ApplicationCache\GetManifestForFrameCommandResponse.cs" /> + <Compile Include="Protocol\ApplicationCache\NetworkStateUpdatedEvent.cs" /> + <Compile Include="Protocol\CacheStorage\Cache.cs" /> + <Compile Include="Protocol\CacheStorage\DataEntry.cs" /> + <Compile Include="Protocol\CacheStorage\DeleteCacheCommand.cs" /> + <Compile Include="Protocol\CacheStorage\DeleteCacheCommandResponse.cs" /> + <Compile Include="Protocol\CacheStorage\RequestCacheNamesCommand.cs" /> + <Compile Include="Protocol\CacheStorage\RequestCacheNamesCommandResponse.cs" /> + <Compile Include="Protocol\CacheStorage\RequestEntriesCommand.cs" /> + <Compile Include="Protocol\CacheStorage\RequestEntriesCommandResponse.cs" /> + <Compile Include="Protocol\Canvas\Call.cs" /> + <Compile Include="Protocol\Canvas\CallArgument.cs" /> + <Compile Include="Protocol\Canvas\CaptureFrameCommand.cs" /> + <Compile Include="Protocol\Canvas\CaptureFrameCommandResponse.cs" /> + <Compile Include="Protocol\Canvas\ContextCreatedEvent.cs" /> + <Compile Include="Protocol\Canvas\DisableCommand.cs" /> + <Compile Include="Protocol\Canvas\DisableCommandResponse.cs" /> + <Compile Include="Protocol\Canvas\DropTraceLogCommand.cs" /> + <Compile Include="Protocol\Canvas\DropTraceLogCommandResponse.cs" /> + <Compile Include="Protocol\Canvas\EnableCommand.cs" /> + <Compile Include="Protocol\Canvas\EnableCommandResponse.cs" /> + <Compile Include="Protocol\Canvas\EvaluateTraceLogCallArgumentCommand.cs" /> + <Compile Include="Protocol\Canvas\EvaluateTraceLogCallArgumentCommandResponse.cs" /> + <Compile Include="Protocol\Canvas\GetResourceStateCommand.cs" /> + <Compile Include="Protocol\Canvas\GetResourceStateCommandResponse.cs" /> + <Compile Include="Protocol\Canvas\GetTraceLogCommand.cs" /> + <Compile Include="Protocol\Canvas\GetTraceLogCommandResponse.cs" /> + <Compile Include="Protocol\Canvas\HasUninstrumentedCanvasesCommand.cs" /> + <Compile Include="Protocol\Canvas\HasUninstrumentedCanvasesCommandResponse.cs" /> + <Compile Include="Protocol\Canvas\ReplayTraceLogCommand.cs" /> + <Compile Include="Protocol\Canvas\ReplayTraceLogCommandResponse.cs" /> + <Compile Include="Protocol\Canvas\ResourceState.cs" /> + <Compile Include="Protocol\Canvas\ResourceStateDescriptor.cs" /> + <Compile Include="Protocol\Canvas\StartCapturingCommand.cs" /> + <Compile Include="Protocol\Canvas\StartCapturingCommandResponse.cs" /> + <Compile Include="Protocol\Canvas\StopCapturingCommand.cs" /> + <Compile Include="Protocol\Canvas\StopCapturingCommandResponse.cs" /> + <Compile Include="Protocol\Canvas\TraceLog.cs" /> + <Compile Include="Protocol\Canvas\TraceLogsRemovedEvent.cs" /> + <Compile Include="Protocol\Console\AsyncStackTrace.cs" /> + <Compile Include="Protocol\Console\CallFrame.cs" /> + <Compile Include="Protocol\Console\ClearMessagesCommand.cs" /> + <Compile Include="Protocol\Console\ClearMessagesCommandResponse.cs" /> + <Compile Include="Protocol\Console\ConsoleMessage.cs" /> + <Compile Include="Protocol\Console\DisableCommand.cs" /> + <Compile Include="Protocol\Console\DisableCommandResponse.cs" /> + <Compile Include="Protocol\Console\EnableCommand.cs" /> + <Compile Include="Protocol\Console\EnableCommandResponse.cs" /> + <Compile Include="Protocol\Console\MessageAddedEvent.cs" /> + <Compile Include="Protocol\Console\MessageRepeatCountUpdatedEvent.cs" /> + <Compile Include="Protocol\Console\MessagesClearedEvent.cs" /> + <Compile Include="Protocol\CSS\AddRuleCommand.cs" /> + <Compile Include="Protocol\CSS\AddRuleCommandResponse.cs" /> + <Compile Include="Protocol\CSS\CreateStyleSheetCommand.cs" /> + <Compile Include="Protocol\CSS\CreateStyleSheetCommandResponse.cs" /> + <Compile Include="Protocol\CSS\CSSComputedStyleProperty.cs" /> + <Compile Include="Protocol\CSS\CSSMedia.cs" /> + <Compile Include="Protocol\CSS\CSSProperty.cs" /> + <Compile Include="Protocol\CSS\CSSRule.cs" /> + <Compile Include="Protocol\CSS\CSSStyle.cs" /> + <Compile Include="Protocol\CSS\CSSStyleSheetHeader.cs" /> + <Compile Include="Protocol\CSS\DisableCommand.cs" /> + <Compile Include="Protocol\CSS\DisableCommandResponse.cs" /> + <Compile Include="Protocol\CSS\EnableCommand.cs" /> + <Compile Include="Protocol\CSS\EnableCommandResponse.cs" /> + <Compile Include="Protocol\CSS\ForcePseudoStateCommand.cs" /> + <Compile Include="Protocol\CSS\ForcePseudoStateCommandResponse.cs" /> + <Compile Include="Protocol\CSS\GetComputedStyleForNodeCommand.cs" /> + <Compile Include="Protocol\CSS\GetComputedStyleForNodeCommandResponse.cs" /> + <Compile Include="Protocol\CSS\GetInlineStylesForNodeCommand.cs" /> + <Compile Include="Protocol\CSS\GetInlineStylesForNodeCommandResponse.cs" /> + <Compile Include="Protocol\CSS\GetMatchedStylesForNodeCommand.cs" /> + <Compile Include="Protocol\CSS\GetMatchedStylesForNodeCommandResponse.cs" /> + <Compile Include="Protocol\CSS\GetMediaQueriesCommand.cs" /> + <Compile Include="Protocol\CSS\GetMediaQueriesCommandResponse.cs" /> + <Compile Include="Protocol\CSS\GetPlatformFontsForNodeCommand.cs" /> + <Compile Include="Protocol\CSS\GetPlatformFontsForNodeCommandResponse.cs" /> + <Compile Include="Protocol\CSS\GetStyleSheetTextCommand.cs" /> + <Compile Include="Protocol\CSS\GetStyleSheetTextCommandResponse.cs" /> + <Compile Include="Protocol\CSS\InheritedStyleEntry.cs" /> + <Compile Include="Protocol\CSS\MediaQuery.cs" /> + <Compile Include="Protocol\CSS\MediaQueryExpression.cs" /> + <Compile Include="Protocol\CSS\MediaQueryResultChangedEvent.cs" /> + <Compile Include="Protocol\CSS\PlatformFontUsage.cs" /> + <Compile Include="Protocol\CSS\PseudoIdMatches.cs" /> + <Compile Include="Protocol\CSS\RuleMatch.cs" /> + <Compile Include="Protocol\CSS\Selector.cs" /> + <Compile Include="Protocol\CSS\SelectorList.cs" /> + <Compile Include="Protocol\CSS\SetMediaTextCommand.cs" /> + <Compile Include="Protocol\CSS\SetMediaTextCommandResponse.cs" /> + <Compile Include="Protocol\CSS\SetPropertyTextCommand.cs" /> + <Compile Include="Protocol\CSS\SetPropertyTextCommandResponse.cs" /> + <Compile Include="Protocol\CSS\SetRuleSelectorCommand.cs" /> + <Compile Include="Protocol\CSS\SetRuleSelectorCommandResponse.cs" /> + <Compile Include="Protocol\CSS\SetStyleSheetTextCommand.cs" /> + <Compile Include="Protocol\CSS\SetStyleSheetTextCommandResponse.cs" /> + <Compile Include="Protocol\CSS\ShorthandEntry.cs" /> + <Compile Include="Protocol\CSS\SourceRange.cs" /> + <Compile Include="Protocol\CSS\StyleSheetAddedEvent.cs" /> + <Compile Include="Protocol\CSS\StyleSheetChangedEvent.cs" /> + <Compile Include="Protocol\CSS\StyleSheetOrigin.cs" /> + <Compile Include="Protocol\CSS\StyleSheetRemovedEvent.cs" /> + <Compile Include="Protocol\Database\AddDatabaseEvent.cs" /> + <Compile Include="Protocol\Database\Database.cs" /> + <Compile Include="Protocol\Database\DisableCommand.cs" /> + <Compile Include="Protocol\Database\DisableCommandResponse.cs" /> + <Compile Include="Protocol\Database\EnableCommand.cs" /> + <Compile Include="Protocol\Database\EnableCommandResponse.cs" /> + <Compile Include="Protocol\Database\Error.cs" /> + <Compile Include="Protocol\Database\ExecuteSQLCommand.cs" /> + <Compile Include="Protocol\Database\ExecuteSQLCommandResponse.cs" /> + <Compile Include="Protocol\Database\GetDatabaseTableNamesCommand.cs" /> + <Compile Include="Protocol\Database\GetDatabaseTableNamesCommandResponse.cs" /> + <Compile Include="Protocol\Debugger\AsyncOperation.cs" /> + <Compile Include="Protocol\Debugger\AsyncOperationCompletedEvent.cs" /> + <Compile Include="Protocol\Debugger\AsyncOperationStartedEvent.cs" /> + <Compile Include="Protocol\Debugger\BreakpointResolvedEvent.cs" /> + <Compile Include="Protocol\Debugger\CallFrame.cs" /> + <Compile Include="Protocol\Debugger\CanSetScriptSourceCommand.cs" /> + <Compile Include="Protocol\Debugger\CanSetScriptSourceCommandResponse.cs" /> + <Compile Include="Protocol\Debugger\CollectionEntry.cs" /> + <Compile Include="Protocol\Debugger\CompileScriptCommand.cs" /> + <Compile Include="Protocol\Debugger\CompileScriptCommandResponse.cs" /> + <Compile Include="Protocol\Debugger\ContinueToLocationCommand.cs" /> + <Compile Include="Protocol\Debugger\ContinueToLocationCommandResponse.cs" /> + <Compile Include="Protocol\Debugger\DisableCommand.cs" /> + <Compile Include="Protocol\Debugger\DisableCommandResponse.cs" /> + <Compile Include="Protocol\Debugger\DisablePromiseTrackerCommand.cs" /> + <Compile Include="Protocol\Debugger\DisablePromiseTrackerCommandResponse.cs" /> + <Compile Include="Protocol\Debugger\EnableCommand.cs" /> + <Compile Include="Protocol\Debugger\EnableCommandResponse.cs" /> + <Compile Include="Protocol\Debugger\EnablePromiseTrackerCommand.cs" /> + <Compile Include="Protocol\Debugger\EnablePromiseTrackerCommandResponse.cs" /> + <Compile Include="Protocol\Debugger\EvaluateOnCallFrameCommand.cs" /> + <Compile Include="Protocol\Debugger\EvaluateOnCallFrameCommandResponse.cs" /> + <Compile Include="Protocol\Debugger\ExceptionDetails.cs" /> + <Compile Include="Protocol\Debugger\FlushAsyncOperationEventsCommand.cs" /> + <Compile Include="Protocol\Debugger\FlushAsyncOperationEventsCommandResponse.cs" /> + <Compile Include="Protocol\Debugger\FunctionDetails.cs" /> + <Compile Include="Protocol\Debugger\GeneratorObjectDetails.cs" /> + <Compile Include="Protocol\Debugger\GetBacktraceCommand.cs" /> + <Compile Include="Protocol\Debugger\GetBacktraceCommandResponse.cs" /> + <Compile Include="Protocol\Debugger\GetCollectionEntriesCommand.cs" /> + <Compile Include="Protocol\Debugger\GetCollectionEntriesCommandResponse.cs" /> + <Compile Include="Protocol\Debugger\GetFunctionDetailsCommand.cs" /> + <Compile Include="Protocol\Debugger\GetFunctionDetailsCommandResponse.cs" /> + <Compile Include="Protocol\Debugger\GetGeneratorObjectDetailsCommand.cs" /> + <Compile Include="Protocol\Debugger\GetGeneratorObjectDetailsCommandResponse.cs" /> + <Compile Include="Protocol\Debugger\GetPromiseByIdCommand.cs" /> + <Compile Include="Protocol\Debugger\GetPromiseByIdCommandResponse.cs" /> + <Compile Include="Protocol\Debugger\GetPromisesCommand.cs" /> + <Compile Include="Protocol\Debugger\GetPromisesCommandResponse.cs" /> + <Compile Include="Protocol\Debugger\GetScriptSourceCommand.cs" /> + <Compile Include="Protocol\Debugger\GetScriptSourceCommandResponse.cs" /> + <Compile Include="Protocol\Debugger\GetStepInPositionsCommand.cs" /> + <Compile Include="Protocol\Debugger\GetStepInPositionsCommandResponse.cs" /> + <Compile Include="Protocol\Debugger\GlobalObjectClearedEvent.cs" /> + <Compile Include="Protocol\Debugger\Location.cs" /> + <Compile Include="Protocol\Debugger\PauseCommand.cs" /> + <Compile Include="Protocol\Debugger\PauseCommandResponse.cs" /> + <Compile Include="Protocol\Debugger\PausedEvent.cs" /> + <Compile Include="Protocol\Debugger\PromiseDetails.cs" /> + <Compile Include="Protocol\Debugger\PromiseUpdatedEvent.cs" /> + <Compile Include="Protocol\Debugger\RemoveAsyncOperationBreakpointCommand.cs" /> + <Compile Include="Protocol\Debugger\RemoveAsyncOperationBreakpointCommandResponse.cs" /> + <Compile Include="Protocol\Debugger\RemoveBreakpointCommand.cs" /> + <Compile Include="Protocol\Debugger\RemoveBreakpointCommandResponse.cs" /> + <Compile Include="Protocol\Debugger\RestartFrameCommand.cs" /> + <Compile Include="Protocol\Debugger\RestartFrameCommandResponse.cs" /> + <Compile Include="Protocol\Debugger\ResumeCommand.cs" /> + <Compile Include="Protocol\Debugger\ResumeCommandResponse.cs" /> + <Compile Include="Protocol\Debugger\ResumedEvent.cs" /> + <Compile Include="Protocol\Debugger\RunScriptCommand.cs" /> + <Compile Include="Protocol\Debugger\RunScriptCommandResponse.cs" /> + <Compile Include="Protocol\Debugger\Scope.cs" /> + <Compile Include="Protocol\Debugger\ScriptFailedToParseEvent.cs" /> + <Compile Include="Protocol\Debugger\ScriptParsedEvent.cs" /> + <Compile Include="Protocol\Debugger\SearchInContentCommand.cs" /> + <Compile Include="Protocol\Debugger\SearchInContentCommandResponse.cs" /> + <Compile Include="Protocol\Debugger\SearchMatch.cs" /> + <Compile Include="Protocol\Debugger\SetAsyncCallStackDepthCommand.cs" /> + <Compile Include="Protocol\Debugger\SetAsyncCallStackDepthCommandResponse.cs" /> + <Compile Include="Protocol\Debugger\SetAsyncOperationBreakpointCommand.cs" /> + <Compile Include="Protocol\Debugger\SetAsyncOperationBreakpointCommandResponse.cs" /> + <Compile Include="Protocol\Debugger\SetBreakpointByUrlCommand.cs" /> + <Compile Include="Protocol\Debugger\SetBreakpointByUrlCommandResponse.cs" /> + <Compile Include="Protocol\Debugger\SetBreakpointCommand.cs" /> + <Compile Include="Protocol\Debugger\SetBreakpointCommandResponse.cs" /> + <Compile Include="Protocol\Debugger\SetBreakpointsActiveCommand.cs" /> + <Compile Include="Protocol\Debugger\SetBreakpointsActiveCommandResponse.cs" /> + <Compile Include="Protocol\Debugger\SetPauseOnExceptionsCommand.cs" /> + <Compile Include="Protocol\Debugger\SetPauseOnExceptionsCommandResponse.cs" /> + <Compile Include="Protocol\Debugger\SetScriptSourceCommand.cs" /> + <Compile Include="Protocol\Debugger\SetScriptSourceCommandResponse.cs" /> + <Compile Include="Protocol\Debugger\SetScriptSourceError.cs" /> + <Compile Include="Protocol\Debugger\SetSkipAllPausesCommand.cs" /> + <Compile Include="Protocol\Debugger\SetSkipAllPausesCommandResponse.cs" /> + <Compile Include="Protocol\Debugger\SetVariableValueCommand.cs" /> + <Compile Include="Protocol\Debugger\SetVariableValueCommandResponse.cs" /> + <Compile Include="Protocol\Debugger\SkipStackFramesCommand.cs" /> + <Compile Include="Protocol\Debugger\SkipStackFramesCommandResponse.cs" /> + <Compile Include="Protocol\Debugger\StackTrace.cs" /> + <Compile Include="Protocol\Debugger\StepIntoAsyncCommand.cs" /> + <Compile Include="Protocol\Debugger\StepIntoAsyncCommandResponse.cs" /> + <Compile Include="Protocol\Debugger\StepIntoCommand.cs" /> + <Compile Include="Protocol\Debugger\StepIntoCommandResponse.cs" /> + <Compile Include="Protocol\Debugger\StepOutCommand.cs" /> + <Compile Include="Protocol\Debugger\StepOutCommandResponse.cs" /> + <Compile Include="Protocol\Debugger\StepOverCommand.cs" /> + <Compile Include="Protocol\Debugger\StepOverCommandResponse.cs" /> + <Compile Include="Protocol\DeviceOrientation\ClearDeviceOrientationOverrideCommand.cs" /> + <Compile Include="Protocol\DeviceOrientation\ClearDeviceOrientationOverrideCommandResponse.cs" /> + <Compile Include="Protocol\DeviceOrientation\SetDeviceOrientationOverrideCommand.cs" /> + <Compile Include="Protocol\DeviceOrientation\SetDeviceOrientationOverrideCommandResponse.cs" /> + <Compile Include="Protocol\DOMDebugger\DOMBreakpointType.cs" /> + <Compile Include="Protocol\DOMDebugger\RemoveDOMBreakpointCommand.cs" /> + <Compile Include="Protocol\DOMDebugger\RemoveDOMBreakpointCommandResponse.cs" /> + <Compile Include="Protocol\DOMDebugger\RemoveEventListenerBreakpointCommand.cs" /> + <Compile Include="Protocol\DOMDebugger\RemoveEventListenerBreakpointCommandResponse.cs" /> + <Compile Include="Protocol\DOMDebugger\RemoveInstrumentationBreakpointCommand.cs" /> + <Compile Include="Protocol\DOMDebugger\RemoveInstrumentationBreakpointCommandResponse.cs" /> + <Compile Include="Protocol\DOMDebugger\RemoveXHRBreakpointCommand.cs" /> + <Compile Include="Protocol\DOMDebugger\RemoveXHRBreakpointCommandResponse.cs" /> + <Compile Include="Protocol\DOMDebugger\SetDOMBreakpointCommand.cs" /> + <Compile Include="Protocol\DOMDebugger\SetDOMBreakpointCommandResponse.cs" /> + <Compile Include="Protocol\DOMDebugger\SetEventListenerBreakpointCommand.cs" /> + <Compile Include="Protocol\DOMDebugger\SetEventListenerBreakpointCommandResponse.cs" /> + <Compile Include="Protocol\DOMDebugger\SetInstrumentationBreakpointCommand.cs" /> + <Compile Include="Protocol\DOMDebugger\SetInstrumentationBreakpointCommandResponse.cs" /> + <Compile Include="Protocol\DOMDebugger\SetXHRBreakpointCommand.cs" /> + <Compile Include="Protocol\DOMDebugger\SetXHRBreakpointCommandResponse.cs" /> + <Compile Include="Protocol\DOMStorage\DisableCommand.cs" /> + <Compile Include="Protocol\DOMStorage\DisableCommandResponse.cs" /> + <Compile Include="Protocol\DOMStorage\DomStorageItemAddedEvent.cs" /> + <Compile Include="Protocol\DOMStorage\DomStorageItemRemovedEvent.cs" /> + <Compile Include="Protocol\DOMStorage\DomStorageItemsClearedEvent.cs" /> + <Compile Include="Protocol\DOMStorage\DomStorageItemUpdatedEvent.cs" /> + <Compile Include="Protocol\DOMStorage\EnableCommand.cs" /> + <Compile Include="Protocol\DOMStorage\EnableCommandResponse.cs" /> + <Compile Include="Protocol\DOMStorage\GetDOMStorageItemsCommand.cs" /> + <Compile Include="Protocol\DOMStorage\GetDOMStorageItemsCommandResponse.cs" /> + <Compile Include="Protocol\DOMStorage\RemoveDOMStorageItemCommand.cs" /> + <Compile Include="Protocol\DOMStorage\RemoveDOMStorageItemCommandResponse.cs" /> + <Compile Include="Protocol\DOMStorage\SetDOMStorageItemCommand.cs" /> + <Compile Include="Protocol\DOMStorage\SetDOMStorageItemCommandResponse.cs" /> + <Compile Include="Protocol\DOMStorage\StorageId.cs" /> + <Compile Include="Protocol\DOM\AttributeModifiedEvent.cs" /> + <Compile Include="Protocol\DOM\AttributeRemovedEvent.cs" /> + <Compile Include="Protocol\DOM\BackendNode.cs" /> + <Compile Include="Protocol\DOM\BoxModel.cs" /> + <Compile Include="Protocol\DOM\CharacterDataModifiedEvent.cs" /> + <Compile Include="Protocol\DOM\ChildNodeCountUpdatedEvent.cs" /> + <Compile Include="Protocol\DOM\ChildNodeInsertedEvent.cs" /> + <Compile Include="Protocol\DOM\ChildNodeRemovedEvent.cs" /> + <Compile Include="Protocol\DOM\CopyToCommand.cs" /> + <Compile Include="Protocol\DOM\CopyToCommandResponse.cs" /> + <Compile Include="Protocol\DOM\DisableCommand.cs" /> + <Compile Include="Protocol\DOM\DisableCommandResponse.cs" /> + <Compile Include="Protocol\DOM\DiscardSearchResultsCommand.cs" /> + <Compile Include="Protocol\DOM\DiscardSearchResultsCommandResponse.cs" /> + <Compile Include="Protocol\DOM\DistributedNodesUpdatedEvent.cs" /> + <Compile Include="Protocol\DOM\DocumentUpdatedEvent.cs" /> + <Compile Include="Protocol\DOM\EnableCommand.cs" /> + <Compile Include="Protocol\DOM\EnableCommandResponse.cs" /> + <Compile Include="Protocol\DOM\EventListener.cs" /> + <Compile Include="Protocol\DOM\FocusCommand.cs" /> + <Compile Include="Protocol\DOM\FocusCommandResponse.cs" /> + <Compile Include="Protocol\DOM\GetAttributesCommand.cs" /> + <Compile Include="Protocol\DOM\GetAttributesCommandResponse.cs" /> + <Compile Include="Protocol\DOM\GetBoxModelCommand.cs" /> + <Compile Include="Protocol\DOM\GetBoxModelCommandResponse.cs" /> + <Compile Include="Protocol\DOM\GetDocumentCommand.cs" /> + <Compile Include="Protocol\DOM\GetDocumentCommandResponse.cs" /> + <Compile Include="Protocol\DOM\GetEventListenersForNodeCommand.cs" /> + <Compile Include="Protocol\DOM\GetEventListenersForNodeCommandResponse.cs" /> + <Compile Include="Protocol\DOM\GetHighlightObjectForTestCommand.cs" /> + <Compile Include="Protocol\DOM\GetHighlightObjectForTestCommandResponse.cs" /> + <Compile Include="Protocol\DOM\GetNodeForLocationCommand.cs" /> + <Compile Include="Protocol\DOM\GetNodeForLocationCommandResponse.cs" /> + <Compile Include="Protocol\DOM\GetOuterHTMLCommand.cs" /> + <Compile Include="Protocol\DOM\GetOuterHTMLCommandResponse.cs" /> + <Compile Include="Protocol\DOM\GetRelayoutBoundaryCommand.cs" /> + <Compile Include="Protocol\DOM\GetRelayoutBoundaryCommandResponse.cs" /> + <Compile Include="Protocol\DOM\GetSearchResultsCommand.cs" /> + <Compile Include="Protocol\DOM\GetSearchResultsCommandResponse.cs" /> + <Compile Include="Protocol\DOM\HideHighlightCommand.cs" /> + <Compile Include="Protocol\DOM\HideHighlightCommandResponse.cs" /> + <Compile Include="Protocol\DOM\HighlightConfig.cs" /> + <Compile Include="Protocol\DOM\HighlightFrameCommand.cs" /> + <Compile Include="Protocol\DOM\HighlightFrameCommandResponse.cs" /> + <Compile Include="Protocol\DOM\HighlightNodeCommand.cs" /> + <Compile Include="Protocol\DOM\HighlightNodeCommandResponse.cs" /> + <Compile Include="Protocol\DOM\HighlightQuadCommand.cs" /> + <Compile Include="Protocol\DOM\HighlightQuadCommandResponse.cs" /> + <Compile Include="Protocol\DOM\HighlightRectCommand.cs" /> + <Compile Include="Protocol\DOM\HighlightRectCommandResponse.cs" /> + <Compile Include="Protocol\DOM\InlineStyleInvalidatedEvent.cs" /> + <Compile Include="Protocol\DOM\InspectNodeRequestedEvent.cs" /> + <Compile Include="Protocol\DOM\MarkUndoableStateCommand.cs" /> + <Compile Include="Protocol\DOM\MarkUndoableStateCommandResponse.cs" /> + <Compile Include="Protocol\DOM\MoveToCommand.cs" /> + <Compile Include="Protocol\DOM\MoveToCommandResponse.cs" /> + <Compile Include="Protocol\DOM\Node.cs" /> + <Compile Include="Protocol\DOM\PerformSearchCommand.cs" /> + <Compile Include="Protocol\DOM\PerformSearchCommandResponse.cs" /> + <Compile Include="Protocol\DOM\PseudoElementAddedEvent.cs" /> + <Compile Include="Protocol\DOM\PseudoElementRemovedEvent.cs" /> + <Compile Include="Protocol\DOM\PseudoType.cs" /> + <Compile Include="Protocol\DOM\PushNodeByPathToFrontendCommand.cs" /> + <Compile Include="Protocol\DOM\PushNodeByPathToFrontendCommandResponse.cs" /> + <Compile Include="Protocol\DOM\PushNodesByBackendIdsToFrontendCommand.cs" /> + <Compile Include="Protocol\DOM\PushNodesByBackendIdsToFrontendCommandResponse.cs" /> + <Compile Include="Protocol\DOM\QuerySelectorAllCommand.cs" /> + <Compile Include="Protocol\DOM\QuerySelectorAllCommandResponse.cs" /> + <Compile Include="Protocol\DOM\QuerySelectorCommand.cs" /> + <Compile Include="Protocol\DOM\QuerySelectorCommandResponse.cs" /> + <Compile Include="Protocol\DOM\Rect.cs" /> + <Compile Include="Protocol\DOM\RedoCommand.cs" /> + <Compile Include="Protocol\DOM\RedoCommandResponse.cs" /> + <Compile Include="Protocol\DOM\RemoveAttributeCommand.cs" /> + <Compile Include="Protocol\DOM\RemoveAttributeCommandResponse.cs" /> + <Compile Include="Protocol\DOM\RemoveNodeCommand.cs" /> + <Compile Include="Protocol\DOM\RemoveNodeCommandResponse.cs" /> + <Compile Include="Protocol\DOM\RequestChildNodesCommand.cs" /> + <Compile Include="Protocol\DOM\RequestChildNodesCommandResponse.cs" /> + <Compile Include="Protocol\DOM\RequestNodeCommand.cs" /> + <Compile Include="Protocol\DOM\RequestNodeCommandResponse.cs" /> + <Compile Include="Protocol\DOM\ResolveNodeCommand.cs" /> + <Compile Include="Protocol\DOM\ResolveNodeCommandResponse.cs" /> + <Compile Include="Protocol\DOM\RGBA.cs" /> + <Compile Include="Protocol\DOM\SetAttributesAsTextCommand.cs" /> + <Compile Include="Protocol\DOM\SetAttributesAsTextCommandResponse.cs" /> + <Compile Include="Protocol\DOM\SetAttributeValueCommand.cs" /> + <Compile Include="Protocol\DOM\SetAttributeValueCommandResponse.cs" /> + <Compile Include="Protocol\DOM\SetChildNodesEvent.cs" /> + <Compile Include="Protocol\DOM\SetFileInputFilesCommand.cs" /> + <Compile Include="Protocol\DOM\SetFileInputFilesCommandResponse.cs" /> + <Compile Include="Protocol\DOM\SetInspectedNodeCommand.cs" /> + <Compile Include="Protocol\DOM\SetInspectedNodeCommandResponse.cs" /> + <Compile Include="Protocol\DOM\SetInspectModeEnabledCommand.cs" /> + <Compile Include="Protocol\DOM\SetInspectModeEnabledCommandResponse.cs" /> + <Compile Include="Protocol\DOM\SetNodeNameCommand.cs" /> + <Compile Include="Protocol\DOM\SetNodeNameCommandResponse.cs" /> + <Compile Include="Protocol\DOM\SetNodeValueCommand.cs" /> + <Compile Include="Protocol\DOM\SetNodeValueCommandResponse.cs" /> + <Compile Include="Protocol\DOM\SetOuterHTMLCommand.cs" /> + <Compile Include="Protocol\DOM\SetOuterHTMLCommandResponse.cs" /> + <Compile Include="Protocol\DOM\ShadowRootPoppedEvent.cs" /> + <Compile Include="Protocol\DOM\ShadowRootPushedEvent.cs" /> + <Compile Include="Protocol\DOM\ShadowRootType.cs" /> + <Compile Include="Protocol\DOM\ShapeOutsideInfo.cs" /> + <Compile Include="Protocol\DOM\UndoCommand.cs" /> + <Compile Include="Protocol\DOM\UndoCommandResponse.cs" /> + <Compile Include="Protocol\Emulation\CanEmulateCommand.cs" /> + <Compile Include="Protocol\Emulation\CanEmulateCommandResponse.cs" /> + <Compile Include="Protocol\Emulation\ClearDeviceMetricsOverrideCommand.cs" /> + <Compile Include="Protocol\Emulation\ClearDeviceMetricsOverrideCommandResponse.cs" /> + <Compile Include="Protocol\Emulation\ClearGeolocationOverrideCommand.cs" /> + <Compile Include="Protocol\Emulation\ClearGeolocationOverrideCommandResponse.cs" /> + <Compile Include="Protocol\Emulation\ResetScrollAndPageScaleFactorCommand.cs" /> + <Compile Include="Protocol\Emulation\ResetScrollAndPageScaleFactorCommandResponse.cs" /> + <Compile Include="Protocol\Emulation\SetDeviceMetricsOverrideCommand.cs" /> + <Compile Include="Protocol\Emulation\SetDeviceMetricsOverrideCommandResponse.cs" /> + <Compile Include="Protocol\Emulation\SetEmulatedMediaCommand.cs" /> + <Compile Include="Protocol\Emulation\SetEmulatedMediaCommandResponse.cs" /> + <Compile Include="Protocol\Emulation\SetGeolocationOverrideCommand.cs" /> + <Compile Include="Protocol\Emulation\SetGeolocationOverrideCommandResponse.cs" /> + <Compile Include="Protocol\Emulation\SetPageScaleFactorCommand.cs" /> + <Compile Include="Protocol\Emulation\SetPageScaleFactorCommandResponse.cs" /> + <Compile Include="Protocol\Emulation\SetScriptExecutionDisabledCommand.cs" /> + <Compile Include="Protocol\Emulation\SetScriptExecutionDisabledCommandResponse.cs" /> + <Compile Include="Protocol\Emulation\SetTouchEmulationEnabledCommand.cs" /> + <Compile Include="Protocol\Emulation\SetTouchEmulationEnabledCommandResponse.cs" /> + <Compile Include="Protocol\Emulation\Viewport.cs" /> + <Compile Include="Protocol\Emulation\ViewportChangedEvent.cs" /> + <Compile Include="Protocol\FileSystem\DeleteEntryCommand.cs" /> + <Compile Include="Protocol\FileSystem\DeleteEntryCommandResponse.cs" /> + <Compile Include="Protocol\FileSystem\DisableCommand.cs" /> + <Compile Include="Protocol\FileSystem\DisableCommandResponse.cs" /> + <Compile Include="Protocol\FileSystem\EnableCommand.cs" /> + <Compile Include="Protocol\FileSystem\EnableCommandResponse.cs" /> + <Compile Include="Protocol\FileSystem\Entry.cs" /> + <Compile Include="Protocol\FileSystem\Metadata.cs" /> + <Compile Include="Protocol\FileSystem\RequestDirectoryContentCommand.cs" /> + <Compile Include="Protocol\FileSystem\RequestDirectoryContentCommandResponse.cs" /> + <Compile Include="Protocol\FileSystem\RequestFileContentCommand.cs" /> + <Compile Include="Protocol\FileSystem\RequestFileContentCommandResponse.cs" /> + <Compile Include="Protocol\FileSystem\RequestFileSystemRootCommand.cs" /> + <Compile Include="Protocol\FileSystem\RequestFileSystemRootCommandResponse.cs" /> + <Compile Include="Protocol\FileSystem\RequestMetadataCommand.cs" /> + <Compile Include="Protocol\FileSystem\RequestMetadataCommandResponse.cs" /> + <Compile Include="Protocol\HeapProfiler\AddHeapSnapshotChunkEvent.cs" /> + <Compile Include="Protocol\HeapProfiler\AddInspectedHeapObjectCommand.cs" /> + <Compile Include="Protocol\HeapProfiler\AddInspectedHeapObjectCommandResponse.cs" /> + <Compile Include="Protocol\HeapProfiler\CollectGarbageCommand.cs" /> + <Compile Include="Protocol\HeapProfiler\CollectGarbageCommandResponse.cs" /> + <Compile Include="Protocol\HeapProfiler\DisableCommand.cs" /> + <Compile Include="Protocol\HeapProfiler\DisableCommandResponse.cs" /> + <Compile Include="Protocol\HeapProfiler\EnableCommand.cs" /> + <Compile Include="Protocol\HeapProfiler\EnableCommandResponse.cs" /> + <Compile Include="Protocol\HeapProfiler\GetHeapObjectIdCommand.cs" /> + <Compile Include="Protocol\HeapProfiler\GetHeapObjectIdCommandResponse.cs" /> + <Compile Include="Protocol\HeapProfiler\GetObjectByHeapObjectIdCommand.cs" /> + <Compile Include="Protocol\HeapProfiler\GetObjectByHeapObjectIdCommandResponse.cs" /> + <Compile Include="Protocol\HeapProfiler\HeapStatsUpdateEvent.cs" /> + <Compile Include="Protocol\HeapProfiler\LastSeenObjectIdEvent.cs" /> + <Compile Include="Protocol\HeapProfiler\ReportHeapSnapshotProgressEvent.cs" /> + <Compile Include="Protocol\HeapProfiler\ResetProfilesEvent.cs" /> + <Compile Include="Protocol\HeapProfiler\StartTrackingHeapObjectsCommand.cs" /> + <Compile Include="Protocol\HeapProfiler\StartTrackingHeapObjectsCommandResponse.cs" /> + <Compile Include="Protocol\HeapProfiler\StopTrackingHeapObjectsCommand.cs" /> + <Compile Include="Protocol\HeapProfiler\StopTrackingHeapObjectsCommandResponse.cs" /> + <Compile Include="Protocol\HeapProfiler\TakeHeapSnapshotCommand.cs" /> + <Compile Include="Protocol\HeapProfiler\TakeHeapSnapshotCommandResponse.cs" /> + <Compile Include="Protocol\IndexedDB\ClearObjectStoreCommand.cs" /> + <Compile Include="Protocol\IndexedDB\ClearObjectStoreCommandResponse.cs" /> + <Compile Include="Protocol\IndexedDB\DatabaseWithObjectStores.cs" /> + <Compile Include="Protocol\IndexedDB\DataEntry.cs" /> + <Compile Include="Protocol\IndexedDB\DisableCommand.cs" /> + <Compile Include="Protocol\IndexedDB\DisableCommandResponse.cs" /> + <Compile Include="Protocol\IndexedDB\EnableCommand.cs" /> + <Compile Include="Protocol\IndexedDB\EnableCommandResponse.cs" /> + <Compile Include="Protocol\IndexedDB\Key.cs" /> + <Compile Include="Protocol\IndexedDB\KeyPath.cs" /> + <Compile Include="Protocol\IndexedDB\KeyRange.cs" /> + <Compile Include="Protocol\IndexedDB\ObjectStore.cs" /> + <Compile Include="Protocol\IndexedDB\ObjectStoreIndex.cs" /> + <Compile Include="Protocol\IndexedDB\RequestDatabaseCommand.cs" /> + <Compile Include="Protocol\IndexedDB\RequestDatabaseCommandResponse.cs" /> + <Compile Include="Protocol\IndexedDB\RequestDatabaseNamesCommand.cs" /> + <Compile Include="Protocol\IndexedDB\RequestDatabaseNamesCommandResponse.cs" /> + <Compile Include="Protocol\IndexedDB\RequestDataCommand.cs" /> + <Compile Include="Protocol\IndexedDB\RequestDataCommandResponse.cs" /> + <Compile Include="Protocol\Input\DispatchKeyEventCommand.cs" /> + <Compile Include="Protocol\Input\DispatchKeyEventCommandResponse.cs" /> + <Compile Include="Protocol\Input\DispatchMouseEventCommand.cs" /> + <Compile Include="Protocol\Input\DispatchMouseEventCommandResponse.cs" /> + <Compile Include="Protocol\Input\DispatchTouchEventCommand.cs" /> + <Compile Include="Protocol\Input\DispatchTouchEventCommandResponse.cs" /> + <Compile Include="Protocol\Input\EmulateTouchFromMouseEventCommand.cs" /> + <Compile Include="Protocol\Input\EmulateTouchFromMouseEventCommandResponse.cs" /> + <Compile Include="Protocol\Input\GestureSourceType.cs" /> + <Compile Include="Protocol\Input\SynthesizePinchGestureCommand.cs" /> + <Compile Include="Protocol\Input\SynthesizePinchGestureCommandResponse.cs" /> + <Compile Include="Protocol\Input\SynthesizeScrollGestureCommand.cs" /> + <Compile Include="Protocol\Input\SynthesizeScrollGestureCommandResponse.cs" /> + <Compile Include="Protocol\Input\SynthesizeTapGestureCommand.cs" /> + <Compile Include="Protocol\Input\SynthesizeTapGestureCommandResponse.cs" /> + <Compile Include="Protocol\Input\TouchPoint.cs" /> + <Compile Include="Protocol\Inspector\DetachedEvent.cs" /> + <Compile Include="Protocol\Inspector\DisableCommand.cs" /> + <Compile Include="Protocol\Inspector\DisableCommandResponse.cs" /> + <Compile Include="Protocol\Inspector\EnableCommand.cs" /> + <Compile Include="Protocol\Inspector\EnableCommandResponse.cs" /> + <Compile Include="Protocol\Inspector\EvaluateForTestInFrontendEvent.cs" /> + <Compile Include="Protocol\Inspector\InspectEvent.cs" /> + <Compile Include="Protocol\Inspector\TargetCrashedEvent.cs" /> + <Compile Include="Protocol\LayerTree\CompositingReasonsCommand.cs" /> + <Compile Include="Protocol\LayerTree\CompositingReasonsCommandResponse.cs" /> + <Compile Include="Protocol\LayerTree\DisableCommand.cs" /> + <Compile Include="Protocol\LayerTree\DisableCommandResponse.cs" /> + <Compile Include="Protocol\LayerTree\EnableCommand.cs" /> + <Compile Include="Protocol\LayerTree\EnableCommandResponse.cs" /> + <Compile Include="Protocol\LayerTree\Layer.cs" /> + <Compile Include="Protocol\LayerTree\LayerPaintedEvent.cs" /> + <Compile Include="Protocol\LayerTree\LayerTreeDidChangeEvent.cs" /> + <Compile Include="Protocol\LayerTree\LoadSnapshotCommand.cs" /> + <Compile Include="Protocol\LayerTree\LoadSnapshotCommandResponse.cs" /> + <Compile Include="Protocol\LayerTree\MakeSnapshotCommand.cs" /> + <Compile Include="Protocol\LayerTree\MakeSnapshotCommandResponse.cs" /> + <Compile Include="Protocol\LayerTree\PictureTile.cs" /> + <Compile Include="Protocol\LayerTree\ProfileSnapshotCommand.cs" /> + <Compile Include="Protocol\LayerTree\ProfileSnapshotCommandResponse.cs" /> + <Compile Include="Protocol\LayerTree\ReleaseSnapshotCommand.cs" /> + <Compile Include="Protocol\LayerTree\ReleaseSnapshotCommandResponse.cs" /> + <Compile Include="Protocol\LayerTree\ReplaySnapshotCommand.cs" /> + <Compile Include="Protocol\LayerTree\ReplaySnapshotCommandResponse.cs" /> + <Compile Include="Protocol\LayerTree\ScrollRect.cs" /> + <Compile Include="Protocol\LayerTree\SnapshotCommandLogCommand.cs" /> + <Compile Include="Protocol\LayerTree\SnapshotCommandLogCommandResponse.cs" /> + <Compile Include="Protocol\Memory\GetDOMCountersCommand.cs" /> + <Compile Include="Protocol\Memory\GetDOMCountersCommandResponse.cs" /> + <Compile Include="Protocol\Network\CachedResource.cs" /> + <Compile Include="Protocol\Network\CanClearBrowserCacheCommand.cs" /> + <Compile Include="Protocol\Network\CanClearBrowserCacheCommandResponse.cs" /> + <Compile Include="Protocol\Network\CanClearBrowserCookiesCommand.cs" /> + <Compile Include="Protocol\Network\CanClearBrowserCookiesCommandResponse.cs" /> + <Compile Include="Protocol\Network\CanEmulateNetworkConditionsCommand.cs" /> + <Compile Include="Protocol\Network\CanEmulateNetworkConditionsCommandResponse.cs" /> + <Compile Include="Protocol\Network\ClearBrowserCacheCommand.cs" /> + <Compile Include="Protocol\Network\ClearBrowserCacheCommandResponse.cs" /> + <Compile Include="Protocol\Network\ClearBrowserCookiesCommand.cs" /> + <Compile Include="Protocol\Network\ClearBrowserCookiesCommandResponse.cs" /> + <Compile Include="Protocol\Network\Cookie.cs" /> + <Compile Include="Protocol\Network\DataReceivedEvent.cs" /> + <Compile Include="Protocol\Network\DeleteCookieCommand.cs" /> + <Compile Include="Protocol\Network\DeleteCookieCommandResponse.cs" /> + <Compile Include="Protocol\Network\DisableCommand.cs" /> + <Compile Include="Protocol\Network\DisableCommandResponse.cs" /> + <Compile Include="Protocol\Network\EmulateNetworkConditionsCommand.cs" /> + <Compile Include="Protocol\Network\EmulateNetworkConditionsCommandResponse.cs" /> + <Compile Include="Protocol\Network\EnableCommand.cs" /> + <Compile Include="Protocol\Network\EnableCommandResponse.cs" /> + <Compile Include="Protocol\Network\EventSourceMessageReceivedEvent.cs" /> + <Compile Include="Protocol\Network\GetCookiesCommand.cs" /> + <Compile Include="Protocol\Network\GetCookiesCommandResponse.cs" /> + <Compile Include="Protocol\Network\GetResponseBodyCommand.cs" /> + <Compile Include="Protocol\Network\GetResponseBodyCommandResponse.cs" /> + <Compile Include="Protocol\Network\Initiator.cs" /> + <Compile Include="Protocol\Network\LoadingFailedEvent.cs" /> + <Compile Include="Protocol\Network\LoadingFinishedEvent.cs" /> + <Compile Include="Protocol\Network\ReplayXHRCommand.cs" /> + <Compile Include="Protocol\Network\ReplayXHRCommandResponse.cs" /> + <Compile Include="Protocol\Network\Request.cs" /> + <Compile Include="Protocol\Network\RequestServedFromCacheEvent.cs" /> + <Compile Include="Protocol\Network\RequestWillBeSentEvent.cs" /> + <Compile Include="Protocol\Network\ResourceTiming.cs" /> + <Compile Include="Protocol\Network\Response.cs" /> + <Compile Include="Protocol\Network\ResponseReceivedEvent.cs" /> + <Compile Include="Protocol\Network\SetCacheDisabledCommand.cs" /> + <Compile Include="Protocol\Network\SetCacheDisabledCommandResponse.cs" /> + <Compile Include="Protocol\Network\SetDataSizeLimitsForTestCommand.cs" /> + <Compile Include="Protocol\Network\SetDataSizeLimitsForTestCommandResponse.cs" /> + <Compile Include="Protocol\Network\SetExtraHTTPHeadersCommand.cs" /> + <Compile Include="Protocol\Network\SetExtraHTTPHeadersCommandResponse.cs" /> + <Compile Include="Protocol\Network\SetMonitoringXHREnabledCommand.cs" /> + <Compile Include="Protocol\Network\SetMonitoringXHREnabledCommandResponse.cs" /> + <Compile Include="Protocol\Network\SetUserAgentOverrideCommand.cs" /> + <Compile Include="Protocol\Network\SetUserAgentOverrideCommandResponse.cs" /> + <Compile Include="Protocol\Network\WebSocketClosedEvent.cs" /> + <Compile Include="Protocol\Network\WebSocketCreatedEvent.cs" /> + <Compile Include="Protocol\Network\WebSocketFrame.cs" /> + <Compile Include="Protocol\Network\WebSocketFrameErrorEvent.cs" /> + <Compile Include="Protocol\Network\WebSocketFrameReceivedEvent.cs" /> + <Compile Include="Protocol\Network\WebSocketFrameSentEvent.cs" /> + <Compile Include="Protocol\Network\WebSocketHandshakeResponseReceivedEvent.cs" /> + <Compile Include="Protocol\Network\WebSocketRequest.cs" /> + <Compile Include="Protocol\Network\WebSocketResponse.cs" /> + <Compile Include="Protocol\Network\WebSocketWillSendHandshakeRequestEvent.cs" /> + <Compile Include="Protocol\Page\AddScriptToEvaluateOnLoadCommand.cs" /> + <Compile Include="Protocol\Page\AddScriptToEvaluateOnLoadCommandResponse.cs" /> + <Compile Include="Protocol\Page\CanScreencastCommand.cs" /> + <Compile Include="Protocol\Page\CanScreencastCommandResponse.cs" /> + <Compile Include="Protocol\Page\CaptureScreenshotCommand.cs" /> + <Compile Include="Protocol\Page\CaptureScreenshotCommandResponse.cs" /> + <Compile Include="Protocol\Page\ClearDeviceMetricsOverrideCommand.cs" /> + <Compile Include="Protocol\Page\ClearDeviceMetricsOverrideCommandResponse.cs" /> + <Compile Include="Protocol\Page\ClearDeviceOrientationOverrideCommand.cs" /> + <Compile Include="Protocol\Page\ClearDeviceOrientationOverrideCommandResponse.cs" /> + <Compile Include="Protocol\Page\ClearGeolocationOverrideCommand.cs" /> + <Compile Include="Protocol\Page\ClearGeolocationOverrideCommandResponse.cs" /> + <Compile Include="Protocol\Page\ColorPickedEvent.cs" /> + <Compile Include="Protocol\Page\DeleteCookieCommand.cs" /> + <Compile Include="Protocol\Page\DeleteCookieCommandResponse.cs" /> + <Compile Include="Protocol\Page\DisableCommand.cs" /> + <Compile Include="Protocol\Page\DisableCommandResponse.cs" /> + <Compile Include="Protocol\Page\DomContentEventFiredEvent.cs" /> + <Compile Include="Protocol\Page\EnableCommand.cs" /> + <Compile Include="Protocol\Page\EnableCommandResponse.cs" /> + <Compile Include="Protocol\Page\Frame.cs" /> + <Compile Include="Protocol\Page\FrameAttachedEvent.cs" /> + <Compile Include="Protocol\Page\FrameClearedScheduledNavigationEvent.cs" /> + <Compile Include="Protocol\Page\FrameDetachedEvent.cs" /> + <Compile Include="Protocol\Page\FrameNavigatedEvent.cs" /> + <Compile Include="Protocol\Page\FrameResizedEvent.cs" /> + <Compile Include="Protocol\Page\FrameResourceTree.cs" /> + <Compile Include="Protocol\Page\FrameScheduledNavigationEvent.cs" /> + <Compile Include="Protocol\Page\FrameStartedLoadingEvent.cs" /> + <Compile Include="Protocol\Page\FrameStoppedLoadingEvent.cs" /> + <Compile Include="Protocol\Page\GetCookiesCommand.cs" /> + <Compile Include="Protocol\Page\GetCookiesCommandResponse.cs" /> + <Compile Include="Protocol\Page\GetNavigationHistoryCommand.cs" /> + <Compile Include="Protocol\Page\GetNavigationHistoryCommandResponse.cs" /> + <Compile Include="Protocol\Page\GetResourceContentCommand.cs" /> + <Compile Include="Protocol\Page\GetResourceContentCommandResponse.cs" /> + <Compile Include="Protocol\Page\GetResourceTreeCommand.cs" /> + <Compile Include="Protocol\Page\GetResourceTreeCommandResponse.cs" /> + <Compile Include="Protocol\Page\HandleJavaScriptDialogCommand.cs" /> + <Compile Include="Protocol\Page\HandleJavaScriptDialogCommandResponse.cs" /> + <Compile Include="Protocol\Page\InterstitialHiddenEvent.cs" /> + <Compile Include="Protocol\Page\InterstitialShownEvent.cs" /> + <Compile Include="Protocol\Page\JavascriptDialogClosedEvent.cs" /> + <Compile Include="Protocol\Page\JavascriptDialogOpeningEvent.cs" /> + <Compile Include="Protocol\Page\LoadEventFiredEvent.cs" /> + <Compile Include="Protocol\Page\NavigateCommand.cs" /> + <Compile Include="Protocol\Page\NavigateCommandResponse.cs" /> + <Compile Include="Protocol\Page\NavigateToHistoryEntryCommand.cs" /> + <Compile Include="Protocol\Page\NavigateToHistoryEntryCommandResponse.cs" /> + <Compile Include="Protocol\Page\NavigationEntry.cs" /> + <Compile Include="Protocol\Page\ReloadCommand.cs" /> + <Compile Include="Protocol\Page\ReloadCommandResponse.cs" /> + <Compile Include="Protocol\Page\RemoveScriptToEvaluateOnLoadCommand.cs" /> + <Compile Include="Protocol\Page\RemoveScriptToEvaluateOnLoadCommandResponse.cs" /> + <Compile Include="Protocol\Page\ResourceType.cs" /> + <Compile Include="Protocol\Page\ScreencastFrameAckCommand.cs" /> + <Compile Include="Protocol\Page\ScreencastFrameAckCommandResponse.cs" /> + <Compile Include="Protocol\Page\ScreencastFrameEvent.cs" /> + <Compile Include="Protocol\Page\ScreencastFrameMetadata.cs" /> + <Compile Include="Protocol\Page\ScreencastVisibilityChangedEvent.cs" /> + <Compile Include="Protocol\Page\SearchInResourceCommand.cs" /> + <Compile Include="Protocol\Page\SearchInResourceCommandResponse.cs" /> + <Compile Include="Protocol\Page\SetColorPickerEnabledCommand.cs" /> + <Compile Include="Protocol\Page\SetColorPickerEnabledCommandResponse.cs" /> + <Compile Include="Protocol\Page\SetDeviceMetricsOverrideCommand.cs" /> + <Compile Include="Protocol\Page\SetDeviceMetricsOverrideCommandResponse.cs" /> + <Compile Include="Protocol\Page\SetDeviceOrientationOverrideCommand.cs" /> + <Compile Include="Protocol\Page\SetDeviceOrientationOverrideCommandResponse.cs" /> + <Compile Include="Protocol\Page\SetDocumentContentCommand.cs" /> + <Compile Include="Protocol\Page\SetDocumentContentCommandResponse.cs" /> + <Compile Include="Protocol\Page\SetGeolocationOverrideCommand.cs" /> + <Compile Include="Protocol\Page\SetGeolocationOverrideCommandResponse.cs" /> + <Compile Include="Protocol\Page\SetOverlayMessageCommand.cs" /> + <Compile Include="Protocol\Page\SetOverlayMessageCommandResponse.cs" /> + <Compile Include="Protocol\Page\SetShowViewportSizeOnResizeCommand.cs" /> + <Compile Include="Protocol\Page\SetShowViewportSizeOnResizeCommandResponse.cs" /> + <Compile Include="Protocol\Page\SetTouchEmulationEnabledCommand.cs" /> + <Compile Include="Protocol\Page\SetTouchEmulationEnabledCommandResponse.cs" /> + <Compile Include="Protocol\Page\StartScreencastCommand.cs" /> + <Compile Include="Protocol\Page\StartScreencastCommandResponse.cs" /> + <Compile Include="Protocol\Page\StopScreencastCommand.cs" /> + <Compile Include="Protocol\Page\StopScreencastCommandResponse.cs" /> + <Compile Include="Protocol\Power\CanProfilePowerCommand.cs" /> + <Compile Include="Protocol\Power\CanProfilePowerCommandResponse.cs" /> + <Compile Include="Protocol\Power\DataAvailableEvent.cs" /> + <Compile Include="Protocol\Power\EndCommand.cs" /> + <Compile Include="Protocol\Power\EndCommandResponse.cs" /> + <Compile Include="Protocol\Power\GetAccuracyLevelCommand.cs" /> + <Compile Include="Protocol\Power\GetAccuracyLevelCommandResponse.cs" /> + <Compile Include="Protocol\Power\PowerEvent.cs" /> + <Compile Include="Protocol\Power\StartCommand.cs" /> + <Compile Include="Protocol\Power\StartCommandResponse.cs" /> + <Compile Include="Protocol\Profiler\ConsoleProfileFinishedEvent.cs" /> + <Compile Include="Protocol\Profiler\ConsoleProfileStartedEvent.cs" /> + <Compile Include="Protocol\Profiler\CPUProfile.cs" /> + <Compile Include="Protocol\Profiler\CPUProfileNode.cs" /> + <Compile Include="Protocol\Profiler\DisableCommand.cs" /> + <Compile Include="Protocol\Profiler\DisableCommandResponse.cs" /> + <Compile Include="Protocol\Profiler\EnableCommand.cs" /> + <Compile Include="Protocol\Profiler\EnableCommandResponse.cs" /> + <Compile Include="Protocol\Profiler\PositionTickInfo.cs" /> + <Compile Include="Protocol\Profiler\SetSamplingIntervalCommand.cs" /> + <Compile Include="Protocol\Profiler\SetSamplingIntervalCommandResponse.cs" /> + <Compile Include="Protocol\Profiler\StartCommand.cs" /> + <Compile Include="Protocol\Profiler\StartCommandResponse.cs" /> + <Compile Include="Protocol\Profiler\StopCommand.cs" /> + <Compile Include="Protocol\Profiler\StopCommandResponse.cs" /> + <Compile Include="Protocol\ProtocolName.cs" /> + <Compile Include="Protocol\Rendering\SetContinuousPaintingEnabledCommand.cs" /> + <Compile Include="Protocol\Rendering\SetContinuousPaintingEnabledCommandResponse.cs" /> + <Compile Include="Protocol\Rendering\SetShowDebugBordersCommand.cs" /> + <Compile Include="Protocol\Rendering\SetShowDebugBordersCommandResponse.cs" /> + <Compile Include="Protocol\Rendering\SetShowFPSCounterCommand.cs" /> + <Compile Include="Protocol\Rendering\SetShowFPSCounterCommandResponse.cs" /> + <Compile Include="Protocol\Rendering\SetShowPaintRectsCommand.cs" /> + <Compile Include="Protocol\Rendering\SetShowPaintRectsCommandResponse.cs" /> + <Compile Include="Protocol\Rendering\SetShowScrollBottleneckRectsCommand.cs" /> + <Compile Include="Protocol\Rendering\SetShowScrollBottleneckRectsCommandResponse.cs" /> + <Compile Include="Protocol\Runtime\CallArgument.cs" /> + <Compile Include="Protocol\Runtime\CallFunctionOnCommand.cs" /> + <Compile Include="Protocol\Runtime\CallFunctionOnCommandResponse.cs" /> + <Compile Include="Protocol\Runtime\CustomPreview.cs" /> + <Compile Include="Protocol\Runtime\DisableCommand.cs" /> + <Compile Include="Protocol\Runtime\DisableCommandResponse.cs" /> + <Compile Include="Protocol\Runtime\EnableCommand.cs" /> + <Compile Include="Protocol\Runtime\EnableCommandResponse.cs" /> + <Compile Include="Protocol\Runtime\EntryPreview.cs" /> + <Compile Include="Protocol\Runtime\EvaluateCommand.cs" /> + <Compile Include="Protocol\Runtime\EvaluateCommandResponse.cs" /> + <Compile Include="Protocol\Runtime\EventListener.cs" /> + <Compile Include="Protocol\Runtime\ExecutionContextCreatedEvent.cs" /> + <Compile Include="Protocol\Runtime\ExecutionContextDescription.cs" /> + <Compile Include="Protocol\Runtime\ExecutionContextDestroyedEvent.cs" /> + <Compile Include="Protocol\Runtime\ExecutionContextsClearedEvent.cs" /> + <Compile Include="Protocol\Runtime\GetEventListenersCommand.cs" /> + <Compile Include="Protocol\Runtime\GetEventListenersCommandResponse.cs" /> + <Compile Include="Protocol\Runtime\GetPropertiesCommand.cs" /> + <Compile Include="Protocol\Runtime\GetPropertiesCommandResponse.cs" /> + <Compile Include="Protocol\Runtime\InternalPropertyDescriptor.cs" /> + <Compile Include="Protocol\Runtime\IsRunRequiredCommand.cs" /> + <Compile Include="Protocol\Runtime\IsRunRequiredCommandResponse.cs" /> + <Compile Include="Protocol\Runtime\ObjectPreview.cs" /> + <Compile Include="Protocol\Runtime\PropertyDescriptor.cs" /> + <Compile Include="Protocol\Runtime\PropertyPreview.cs" /> + <Compile Include="Protocol\Runtime\ReleaseObjectCommand.cs" /> + <Compile Include="Protocol\Runtime\ReleaseObjectCommandResponse.cs" /> + <Compile Include="Protocol\Runtime\ReleaseObjectGroupCommand.cs" /> + <Compile Include="Protocol\Runtime\ReleaseObjectGroupCommandResponse.cs" /> + <Compile Include="Protocol\Runtime\RemoteObject.cs" /> + <Compile Include="Protocol\Runtime\RunCommand.cs" /> + <Compile Include="Protocol\Runtime\RunCommandResponse.cs" /> + <Compile Include="Protocol\Runtime\SetCustomObjectFormatterEnabledCommand.cs" /> + <Compile Include="Protocol\Runtime\SetCustomObjectFormatterEnabledCommandResponse.cs" /> + <Compile Include="Protocol\ServiceWorker\DebugOnStartUpdatedEvent.cs" /> + <Compile Include="Protocol\ServiceWorker\DeliverPushMessageCommand.cs" /> + <Compile Include="Protocol\ServiceWorker\DeliverPushMessageCommandResponse.cs" /> + <Compile Include="Protocol\ServiceWorker\DisableCommand.cs" /> + <Compile Include="Protocol\ServiceWorker\DisableCommandResponse.cs" /> + <Compile Include="Protocol\ServiceWorker\DispatchMessageEvent.cs" /> + <Compile Include="Protocol\ServiceWorker\EnableCommand.cs" /> + <Compile Include="Protocol\ServiceWorker\EnableCommandResponse.cs" /> + <Compile Include="Protocol\ServiceWorker\InspectWorkerCommand.cs" /> + <Compile Include="Protocol\ServiceWorker\InspectWorkerCommandResponse.cs" /> + <Compile Include="Protocol\ServiceWorker\SendMessageCommand.cs" /> + <Compile Include="Protocol\ServiceWorker\SendMessageCommandResponse.cs" /> + <Compile Include="Protocol\ServiceWorker\ServiceWorkerErrorMessage.cs" /> + <Compile Include="Protocol\ServiceWorker\ServiceWorkerRegistration.cs" /> + <Compile Include="Protocol\ServiceWorker\ServiceWorkerVersion.cs" /> + <Compile Include="Protocol\ServiceWorker\ServiceWorkerVersionRunningStatus.cs" /> + <Compile Include="Protocol\ServiceWorker\ServiceWorkerVersionStatus.cs" /> + <Compile Include="Protocol\ServiceWorker\SetDebugOnStartCommand.cs" /> + <Compile Include="Protocol\ServiceWorker\SetDebugOnStartCommandResponse.cs" /> + <Compile Include="Protocol\ServiceWorker\StartWorkerCommand.cs" /> + <Compile Include="Protocol\ServiceWorker\StartWorkerCommandResponse.cs" /> + <Compile Include="Protocol\ServiceWorker\StopCommand.cs" /> + <Compile Include="Protocol\ServiceWorker\StopCommandResponse.cs" /> + <Compile Include="Protocol\ServiceWorker\StopWorkerCommand.cs" /> + <Compile Include="Protocol\ServiceWorker\StopWorkerCommandResponse.cs" /> + <Compile Include="Protocol\ServiceWorker\UnregisterCommand.cs" /> + <Compile Include="Protocol\ServiceWorker\UnregisterCommandResponse.cs" /> + <Compile Include="Protocol\ServiceWorker\UpdateRegistrationCommand.cs" /> + <Compile Include="Protocol\ServiceWorker\UpdateRegistrationCommandResponse.cs" /> + <Compile Include="Protocol\ServiceWorker\WorkerCreatedEvent.cs" /> + <Compile Include="Protocol\ServiceWorker\WorkerErrorReportedEvent.cs" /> + <Compile Include="Protocol\ServiceWorker\WorkerRegistrationUpdatedEvent.cs" /> + <Compile Include="Protocol\ServiceWorker\WorkerTerminatedEvent.cs" /> + <Compile Include="Protocol\ServiceWorker\WorkerVersionUpdatedEvent.cs" /> + <Compile Include="Protocol\Timeline\DisableCommand.cs" /> + <Compile Include="Protocol\Timeline\DisableCommandResponse.cs" /> + <Compile Include="Protocol\Timeline\EnableCommand.cs" /> + <Compile Include="Protocol\Timeline\EnableCommandResponse.cs" /> + <Compile Include="Protocol\Timeline\EventRecordedEvent.cs" /> + <Compile Include="Protocol\Timeline\StartCommand.cs" /> + <Compile Include="Protocol\Timeline\StartCommandResponse.cs" /> + <Compile Include="Protocol\Timeline\StopCommand.cs" /> + <Compile Include="Protocol\Timeline\StopCommandResponse.cs" /> + <Compile Include="Protocol\Timeline\TimelineEvent.cs" /> + <Compile Include="Protocol\Tracing\BufferUsageEvent.cs" /> + <Compile Include="Protocol\Tracing\DataCollectedEvent.cs" /> + <Compile Include="Protocol\Tracing\EndCommand.cs" /> + <Compile Include="Protocol\Tracing\EndCommandResponse.cs" /> + <Compile Include="Protocol\Tracing\GetCategoriesCommand.cs" /> + <Compile Include="Protocol\Tracing\GetCategoriesCommandResponse.cs" /> + <Compile Include="Protocol\Tracing\StartCommand.cs" /> + <Compile Include="Protocol\Tracing\StartCommandResponse.cs" /> + <Compile Include="Protocol\Tracing\TracingCompleteEvent.cs" /> + <Compile Include="Protocol\Worker\ConnectToWorkerCommand.cs" /> + <Compile Include="Protocol\Worker\ConnectToWorkerCommandResponse.cs" /> + <Compile Include="Protocol\Worker\DisableCommand.cs" /> + <Compile Include="Protocol\Worker\DisableCommandResponse.cs" /> + <Compile Include="Protocol\Worker\DisconnectFromWorkerCommand.cs" /> + <Compile Include="Protocol\Worker\DisconnectFromWorkerCommandResponse.cs" /> + <Compile Include="Protocol\Worker\DispatchMessageFromWorkerEvent.cs" /> + <Compile Include="Protocol\Worker\EnableCommand.cs" /> + <Compile Include="Protocol\Worker\EnableCommandResponse.cs" /> + <Compile Include="Protocol\Worker\SendMessageToWorkerCommand.cs" /> + <Compile Include="Protocol\Worker\SendMessageToWorkerCommandResponse.cs" /> + <Compile Include="Protocol\Worker\SetAutoconnectToWorkersCommand.cs" /> + <Compile Include="Protocol\Worker\SetAutoconnectToWorkersCommandResponse.cs" /> + <Compile Include="Protocol\Worker\WorkerCreatedEvent.cs" /> + <Compile Include="Protocol\Worker\WorkerTerminatedEvent.cs" /> + <Compile Include="Serialization\MessageContractResolver.cs" /> + </ItemGroup> + <ItemGroup> + <None Include="packages.config" /> + </ItemGroup> + <ItemGroup> + <Service Include="{508349B6-6B84-4DF5-91F0-309BEEBAD82D}" /> + </ItemGroup> + <ItemGroup /> + <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> + <!-- To modify your build process, add your task inside one of the targets below and uncomment it. + Other similar extension points exist, see Microsoft.Common.targets. + <Target Name="BeforeBuild"> + </Target> + <Target Name="AfterBuild"> + </Target> + --> +</Project> \ No newline at end of file diff --git a/ChromeDevTools/ChromeProcess.cs b/ChromeDevTools/ChromeProcess.cs new file mode 100644 index 0000000000000000000000000000000000000000..bb3ba8c04a09c28979321b863309dd2792583d1e --- /dev/null +++ b/ChromeDevTools/ChromeProcess.cs @@ -0,0 +1,59 @@ +using Newtonsoft.Json; +using Newtonsoft.Json.Linq; +using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.IO; +using System.Linq; +using System.Net; +using System.Text; +using System.Threading; +using System.Threading.Tasks; + +namespace ChromeDevTools +{ + public class ChromeProcess : IChromeProcess + { + public DirectoryInfo UserDirectory { get; set; } + public Process Process { get; set; } + public string RemoteDebuggingUri { get; set; } + + + public void Dispose() + { + Process.Kill(); + try + { + UserDirectory.Delete(true); + } + catch + { + Thread.Sleep(500); // i'm being lazy because i'm tired + UserDirectory.Delete(true); + } + } + + public async Task<string[]> GetSessions() + { + var remoteSessionUrls = new List<string>(); + var webClient = new WebClient(); + var uriBuilder = new UriBuilder(RemoteDebuggingUri); + uriBuilder.Path = "/json"; + var remoteSessions = await webClient.DownloadStringTaskAsync(uriBuilder.Uri); + using(var stringReader = new StringReader(remoteSessions)) + using(var jsonReader = new JsonTextReader(stringReader)) + { + var sessionsObject = JToken.ReadFrom(jsonReader) as JArray; + foreach(var sessionObject in sessionsObject) + { + var sessionUrl = sessionObject["webSocketDebuggerUrl"].GetSafeString(); + if(!String.IsNullOrEmpty(sessionUrl)) + { + remoteSessionUrls.Add(sessionUrl); + } + } + } + return remoteSessionUrls.ToArray(); + } + } +} diff --git a/ChromeDevTools/ChromeProcessFactory.cs b/ChromeDevTools/ChromeProcessFactory.cs new file mode 100644 index 0000000000000000000000000000000000000000..87f3cd54a4535baa20411c505f5ac9690e86f217 --- /dev/null +++ b/ChromeDevTools/ChromeProcessFactory.cs @@ -0,0 +1,30 @@ +using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace ChromeDevTools +{ + public class ChromeProcessFactory : IChromeProcessFactory + { + public IChromeProcess Create(int port) + { + string path = Path.GetRandomFileName(); + var directoryInfo = Directory.CreateDirectory(Path.Combine(Path.GetTempPath(), path)); + var remoteDebuggingArg = "--remote-debugging-port=" + port; + var userDirectoryArg = "--user-data-dir=\"" + directoryInfo.FullName + "\""; + var chromeProcessArgs = remoteDebuggingArg + " " + userDirectoryArg + " --bwsi --no-first-run"; + var processStartInfo = new ProcessStartInfo(@"C:\Program Files (x86)\Google\Chrome\Application\chrome.exe", chromeProcessArgs); + var chromeProcess = Process.Start(processStartInfo); + return new ChromeProcess + { + Process = chromeProcess, + UserDirectory = directoryInfo, + RemoteDebuggingUri = "http://localhost:" + port + }; + } + } +} diff --git a/ChromeDevTools/ChromeSession.cs b/ChromeDevTools/ChromeSession.cs new file mode 100644 index 0000000000000000000000000000000000000000..e2996f7299758a0a5222ac489db163131b82de47 --- /dev/null +++ b/ChromeDevTools/ChromeSession.cs @@ -0,0 +1,229 @@ +using ChromeDevTools.Serialization; +using Newtonsoft.Json; +using System; +using System.Collections.Concurrent; +using System.Linq; +using System.Threading; +using System.Threading.Tasks; +using WebSocket4Net; + +namespace ChromeDevTools +{ + public class ChromeSession : IChromeSession + { + private readonly string _endpoint; + private readonly ConcurrentDictionary<string, ConcurrentBag<EventHandler>> _handlers = new ConcurrentDictionary<string, ConcurrentBag<EventHandler>>(); + private ICommandFactory _commandFactory; + private IEventFactory _eventFactory; + private ManualResetEvent _openEvent = new ManualResetEvent(false); + private ManualResetEvent _publishEvent = new ManualResetEvent(false); + private ConcurrentDictionary<long, ManualResetEvent> _requestWaitHandles = new ConcurrentDictionary<long, ManualResetEvent>(); + private ICommandResponseFactory _responseFactory; + private ConcurrentDictionary<long, ICommandResponse> _responses = new ConcurrentDictionary<long, ICommandResponse>(); + private WebSocket _webSocket; + private static object _Lock = new object(); + + public ChromeSession(string endpoint, ICommandFactory commandFactory, ICommandResponseFactory responseFactory, IEventFactory eventFactory) + { + _endpoint = endpoint; + _commandFactory = commandFactory; + _responseFactory = responseFactory; + _eventFactory = eventFactory; + } + + public void Dispose() + { + if (null == _webSocket) return; + if (_webSocket.State == WebSocketState.Open) + { + _webSocket.Close(); + } + _webSocket.Dispose(); + } + + private void EnsureInit() + { + if(null == _webSocket) + { + lock(_Lock) + { + if(null == _webSocket) + { + Init().Wait(); + } + } + } + } + + private Task Init() + { + _openEvent.Reset(); + + _webSocket = new WebSocket(_endpoint); + _webSocket.Opened += WebSocket_Opened; + _webSocket.MessageReceived += WebSocket_MessageReceived; + _webSocket.Error += WebSocket_Error; + _webSocket.Closed += WebSocket_Closed; + _webSocket.DataReceived += WebSocket_DataReceived; + + _webSocket.Open(); + return Task.Run(() => + { + _openEvent.WaitOne(); + }); + } + + + public Task<ICommandResponse> SendAsync<T>() + { + var command = _commandFactory.Create<T>(); + return SendCommand(command); + } + + public Task<ICommandResponse> SendAsync<T>(T parameter) + { + var command = _commandFactory.Create(parameter); + return SendCommand(command); + } + + public void Subscribe<T>(EventHandler handler) + { + var handlerType = typeof(T); + _handlers.AddOrUpdate(handlerType.FullName, + (m) => new ConcurrentBag<EventHandler>(new[] { handler }), + (m, currentBag) => + { + currentBag.Add(handler); + return currentBag; + }); + } + + private void HandleEvent(IEvent evnt) + { + if (null == evnt + || null == evnt) + { + return; + } + var type = evnt.GetType().GetGenericArguments().FirstOrDefault(); + if (null == type) + { + return; + } + var handlerKey = type.FullName; + ConcurrentBag<EventHandler> handlers = null; + if (_handlers.TryGetValue(handlerKey, out handlers)) + { + var localHandlers = handlers.ToArray(); + foreach (var handler in localHandlers) + { + handler(this, evnt); + } + } + } + + private void HandleResponse(ICommandResponse response) + { + if (null == response) return; + ManualResetEvent requestMre; + if (_requestWaitHandles.TryGetValue(response.Id, out requestMre)) + { + _responses.AddOrUpdate(response.Id, id => response, (key, value) => response); + requestMre.Set(); + } + } + + private Task<ICommandResponse> SendCommand(Command command) + { + var settings = new JsonSerializerSettings + { + ContractResolver = new MessageContractResolver(), + NullValueHandling = NullValueHandling.Ignore, + }; + var requestString = JsonConvert.SerializeObject(command, settings); + var requestResetEvent = new ManualResetEvent(false); + _requestWaitHandles.AddOrUpdate(command.Id, requestResetEvent, (id, r) => requestResetEvent); + return Task.Run(() => + { + EnsureInit(); + _webSocket.Send(requestString); + requestResetEvent.WaitOne(); + ICommandResponse response = null; + _responses.TryRemove(command.Id, out response); + _requestWaitHandles.TryRemove(command.Id, out requestResetEvent); + return response; + }); + } + private bool TryGetCommandResponse(byte[] data, out ICommandResponse response) + { + response = _responseFactory.Create(data); + return null != response; + } + + private bool TryGetCommandResponse(string message, out ICommandResponse response) + { + response = _responseFactory.Create(message); + return null != response; + } + + private bool TryGetEvent(byte[] data, out IEvent evnt) + { + evnt = _eventFactory.Create(data); + return null != evnt; + } + + private bool TryGetEvent(string message, out IEvent evnt) + { + evnt = _eventFactory.Create(message); + return null != evnt; + } + + private void WebSocket_Closed(object sender, EventArgs e) + { + } + + private void WebSocket_DataReceived(object sender, DataReceivedEventArgs e) + { + ICommandResponse response; + if (TryGetCommandResponse(e.Data, out response)) + { + HandleResponse(response); + return; + } + IEvent evnt; + if (TryGetEvent(e.Data, out evnt)) + { + HandleEvent(evnt); + return; + } + throw new Exception("Don't know what to do with response: " + e.Data); + } + + private void WebSocket_Error(object sender, SuperSocket.ClientEngine.ErrorEventArgs e) + { + throw e.Exception; + } + + private void WebSocket_MessageReceived(object sender, MessageReceivedEventArgs e) + { + ICommandResponse response; + if (TryGetCommandResponse(e.Message, out response)) + { + HandleResponse(response); + return; + } + IEvent evnt; + if (TryGetEvent(e.Message, out evnt)) + { + HandleEvent(evnt); + return; + } + throw new Exception("Don't know what to do with response: " + e.Message); + } + + private void WebSocket_Opened(object sender, EventArgs e) + { + _openEvent.Set(); + } + } +} \ No newline at end of file diff --git a/ChromeDevTools/ChromeSessionFactory.cs b/ChromeDevTools/ChromeSessionFactory.cs new file mode 100644 index 0000000000000000000000000000000000000000..6f6e5d8281b0739d75675358b881335f26f2851b --- /dev/null +++ b/ChromeDevTools/ChromeSessionFactory.cs @@ -0,0 +1,23 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace ChromeDevTools +{ + public class ChromeSessionFactory : IChromeSessionFactory + { + public IChromeSession Create(string endpointUrl) + { + // Sometimes binding to localhost might resolve wrong AddressFamily, force IPv4 + endpointUrl = endpointUrl.Replace("ws://localhost", "ws://127.0.0.1"); + var methodTypeMap = new MethodTypeMap(); + var commandFactory = new CommandFactory(); + var responseFactory = new CommandResponseFactory(methodTypeMap, commandFactory); + var eventFactory = new EventFactory(methodTypeMap); + var session = new ChromeSession(endpointUrl, commandFactory, responseFactory, eventFactory); + return session; + } + } +} diff --git a/ChromeDevTools/Command.cs b/ChromeDevTools/Command.cs new file mode 100644 index 0000000000000000000000000000000000000000..38b7106c109acb47b4a1d1c0f90c8114bb922381 --- /dev/null +++ b/ChromeDevTools/Command.cs @@ -0,0 +1,38 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace ChromeDevTools +{ + public interface ICommand + { + long Id { get; } + + string Method { get; } + } + public class Command : ICommand + { + public long Id + { + get; + set; + } + + public string Method + { + get; + set; + } + } + + public class Command<T> : Command + { + public T Params + { + get; + set; + } + } +} diff --git a/ChromeDevTools/CommandAttribute.cs b/ChromeDevTools/CommandAttribute.cs new file mode 100644 index 0000000000000000000000000000000000000000..a6afe4353aa37dabbd4dbe8e4cfe95f639dc2f0e --- /dev/null +++ b/ChromeDevTools/CommandAttribute.cs @@ -0,0 +1,19 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace ChromeDevTools +{ + [AttributeUsage(AttributeTargets.Class, Inherited = false)] + public class CommandAttribute : Attribute, IMethodNameAttribute + { + public CommandAttribute(string methodName) + { + this.MethodName = methodName; + } + + public string MethodName { get; private set; } + } +} diff --git a/ChromeDevTools/CommandFactory.cs b/ChromeDevTools/CommandFactory.cs new file mode 100644 index 0000000000000000000000000000000000000000..eb1a94b97b8d7b16f97907e62f42b0cf1b2b828a --- /dev/null +++ b/ChromeDevTools/CommandFactory.cs @@ -0,0 +1,48 @@ +using System; +using System.Collections.Concurrent; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading; +using System.Threading.Tasks; + +namespace ChromeDevTools +{ + public class CommandFactory : ICommandFactory + { + private readonly ConcurrentDictionary<long, string> _methods = new ConcurrentDictionary<long, string>(); + private long _count = 0; + + public Command Create<T>() + { + var commandId = Interlocked.Increment(ref _count); + var command = new Command<T> + { + Id = commandId + }; + command.Method = command.GetMethod(); + _methods.AddOrUpdate(commandId, command.Method, (key, value) => command.Method); + return command; + } + + public Command<T> Create<T>(T parameter) + { + var commandId = Interlocked.Increment(ref _count); + var command = new Command<T> + { + Id = commandId, + Method = parameter.GetMethod(), + Params = parameter + }; + _methods.AddOrUpdate(commandId, command.Method, (key, value) => command.Method); + return command; + } + + public string GetMethod(long id) + { + string result; + _methods.TryGetValue(id, out result); + return result; + } + } +} diff --git a/ChromeDevTools/CommandResponse.cs b/ChromeDevTools/CommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..91698dc99d71fe35ed4dcf216a8cda249ec561cb --- /dev/null +++ b/ChromeDevTools/CommandResponse.cs @@ -0,0 +1,38 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace ChromeDevTools +{ + public interface ICommandResponse + { + long Id { get; } + + string Method { get; } + } + public class CommandResponse : ICommandResponse + { + public long Id + { + get; + set; + } + + public string Method + { + get; + set; + } + } + + public class CommandResponse<T> : CommandResponse + { + public T Result + { + get; + private set; + } + } +} diff --git a/ChromeDevTools/CommandResponseAttribute.cs b/ChromeDevTools/CommandResponseAttribute.cs new file mode 100644 index 0000000000000000000000000000000000000000..3e4f9de158d46fe6df2eef7e44e58a8a9cbc8080 --- /dev/null +++ b/ChromeDevTools/CommandResponseAttribute.cs @@ -0,0 +1,19 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace ChromeDevTools +{ + [AttributeUsage(AttributeTargets.Class, Inherited = false)] + public class CommandResponseAttribute : Attribute, IMethodNameAttribute + { + public CommandResponseAttribute(string methodName) + { + this.MethodName = methodName; + } + + public string MethodName { get; private set; } + } +} diff --git a/ChromeDevTools/CommandResponseFactory.cs b/ChromeDevTools/CommandResponseFactory.cs new file mode 100644 index 0000000000000000000000000000000000000000..845de4a5aaf8f9a75db5539e4570501d84894275 --- /dev/null +++ b/ChromeDevTools/CommandResponseFactory.cs @@ -0,0 +1,65 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Reflection; +using System.Text; +using System.Threading.Tasks; +using Newtonsoft.Json.Linq; + +namespace ChromeDevTools +{ + public class CommandResponseFactory : ICommandResponseFactory + { + private readonly IMethodTypeMap _methodTypeMap; + private readonly ICommandFactory _commandFactory; + + public CommandResponseFactory(IMethodTypeMap methodTypeMap, ICommandFactory commandFactory) + { + _methodTypeMap = methodTypeMap; + _commandFactory = commandFactory; + } + + public ICommandResponse Create(byte[] responseBytes) + { + throw new NotImplementedException(); + } + + public ICommandResponse Create(string responseText) + { + var jObject = JObject.Parse(responseText); + if (null != jObject["error"]) + { + return jObject.ToObject<ErrorResponse>(); + } + var methodString = GetMethod(jObject); + if(null == methodString) + { + return null; + } + var typeInferredFromMethod = _methodTypeMap.GetCommandResponse(methodString); + if(null == typeInferredFromMethod) + { + return null; + } + var genericEventType = typeof(CommandResponse<>); + var commandResponseType = genericEventType.MakeGenericType(typeInferredFromMethod); + var result = jObject.ToObject(commandResponseType); + return result as ICommandResponse; + } + + private string GetMethod(JObject jObject) + { + var methodString = jObject["method"].GetSafeString(); + if (null == methodString) + { + var commandIdString = jObject["id"].GetSafeString(); + long commandId; + if (long.TryParse(commandIdString, out commandId)) + { + methodString = _commandFactory.GetMethod(commandId); + } + } + return methodString; + } + } +} diff --git a/AutoWebPerf/Chrome/Messages/ResponseHandler.cs b/ChromeDevTools/CommandResponseHandler.cs similarity index 53% rename from AutoWebPerf/Chrome/Messages/ResponseHandler.cs rename to ChromeDevTools/CommandResponseHandler.cs index 5142c08aeeec19f0485519c6a61e697b8d184a48..85d676c527db94d0bff0a8b4244eea240ef56529 100644 --- a/AutoWebPerf/Chrome/Messages/ResponseHandler.cs +++ b/ChromeDevTools/CommandResponseHandler.cs @@ -4,7 +4,7 @@ using System.Linq; using System.Text; using System.Threading.Tasks; -namespace AutoWebPerf.Chrome.Messages +namespace ChromeDevTools { - delegate void ResponseHandler(object sender, IResponse response); + public delegate void EventHandler(object sender, IEvent response); } diff --git a/ChromeDevTools/ErrorResponse.cs b/ChromeDevTools/ErrorResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..29758d4f1e7aa0dc8369474887d4691d0501158f --- /dev/null +++ b/ChromeDevTools/ErrorResponse.cs @@ -0,0 +1,38 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace ChromeDevTools +{ + public interface IErrorResponse + { + Error Error { get; } + long Id { get; } + } + public class Error + { + public int Code { get; set; } + public string Message { get; set; } + } + public class ErrorResponse : IErrorResponse, ICommandResponse + { + public Error Error + { + get; + set; + } + + public long Id + { + get; + set; + } + + public string Method + { + get { throw new NotSupportedException(); } + } + } +} diff --git a/ChromeDevTools/Event.cs b/ChromeDevTools/Event.cs new file mode 100644 index 0000000000000000000000000000000000000000..2f8a1bc06b5d166575f1e39ff76681308c01399b --- /dev/null +++ b/ChromeDevTools/Event.cs @@ -0,0 +1,22 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace ChromeDevTools +{ + public interface IEvent + { + string Method { get; set; } + } + public class Event : IEvent + { + public string Method { get; set; } + } + public class Event<T> : Event + { + public T Params { get; set; } + } + +} diff --git a/ChromeDevTools/EventAttribute.cs b/ChromeDevTools/EventAttribute.cs new file mode 100644 index 0000000000000000000000000000000000000000..2995f8b49fb304420fc3fec130b300f0629662cd --- /dev/null +++ b/ChromeDevTools/EventAttribute.cs @@ -0,0 +1,19 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace ChromeDevTools +{ + [AttributeUsage(AttributeTargets.Class, Inherited = false)] + public class EventAttribute : Attribute, IMethodNameAttribute + { + public EventAttribute(string methodName) + { + this.MethodName = methodName; + } + + public string MethodName { get; private set; } + } +} diff --git a/ChromeDevTools/EventFactory.cs b/ChromeDevTools/EventFactory.cs new file mode 100644 index 0000000000000000000000000000000000000000..ac032f1ff013337610c2872fd7d07c04d28ae9b3 --- /dev/null +++ b/ChromeDevTools/EventFactory.cs @@ -0,0 +1,43 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Newtonsoft.Json.Linq; + +namespace ChromeDevTools +{ + public class EventFactory : IEventFactory + { + private readonly IMethodTypeMap _methodTypeMap; + + public EventFactory(IMethodTypeMap methodTypeMap) + { + _methodTypeMap = methodTypeMap; + } + + public IEvent Create(byte[] responseBytes) + { + throw new NotImplementedException(); + } + + public IEvent Create(string responseText) + { + var jObject = JObject.Parse(responseText); + var methodString = jObject["method"].GetSafeString(); + if (null == methodString) + { + return null; + } + var typeInferredFromMethod = _methodTypeMap.GetEvent(methodString); + if (null == typeInferredFromMethod) + { + return null; + } + var genericEventType = typeof(Event<>); + var commandResponseType = genericEventType.MakeGenericType(typeInferredFromMethod); + var result = jObject.ToObject(commandResponseType); + return result as IEvent; + } + } +} diff --git a/ChromeDevTools/Extensions/JTokenExtensions.cs b/ChromeDevTools/Extensions/JTokenExtensions.cs new file mode 100644 index 0000000000000000000000000000000000000000..41e2d37413b614de3daaa0b27b037c956ff507a3 --- /dev/null +++ b/ChromeDevTools/Extensions/JTokenExtensions.cs @@ -0,0 +1,17 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Newtonsoft.Json.Linq +{ + public static class JTokenExtensions + { + public static string GetSafeString(this JToken jtoken) + { + if (null == jtoken) return null; + return jtoken.ToString(); + } + } +} diff --git a/ChromeDevTools/Extensions/ObjectExtensions.cs b/ChromeDevTools/Extensions/ObjectExtensions.cs new file mode 100644 index 0000000000000000000000000000000000000000..595266ece5f4a389d7172465eaee74a50069dd71 --- /dev/null +++ b/ChromeDevTools/Extensions/ObjectExtensions.cs @@ -0,0 +1,41 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace ChromeDevTools +{ + public static class ObjectExtensions + { + public static string GetMethod(this object obj) + { + if (null == obj) return null; + return GetMethod(obj.GetType()); + } + + public static string GetMethod(this Type type) + { + if (null == type) return null; + var eventAttribute = type.GetCustomAttributes(typeof(EventAttribute), true) + .FirstOrDefault() as EventAttribute; + if (null != eventAttribute) return eventAttribute.MethodName; + var commandAttribute = type.GetCustomAttributes(typeof(CommandAttribute), true) + .FirstOrDefault() as CommandAttribute; + if (null != commandAttribute) return commandAttribute.MethodName; + var commandResponseAttribute = type.GetCustomAttributes(typeof(CommandResponseAttribute), true) + .FirstOrDefault() as CommandResponseAttribute; + if (null != commandResponseAttribute) return commandResponseAttribute.MethodName; + + // maybe it's generic parameter has a method + if(type.IsGenericType) + { + return type.GenericTypeArguments + .FirstOrDefault() + .GetMethod(); + } + + throw new Exception("Could not determine the method type for " + type); + } + } +} diff --git a/ChromeDevTools/IChromeProcess.cs b/ChromeDevTools/IChromeProcess.cs new file mode 100644 index 0000000000000000000000000000000000000000..2d9b3c2ab1c622f4ab34a78d3475866e5f063863 --- /dev/null +++ b/ChromeDevTools/IChromeProcess.cs @@ -0,0 +1,19 @@ +using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace ChromeDevTools +{ + public interface IChromeProcess : IDisposable + { + Task<string[]> GetSessions(); + + DirectoryInfo UserDirectory { get; } + Process Process { get; } + string RemoteDebuggingUri { get; } + } +} diff --git a/AutoWebPerf/Chrome/Messages/Page/NavigateRequestParams.cs b/ChromeDevTools/IChromeProcessFactory.cs similarity index 54% rename from AutoWebPerf/Chrome/Messages/Page/NavigateRequestParams.cs rename to ChromeDevTools/IChromeProcessFactory.cs index 2227e0fbea1c1d6df71a0ab6a17341bbcf37df51..9f57d16e4345d5439b0aedf269c914ed693b4e58 100644 --- a/AutoWebPerf/Chrome/Messages/Page/NavigateRequestParams.cs +++ b/ChromeDevTools/IChromeProcessFactory.cs @@ -4,10 +4,10 @@ using System.Linq; using System.Text; using System.Threading.Tasks; -namespace AutoWebPerf.Chrome.Messages.Page +namespace ChromeDevTools { - class NavigateRequestParams + public interface IChromeProcessFactory { - public string Url { get; set; } + IChromeProcess Create(int port); } } diff --git a/ChromeDevTools/IChromeSession.cs b/ChromeDevTools/IChromeSession.cs new file mode 100644 index 0000000000000000000000000000000000000000..4283d246f24afd8cb66e532c87bb913d2b1089c9 --- /dev/null +++ b/ChromeDevTools/IChromeSession.cs @@ -0,0 +1,17 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace ChromeDevTools +{ + public interface IChromeSession + { + Task<ICommandResponse> SendAsync<T>(T parameter); + + Task<ICommandResponse> SendAsync<T>(); + + void Subscribe<T>(EventHandler handler); + } +} diff --git a/AutoWebPerf/Chrome/Messages/Page/NavigateResponseResult.cs b/ChromeDevTools/IChromeSessionFactory.cs similarity index 53% rename from AutoWebPerf/Chrome/Messages/Page/NavigateResponseResult.cs rename to ChromeDevTools/IChromeSessionFactory.cs index b0133b39305ca939d5043ef53fdfd7660be89470..6bc5a83e78a1c62b0bebe2abd8f07fece6cd664f 100644 --- a/AutoWebPerf/Chrome/Messages/Page/NavigateResponseResult.cs +++ b/ChromeDevTools/IChromeSessionFactory.cs @@ -4,10 +4,10 @@ using System.Linq; using System.Text; using System.Threading.Tasks; -namespace AutoWebPerf.Chrome.Messages.Page +namespace ChromeDevTools { - class NavigateResponseResult + public interface IChromeSessionFactory { - public string FrameId { get; set; } + IChromeSession Create(string endpointUrl); } } diff --git a/ChromeDevTools/ICommandFactory.cs b/ChromeDevTools/ICommandFactory.cs new file mode 100644 index 0000000000000000000000000000000000000000..3fa78aed005b72560209405dab4b15e5f85d026b --- /dev/null +++ b/ChromeDevTools/ICommandFactory.cs @@ -0,0 +1,17 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace ChromeDevTools +{ + public interface ICommandFactory + { + string GetMethod(long id); + + Command Create<T>(); + + Command<T> Create<T>(T parameter); + } +} diff --git a/ChromeDevTools/ICommandResponseFactory.cs b/ChromeDevTools/ICommandResponseFactory.cs new file mode 100644 index 0000000000000000000000000000000000000000..9cc7833c0d5f6cedfef23bb4e061c26c9b9ee7ef --- /dev/null +++ b/ChromeDevTools/ICommandResponseFactory.cs @@ -0,0 +1,15 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace ChromeDevTools +{ + public interface ICommandResponseFactory + { + ICommandResponse Create(byte[] responseBytes); + + ICommandResponse Create(string responseText); + } +} diff --git a/ChromeDevTools/IEventFactory.cs b/ChromeDevTools/IEventFactory.cs new file mode 100644 index 0000000000000000000000000000000000000000..116d4e8628dcc7e586b847a9264acc46bfbd57e3 --- /dev/null +++ b/ChromeDevTools/IEventFactory.cs @@ -0,0 +1,15 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace ChromeDevTools +{ + public interface IEventFactory + { + IEvent Create(byte[] responseBytes); + + IEvent Create(string responseText); + } +} diff --git a/ChromeDevTools/IMethodNameAttribute.cs b/ChromeDevTools/IMethodNameAttribute.cs new file mode 100644 index 0000000000000000000000000000000000000000..980873bb797686316427c18a8e14ff35ba8cbcdb --- /dev/null +++ b/ChromeDevTools/IMethodNameAttribute.cs @@ -0,0 +1,13 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace ChromeDevTools +{ + public interface IMethodNameAttribute + { + string MethodName { get; } + } +} diff --git a/ChromeDevTools/IMethodTypeMap.cs b/ChromeDevTools/IMethodTypeMap.cs new file mode 100644 index 0000000000000000000000000000000000000000..3f00477e51e5a90b12804200ba45be66d9ba357e --- /dev/null +++ b/ChromeDevTools/IMethodTypeMap.cs @@ -0,0 +1,17 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace ChromeDevTools +{ + public interface IMethodTypeMap + { + Type GetCommand(string method); + + Type GetCommandResponse(string method); + + Type GetEvent(string method); + } +} diff --git a/ChromeDevTools/MethodTypeMap.cs b/ChromeDevTools/MethodTypeMap.cs new file mode 100644 index 0000000000000000000000000000000000000000..1faf2140106ae38cd65104edc542c18dadbbdbfe --- /dev/null +++ b/ChromeDevTools/MethodTypeMap.cs @@ -0,0 +1,79 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Reflection; +using System.Text; +using System.Threading.Tasks; + +namespace ChromeDevTools +{ + public class MethodTypeMap : IMethodTypeMap + { + private readonly Dictionary<string, Type> _commandTypes = new Dictionary<string, Type>(); + private readonly Dictionary<string, Type> _commandResponseTypes = new Dictionary<string, Type>(); + private readonly Dictionary<string, Type> _eventTypes = new Dictionary<string, Type>(); + + public MethodTypeMap() + { + LoadMethodTypeMap(); + } + private void LoadMethodTypeMap() + { + var assembly = Assembly.GetExecutingAssembly(); + var assemblyTypes = assembly.GetTypes(); + foreach(var type in assemblyTypes) + { + if(!type.IsClass) continue; + if(type.Name.EndsWith("CommandResponse")) + { + var methodName = GetMethodName<CommandResponseAttribute>(type); + if (null == methodName) continue; + _commandResponseTypes[methodName] = type; + } + if (type.Name.EndsWith("Command")) + { + var methodName = GetMethodName<CommandAttribute>(type); + if (null == methodName) continue; + _commandTypes[methodName] = type; + } + if (type.Name.EndsWith("Event")) + { + var methodName = GetMethodName<EventAttribute>(type); + if (null == methodName) continue; + _eventTypes[methodName] = type; + } + } + } + + private string GetMethodName<T>(Type type) where T : IMethodNameAttribute + { + var attribute = type.GetCustomAttributes(typeof(T)) + .FirstOrDefault(); + if (null == attribute) return null; + var methodNameAttribute = attribute as IMethodNameAttribute; + if (null == methodNameAttribute) return null; + return methodNameAttribute.MethodName; + } + + public Type GetCommand(string method) + { + Type type; + _commandTypes.TryGetValue(method, out type); + return type; + } + + public Type GetCommandResponse(string method) + { + Type type; + _commandResponseTypes.TryGetValue(method, out type); + return type; + } + + public Type GetEvent(string method) + { + Type type; + _eventTypes.TryGetValue(method, out type); + return type; + } + } +} diff --git a/ChromeDevTools/Properties/AssemblyInfo.cs b/ChromeDevTools/Properties/AssemblyInfo.cs new file mode 100644 index 0000000000000000000000000000000000000000..476a89bb30c2636ee3991cefc1bed285ebdbdee7 --- /dev/null +++ b/ChromeDevTools/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("ChromeDevTools")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("ChromeDevTools")] +[assembly: AssemblyCopyright("Copyright © 2015")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("e7da0b93-c53b-4b4e-a873-88490c1e61cc")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/ChromeDevTools/Protocol/Accessibility/AXGlobalStates.cs b/ChromeDevTools/Protocol/Accessibility/AXGlobalStates.cs new file mode 100644 index 0000000000000000000000000000000000000000..07b3428ca8fe4feaf360b520de8af5085e7d9c4c --- /dev/null +++ b/ChromeDevTools/Protocol/Accessibility/AXGlobalStates.cs @@ -0,0 +1,14 @@ +using ChromeDevTools; + +namespace ChromeDevTools.Protocol.Accessibility{ + /// <summary> + /// States which apply to every AX node. + /// </summary> + public enum AXGlobalStates + { + Disabled, + Hidden, + HiddenRoot, + Invalid, + } +} diff --git a/ChromeDevTools/Protocol/Accessibility/AXLiveRegionAttributes.cs b/ChromeDevTools/Protocol/Accessibility/AXLiveRegionAttributes.cs new file mode 100644 index 0000000000000000000000000000000000000000..dfd779a261e1c10f6c3d081fe227611ddb994509 --- /dev/null +++ b/ChromeDevTools/Protocol/Accessibility/AXLiveRegionAttributes.cs @@ -0,0 +1,15 @@ +using ChromeDevTools; + +namespace ChromeDevTools.Protocol.Accessibility{ + /// <summary> + /// Attributes which apply to nodes in live regions. + /// </summary> + public enum AXLiveRegionAttributes + { + Live, + Atomic, + Relevant, + Busy, + Root, + } +} diff --git a/ChromeDevTools/Protocol/Accessibility/AXNode.cs b/ChromeDevTools/Protocol/Accessibility/AXNode.cs new file mode 100644 index 0000000000000000000000000000000000000000..77e7aba409db49019f330cbc88ae2d02e32d9229 --- /dev/null +++ b/ChromeDevTools/Protocol/Accessibility/AXNode.cs @@ -0,0 +1,40 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Accessibility +{ + /// <summary> + /// A node in the accessibility tree. + /// </summary> + public class AXNode + { + /// <summary> + /// Gets or sets Unique identifier for this node. + /// </summary> + public string NodeId { get; set; } + /// <summary> + /// Gets or sets This <code>Node</code>'s role, whether explicit or implicit. + /// </summary> + public AXValue Role { get; set; } + /// <summary> + /// Gets or sets The accessible name for this <code>Node</code>. + /// </summary> + public AXValue Name { get; set; } + /// <summary> + /// Gets or sets The accessible description for this <code>Node</code>. + /// </summary> + public AXValue Description { get; set; } + /// <summary> + /// Gets or sets The value for this <code>Node</code>. + /// </summary> + public AXValue Value { get; set; } + /// <summary> + /// Gets or sets Help. + /// </summary> + public AXValue Help { get; set; } + /// <summary> + /// Gets or sets All other properties + /// </summary> + public AXProperty[] Properties { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/Accessibility/AXProperty.cs b/ChromeDevTools/Protocol/Accessibility/AXProperty.cs new file mode 100644 index 0000000000000000000000000000000000000000..834cc73f3482ace27822b958b7149ea2ed1a67f1 --- /dev/null +++ b/ChromeDevTools/Protocol/Accessibility/AXProperty.cs @@ -0,0 +1,20 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Accessibility +{ + /// <summary> + /// + /// </summary> + public class AXProperty + { + /// <summary> + /// Gets or sets The name of this property. + /// </summary> + public string Name { get; set; } + /// <summary> + /// Gets or sets The value of this property. + /// </summary> + public AXValue Value { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/Accessibility/AXPropertySource.cs b/ChromeDevTools/Protocol/Accessibility/AXPropertySource.cs new file mode 100644 index 0000000000000000000000000000000000000000..d65df266aa83d1ed67a5140064dc0f188846752c --- /dev/null +++ b/ChromeDevTools/Protocol/Accessibility/AXPropertySource.cs @@ -0,0 +1,36 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Accessibility +{ + /// <summary> + /// A single source for a computed AX property. + /// </summary> + public class AXPropertySource + { + /// <summary> + /// Gets or sets The name/label of this source. + /// </summary> + public string Name { get; set; } + /// <summary> + /// Gets or sets What type of source this is. + /// </summary> + public AXPropertySourceType SourceType { get; set; } + /// <summary> + /// Gets or sets The value of this property source. + /// </summary> + public object Value { get; set; } + /// <summary> + /// Gets or sets What type the value should be interpreted as. + /// </summary> + public AXValueType Type { get; set; } + /// <summary> + /// Gets or sets Whether the value for this property is invalid. + /// </summary> + public bool Invalid { get; set; } + /// <summary> + /// Gets or sets Reason for the value being invalid, if it is. + /// </summary> + public string InvalidReason { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/Accessibility/AXPropertySourceType.cs b/ChromeDevTools/Protocol/Accessibility/AXPropertySourceType.cs new file mode 100644 index 0000000000000000000000000000000000000000..76e04491db8009d071cfe3bb8baed8e62a497a7a --- /dev/null +++ b/ChromeDevTools/Protocol/Accessibility/AXPropertySourceType.cs @@ -0,0 +1,13 @@ +using ChromeDevTools; + +namespace ChromeDevTools.Protocol.Accessibility{ + /// <summary> + /// Enum of possible property sources. + /// </summary> + public enum AXPropertySourceType + { + Attribute, + Implicit, + Style, + } +} diff --git a/ChromeDevTools/Protocol/Accessibility/AXRelatedNode.cs b/ChromeDevTools/Protocol/Accessibility/AXRelatedNode.cs new file mode 100644 index 0000000000000000000000000000000000000000..926f8c3771e17d6306718b095b12ef6417855e49 --- /dev/null +++ b/ChromeDevTools/Protocol/Accessibility/AXRelatedNode.cs @@ -0,0 +1,20 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Accessibility +{ + /// <summary> + /// + /// </summary> + public class AXRelatedNode + { + /// <summary> + /// Gets or sets The IDRef value provided, if any. + /// </summary> + public string Idref { get; set; } + /// <summary> + /// Gets or sets The BackendNodeId of the related node. + /// </summary> + public long BackendNodeId { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/Accessibility/AXRelationshipAttributes.cs b/ChromeDevTools/Protocol/Accessibility/AXRelationshipAttributes.cs new file mode 100644 index 0000000000000000000000000000000000000000..4d4112dfe244ca035efb249ad9e6484956b2bf5d --- /dev/null +++ b/ChromeDevTools/Protocol/Accessibility/AXRelationshipAttributes.cs @@ -0,0 +1,16 @@ +using ChromeDevTools; + +namespace ChromeDevTools.Protocol.Accessibility{ + /// <summary> + /// Relationships between elements other than parent/child/sibling. + /// </summary> + public enum AXRelationshipAttributes + { + Activedescendant, + Flowto, + Controls, + Describedby, + Labelledby, + Owns, + } +} diff --git a/ChromeDevTools/Protocol/Accessibility/AXValue.cs b/ChromeDevTools/Protocol/Accessibility/AXValue.cs new file mode 100644 index 0000000000000000000000000000000000000000..8dbdaa61133df87b0736f6f2e7b41e718490bbec --- /dev/null +++ b/ChromeDevTools/Protocol/Accessibility/AXValue.cs @@ -0,0 +1,32 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Accessibility +{ + /// <summary> + /// A single computed AX property. + /// </summary> + public class AXValue + { + /// <summary> + /// Gets or sets The type of this value. + /// </summary> + public AXValueType Type { get; set; } + /// <summary> + /// Gets or sets The computed value of this property. + /// </summary> + public object Value { get; set; } + /// <summary> + /// Gets or sets The related node value, if any. + /// </summary> + public AXRelatedNode RelatedNodeValue { get; set; } + /// <summary> + /// Gets or sets Multiple relted nodes, if applicable. + /// </summary> + public AXRelatedNode[] RelatedNodeArrayValue { get; set; } + /// <summary> + /// Gets or sets The sources which contributed to the computation of this property. + /// </summary> + public AXPropertySource[] Sources { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/Accessibility/AXValueType.cs b/ChromeDevTools/Protocol/Accessibility/AXValueType.cs new file mode 100644 index 0000000000000000000000000000000000000000..5440cf40d9a7bb71c9d5bad9ca50dee09790c9d4 --- /dev/null +++ b/ChromeDevTools/Protocol/Accessibility/AXValueType.cs @@ -0,0 +1,23 @@ +using ChromeDevTools; + +namespace ChromeDevTools.Protocol.Accessibility{ + /// <summary> + /// Enum of possible property types. + /// </summary> + public enum AXValueType + { + Boolean, + Tristate, + BooleanOrUndefined, + Idref, + IdrefList, + Integer, + Number, + String, + Token, + TokenList, + DomRelation, + Role, + InternalRole, + } +} diff --git a/ChromeDevTools/Protocol/Accessibility/AXWidgetAttributes.cs b/ChromeDevTools/Protocol/Accessibility/AXWidgetAttributes.cs new file mode 100644 index 0000000000000000000000000000000000000000..4492fa06db3b9744bc23c145596859645a23149e --- /dev/null +++ b/ChromeDevTools/Protocol/Accessibility/AXWidgetAttributes.cs @@ -0,0 +1,21 @@ +using ChromeDevTools; + +namespace ChromeDevTools.Protocol.Accessibility{ + /// <summary> + /// + /// </summary> + public enum AXWidgetAttributes + { + Autocomplete, + Haspopup, + Level, + Multiselectable, + Orientation, + Multiline, + Readonly, + Required, + Valuemin, + Valuemax, + Valuetext, + } +} diff --git a/ChromeDevTools/Protocol/Accessibility/AXWidgetStates.cs b/ChromeDevTools/Protocol/Accessibility/AXWidgetStates.cs new file mode 100644 index 0000000000000000000000000000000000000000..deeeba4c9aa15908e3917ce6128d43ab2e45297c --- /dev/null +++ b/ChromeDevTools/Protocol/Accessibility/AXWidgetStates.cs @@ -0,0 +1,14 @@ +using ChromeDevTools; + +namespace ChromeDevTools.Protocol.Accessibility{ + /// <summary> + /// States which apply to widgets. + /// </summary> + public enum AXWidgetStates + { + Checked, + Expanded, + Pressed, + Selected, + } +} diff --git a/ChromeDevTools/Protocol/Accessibility/GetAXNodeCommand.cs b/ChromeDevTools/Protocol/Accessibility/GetAXNodeCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..45a9c4042050418e33fc336fa0d12182f797a868 --- /dev/null +++ b/ChromeDevTools/Protocol/Accessibility/GetAXNodeCommand.cs @@ -0,0 +1,17 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Accessibility +{ + /// <summary> + /// Fetches the accessibility node for this DOM node, if it exists. + /// </summary> + [Command(ProtocolName.Accessibility.GetAXNode)] + public class GetAXNodeCommand + { + /// <summary> + /// Gets or sets ID of node to get accessibility node for. + /// </summary> + public long NodeId { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/Accessibility/GetAXNodeCommandResponse.cs b/ChromeDevTools/Protocol/Accessibility/GetAXNodeCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..29c75c2856de9721c6d0d53736f1310e8e8846a2 --- /dev/null +++ b/ChromeDevTools/Protocol/Accessibility/GetAXNodeCommandResponse.cs @@ -0,0 +1,17 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Accessibility +{ + /// <summary> + /// Fetches the accessibility node for this DOM node, if it exists. + /// </summary> + [CommandResponse(ProtocolName.Accessibility.GetAXNode)] + public class GetAXNodeCommandResponse + { + /// <summary> + /// Gets or sets The <code>Accessibility.AXNode</code> for this DOM node, if it exists. + /// </summary> + public AXNode AccessibilityNode { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/Animation/AnimationNode.cs b/ChromeDevTools/Protocol/Animation/AnimationNode.cs new file mode 100644 index 0000000000000000000000000000000000000000..5680f131e2597ed09610e5ee96b050808de7f0e6 --- /dev/null +++ b/ChromeDevTools/Protocol/Animation/AnimationNode.cs @@ -0,0 +1,60 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Animation +{ + /// <summary> + /// AnimationNode instance + /// </summary> + public class AnimationNode + { + /// <summary> + /// Gets or sets <code>AnimationNode</code>'s delay. + /// </summary> + public double Delay { get; set; } + /// <summary> + /// Gets or sets <code>AnimationNode</code>'s end delay. + /// </summary> + public double EndDelay { get; set; } + /// <summary> + /// Gets or sets <code>AnimationNode</code>'s playbackRate. + /// </summary> + public double PlaybackRate { get; set; } + /// <summary> + /// Gets or sets <code>AnimationNode</code>'s iteration start. + /// </summary> + public double IterationStart { get; set; } + /// <summary> + /// Gets or sets <code>AnimationNode</code>'s iterations. + /// </summary> + public double Iterations { get; set; } + /// <summary> + /// Gets or sets <code>AnimationNode</code>'s iteration duration. + /// </summary> + public double Duration { get; set; } + /// <summary> + /// Gets or sets <code>AnimationNode</code>'s playback direction. + /// </summary> + public string Direction { get; set; } + /// <summary> + /// Gets or sets <code>AnimationNode</code>'s fill mode. + /// </summary> + public string Fill { get; set; } + /// <summary> + /// Gets or sets <code>AnimationNode</code>'s name. + /// </summary> + public string Name { get; set; } + /// <summary> + /// Gets or sets <code>AnimationNode</code>'s target node. + /// </summary> + public long BackendNodeId { get; set; } + /// <summary> + /// Gets or sets <code>AnimationNode</code>'s keyframes. + /// </summary> + public KeyframesRule KeyframesRule { get; set; } + /// <summary> + /// Gets or sets <code>AnimationNode</code>'s timing function. + /// </summary> + public string Easing { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/Animation/AnimationPlayer.cs b/ChromeDevTools/Protocol/Animation/AnimationPlayer.cs new file mode 100644 index 0000000000000000000000000000000000000000..9c3dda71c2c45117f1cf4658a4f573e1c7d07086 --- /dev/null +++ b/ChromeDevTools/Protocol/Animation/AnimationPlayer.cs @@ -0,0 +1,44 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Animation +{ + /// <summary> + /// AnimationPlayer instance. + /// </summary> + public class AnimationPlayer + { + /// <summary> + /// Gets or sets <code>AnimationPlayer</code>'s id. + /// </summary> + public string Id { get; set; } + /// <summary> + /// Gets or sets <code>AnimationPlayer</code>'s internal paused state. + /// </summary> + public bool PausedState { get; set; } + /// <summary> + /// Gets or sets <code>AnimationPlayer</code>'s play state. + /// </summary> + public string PlayState { get; set; } + /// <summary> + /// Gets or sets <code>AnimationPlayer</code>'s playback rate. + /// </summary> + public double PlaybackRate { get; set; } + /// <summary> + /// Gets or sets <code>AnimationPlayer</code>'s start time. + /// </summary> + public double StartTime { get; set; } + /// <summary> + /// Gets or sets <code>AnimationPlayer</code>'s current time. + /// </summary> + public double CurrentTime { get; set; } + /// <summary> + /// Gets or sets <code>AnimationPlayer</code>'s source animation node. + /// </summary> + public AnimationNode Source { get; set; } + /// <summary> + /// Gets or sets Animation type of <code>AnimationPlayer</code>. + /// </summary> + public string Type { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/Animation/AnimationPlayerCanceledEvent.cs b/ChromeDevTools/Protocol/Animation/AnimationPlayerCanceledEvent.cs new file mode 100644 index 0000000000000000000000000000000000000000..2dfe541e21018e9f22ace07a43fa1c2aa321da1f --- /dev/null +++ b/ChromeDevTools/Protocol/Animation/AnimationPlayerCanceledEvent.cs @@ -0,0 +1,16 @@ +using ChromeDevTools; + +namespace ChromeDevTools.Protocol.Animation +{ + /// <summary> + /// Event for AnimationPlayers in the frontend that have been cancelled. + /// </summary> + [Event(ProtocolName.Animation.AnimationPlayerCanceled)] + public class AnimationPlayerCanceledEvent + { + /// <summary> + /// Gets or sets Id of the AnimationPlayer that was cancelled. + /// </summary> + public string PlayerId { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/Animation/AnimationPlayerCreatedEvent.cs b/ChromeDevTools/Protocol/Animation/AnimationPlayerCreatedEvent.cs new file mode 100644 index 0000000000000000000000000000000000000000..0fa0a2a8d565a9385da91d7aa9d12d7341532dfa --- /dev/null +++ b/ChromeDevTools/Protocol/Animation/AnimationPlayerCreatedEvent.cs @@ -0,0 +1,20 @@ +using ChromeDevTools; + +namespace ChromeDevTools.Protocol.Animation +{ + /// <summary> + /// Event for each animation player that has been created. + /// </summary> + [Event(ProtocolName.Animation.AnimationPlayerCreated)] + public class AnimationPlayerCreatedEvent + { + /// <summary> + /// Gets or sets AnimationPlayer that was created. + /// </summary> + public AnimationPlayer Player { get; set; } + /// <summary> + /// Gets or sets Whether the timeline should be reset. + /// </summary> + public bool ResetTimeline { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/Animation/EnableCommand.cs b/ChromeDevTools/Protocol/Animation/EnableCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..14252440545647088789e4c368245fba486dfb89 --- /dev/null +++ b/ChromeDevTools/Protocol/Animation/EnableCommand.cs @@ -0,0 +1,13 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Animation +{ + /// <summary> + /// Enables animation domain notifications. + /// </summary> + [Command(ProtocolName.Animation.Enable)] + public class EnableCommand + { + } +} diff --git a/ChromeDevTools/Protocol/Animation/EnableCommandResponse.cs b/ChromeDevTools/Protocol/Animation/EnableCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..1d21d69af009339cfea5b0668bf12bd9c67073de --- /dev/null +++ b/ChromeDevTools/Protocol/Animation/EnableCommandResponse.cs @@ -0,0 +1,13 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Animation +{ + /// <summary> + /// Enables animation domain notifications. + /// </summary> + [CommandResponse(ProtocolName.Animation.Enable)] + public class EnableCommandResponse + { + } +} diff --git a/ChromeDevTools/Protocol/Animation/GetAnimationPlayersForNodeCommand.cs b/ChromeDevTools/Protocol/Animation/GetAnimationPlayersForNodeCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..f2f46c0951816a12dacde3b68f59c56018a9ac8e --- /dev/null +++ b/ChromeDevTools/Protocol/Animation/GetAnimationPlayersForNodeCommand.cs @@ -0,0 +1,21 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Animation +{ + /// <summary> + /// Returns animation players relevant to the node. + /// </summary> + [Command(ProtocolName.Animation.GetAnimationPlayersForNode)] + public class GetAnimationPlayersForNodeCommand + { + /// <summary> + /// Gets or sets Id of the node to get animation players for. + /// </summary> + public long NodeId { get; set; } + /// <summary> + /// Gets or sets Include animations from elements subtree. + /// </summary> + public bool IncludeSubtreeAnimations { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/Animation/GetAnimationPlayersForNodeCommandResponse.cs b/ChromeDevTools/Protocol/Animation/GetAnimationPlayersForNodeCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..76bd1ffe8e4adff82f9b9d2c7b35f3bc243a05c1 --- /dev/null +++ b/ChromeDevTools/Protocol/Animation/GetAnimationPlayersForNodeCommandResponse.cs @@ -0,0 +1,17 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Animation +{ + /// <summary> + /// Returns animation players relevant to the node. + /// </summary> + [CommandResponse(ProtocolName.Animation.GetAnimationPlayersForNode)] + public class GetAnimationPlayersForNodeCommandResponse + { + /// <summary> + /// Gets or sets Array of animation players. + /// </summary> + public AnimationPlayer[] AnimationPlayers { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/Animation/GetPlaybackRateCommand.cs b/ChromeDevTools/Protocol/Animation/GetPlaybackRateCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..b141d8095902f665e9f02814a535c2c6b4507c58 --- /dev/null +++ b/ChromeDevTools/Protocol/Animation/GetPlaybackRateCommand.cs @@ -0,0 +1,13 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Animation +{ + /// <summary> + /// Gets the playback rate of the document timeline. + /// </summary> + [Command(ProtocolName.Animation.GetPlaybackRate)] + public class GetPlaybackRateCommand + { + } +} diff --git a/ChromeDevTools/Protocol/Animation/GetPlaybackRateCommandResponse.cs b/ChromeDevTools/Protocol/Animation/GetPlaybackRateCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..b638090ab374512ad771d897350c9d8640f403b8 --- /dev/null +++ b/ChromeDevTools/Protocol/Animation/GetPlaybackRateCommandResponse.cs @@ -0,0 +1,17 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Animation +{ + /// <summary> + /// Gets the playback rate of the document timeline. + /// </summary> + [CommandResponse(ProtocolName.Animation.GetPlaybackRate)] + public class GetPlaybackRateCommandResponse + { + /// <summary> + /// Gets or sets Playback rate for animations on page. + /// </summary> + public double PlaybackRate { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/Animation/KeyframeStyle.cs b/ChromeDevTools/Protocol/Animation/KeyframeStyle.cs new file mode 100644 index 0000000000000000000000000000000000000000..5befa173e887a32bbf52d9de61b80c9b764424b2 --- /dev/null +++ b/ChromeDevTools/Protocol/Animation/KeyframeStyle.cs @@ -0,0 +1,20 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Animation +{ + /// <summary> + /// Keyframe Style + /// </summary> + public class KeyframeStyle + { + /// <summary> + /// Gets or sets Keyframe's time offset. + /// </summary> + public string Offset { get; set; } + /// <summary> + /// Gets or sets <code>AnimationNode</code>'s timing function. + /// </summary> + public string Easing { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/Animation/KeyframesRule.cs b/ChromeDevTools/Protocol/Animation/KeyframesRule.cs new file mode 100644 index 0000000000000000000000000000000000000000..2dce594cb19b5a46b179eca7f2dc885d7ad89f3b --- /dev/null +++ b/ChromeDevTools/Protocol/Animation/KeyframesRule.cs @@ -0,0 +1,20 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Animation +{ + /// <summary> + /// Keyframes Rule + /// </summary> + public class KeyframesRule + { + /// <summary> + /// Gets or sets CSS keyframed animation's name. + /// </summary> + public string Name { get; set; } + /// <summary> + /// Gets or sets List of animation keyframes. + /// </summary> + public KeyframeStyle[] Keyframes { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/Animation/SetCurrentTimeCommand.cs b/ChromeDevTools/Protocol/Animation/SetCurrentTimeCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..732ff86e949733dbfc95531cb8f0c35cc076041b --- /dev/null +++ b/ChromeDevTools/Protocol/Animation/SetCurrentTimeCommand.cs @@ -0,0 +1,17 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Animation +{ + /// <summary> + /// Sets the current time of the document timeline. + /// </summary> + [Command(ProtocolName.Animation.SetCurrentTime)] + public class SetCurrentTimeCommand + { + /// <summary> + /// Gets or sets Current time for the page animation timeline + /// </summary> + public double CurrentTime { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/Animation/SetCurrentTimeCommandResponse.cs b/ChromeDevTools/Protocol/Animation/SetCurrentTimeCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..86ee0e704aa6640190fdfd9e2edfc79c08782ae0 --- /dev/null +++ b/ChromeDevTools/Protocol/Animation/SetCurrentTimeCommandResponse.cs @@ -0,0 +1,13 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Animation +{ + /// <summary> + /// Sets the current time of the document timeline. + /// </summary> + [CommandResponse(ProtocolName.Animation.SetCurrentTime)] + public class SetCurrentTimeCommandResponse + { + } +} diff --git a/ChromeDevTools/Protocol/Animation/SetPlaybackRateCommand.cs b/ChromeDevTools/Protocol/Animation/SetPlaybackRateCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..a0cf69da8a15aea7783c1f0c0b5f26ded4d0c2e3 --- /dev/null +++ b/ChromeDevTools/Protocol/Animation/SetPlaybackRateCommand.cs @@ -0,0 +1,17 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Animation +{ + /// <summary> + /// Sets the playback rate of the document timeline. + /// </summary> + [Command(ProtocolName.Animation.SetPlaybackRate)] + public class SetPlaybackRateCommand + { + /// <summary> + /// Gets or sets Playback rate for animations on page + /// </summary> + public double PlaybackRate { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/Animation/SetPlaybackRateCommandResponse.cs b/ChromeDevTools/Protocol/Animation/SetPlaybackRateCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..9e09a02b45c120b7d957b11692df1634c8e4d46d --- /dev/null +++ b/ChromeDevTools/Protocol/Animation/SetPlaybackRateCommandResponse.cs @@ -0,0 +1,13 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Animation +{ + /// <summary> + /// Sets the playback rate of the document timeline. + /// </summary> + [CommandResponse(ProtocolName.Animation.SetPlaybackRate)] + public class SetPlaybackRateCommandResponse + { + } +} diff --git a/ChromeDevTools/Protocol/Animation/SetTimingCommand.cs b/ChromeDevTools/Protocol/Animation/SetTimingCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..6550d51b82fccd9027460000410398aba72f08fd --- /dev/null +++ b/ChromeDevTools/Protocol/Animation/SetTimingCommand.cs @@ -0,0 +1,25 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Animation +{ + /// <summary> + /// Sets the timing of an animation node. + /// </summary> + [Command(ProtocolName.Animation.SetTiming)] + public class SetTimingCommand + { + /// <summary> + /// Gets or sets AnimationPlayer id. + /// </summary> + public string PlayerId { get; set; } + /// <summary> + /// Gets or sets Duration of the animation. + /// </summary> + public double Duration { get; set; } + /// <summary> + /// Gets or sets Delay of the animation. + /// </summary> + public double Delay { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/Animation/SetTimingCommandResponse.cs b/ChromeDevTools/Protocol/Animation/SetTimingCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..806795bb8db6a48bda066f63b32fd135976ee5ca --- /dev/null +++ b/ChromeDevTools/Protocol/Animation/SetTimingCommandResponse.cs @@ -0,0 +1,13 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Animation +{ + /// <summary> + /// Sets the timing of an animation node. + /// </summary> + [CommandResponse(ProtocolName.Animation.SetTiming)] + public class SetTimingCommandResponse + { + } +} diff --git a/ChromeDevTools/Protocol/ApplicationCache/ApplicationCache.cs b/ChromeDevTools/Protocol/ApplicationCache/ApplicationCache.cs new file mode 100644 index 0000000000000000000000000000000000000000..dd8b63b830d3df1ed020aa7afa12015fcbce19b0 --- /dev/null +++ b/ChromeDevTools/Protocol/ApplicationCache/ApplicationCache.cs @@ -0,0 +1,32 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.ApplicationCache +{ + /// <summary> + /// Detailed application cache information. + /// </summary> + public class ApplicationCache + { + /// <summary> + /// Gets or sets Manifest URL. + /// </summary> + public string ManifestURL { get; set; } + /// <summary> + /// Gets or sets Application cache size. + /// </summary> + public double Size { get; set; } + /// <summary> + /// Gets or sets Application cache creation time. + /// </summary> + public double CreationTime { get; set; } + /// <summary> + /// Gets or sets Application cache update time. + /// </summary> + public double UpdateTime { get; set; } + /// <summary> + /// Gets or sets Application cache resources. + /// </summary> + public ApplicationCacheResource[] Resources { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/ApplicationCache/ApplicationCacheResource.cs b/ChromeDevTools/Protocol/ApplicationCache/ApplicationCacheResource.cs new file mode 100644 index 0000000000000000000000000000000000000000..6413db0fa85e4a50a9f2f5ba44304717b907f9de --- /dev/null +++ b/ChromeDevTools/Protocol/ApplicationCache/ApplicationCacheResource.cs @@ -0,0 +1,24 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.ApplicationCache +{ + /// <summary> + /// Detailed application cache resource information. + /// </summary> + public class ApplicationCacheResource + { + /// <summary> + /// Gets or sets Resource url. + /// </summary> + public string Url { get; set; } + /// <summary> + /// Gets or sets Resource size. + /// </summary> + public long Size { get; set; } + /// <summary> + /// Gets or sets Resource type. + /// </summary> + public string Type { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/ApplicationCache/ApplicationCacheStatusUpdatedEvent.cs b/ChromeDevTools/Protocol/ApplicationCache/ApplicationCacheStatusUpdatedEvent.cs new file mode 100644 index 0000000000000000000000000000000000000000..fd8cd0c54f7699a7b08563feb6ba6c4030917f55 --- /dev/null +++ b/ChromeDevTools/Protocol/ApplicationCache/ApplicationCacheStatusUpdatedEvent.cs @@ -0,0 +1,21 @@ +using ChromeDevTools; + +namespace ChromeDevTools.Protocol.ApplicationCache +{ + [Event(ProtocolName.ApplicationCache.ApplicationCacheStatusUpdated)] + public class ApplicationCacheStatusUpdatedEvent + { + /// <summary> + /// Gets or sets Identifier of the frame containing document whose application cache updated status. + /// </summary> + public string FrameId { get; set; } + /// <summary> + /// Gets or sets Manifest URL. + /// </summary> + public string ManifestURL { get; set; } + /// <summary> + /// Gets or sets Updated application cache status. + /// </summary> + public long Status { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/ApplicationCache/EnableCommand.cs b/ChromeDevTools/Protocol/ApplicationCache/EnableCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..ded23fcbc2d94102c49f24c2a7e10df0db80a0af --- /dev/null +++ b/ChromeDevTools/Protocol/ApplicationCache/EnableCommand.cs @@ -0,0 +1,13 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.ApplicationCache +{ + /// <summary> + /// Enables application cache domain notifications. + /// </summary> + [Command(ProtocolName.ApplicationCache.Enable)] + public class EnableCommand + { + } +} diff --git a/ChromeDevTools/Protocol/ApplicationCache/EnableCommandResponse.cs b/ChromeDevTools/Protocol/ApplicationCache/EnableCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..faaa608161ceffd33f7d1005d3458916c3941162 --- /dev/null +++ b/ChromeDevTools/Protocol/ApplicationCache/EnableCommandResponse.cs @@ -0,0 +1,13 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.ApplicationCache +{ + /// <summary> + /// Enables application cache domain notifications. + /// </summary> + [CommandResponse(ProtocolName.ApplicationCache.Enable)] + public class EnableCommandResponse + { + } +} diff --git a/ChromeDevTools/Protocol/ApplicationCache/FrameWithManifest.cs b/ChromeDevTools/Protocol/ApplicationCache/FrameWithManifest.cs new file mode 100644 index 0000000000000000000000000000000000000000..060e4a5f303c128b6ca1c080d07c36e1e859a53c --- /dev/null +++ b/ChromeDevTools/Protocol/ApplicationCache/FrameWithManifest.cs @@ -0,0 +1,24 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.ApplicationCache +{ + /// <summary> + /// Frame identifier - manifest URL pair. + /// </summary> + public class FrameWithManifest + { + /// <summary> + /// Gets or sets Frame identifier. + /// </summary> + public string FrameId { get; set; } + /// <summary> + /// Gets or sets Manifest URL. + /// </summary> + public string ManifestURL { get; set; } + /// <summary> + /// Gets or sets Application cache status. + /// </summary> + public long Status { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/ApplicationCache/GetApplicationCacheForFrameCommand.cs b/ChromeDevTools/Protocol/ApplicationCache/GetApplicationCacheForFrameCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..7c2abee8f063f3112b6311fd4d34bb2ed46eebd5 --- /dev/null +++ b/ChromeDevTools/Protocol/ApplicationCache/GetApplicationCacheForFrameCommand.cs @@ -0,0 +1,17 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.ApplicationCache +{ + /// <summary> + /// Returns relevant application cache data for the document in given frame. + /// </summary> + [Command(ProtocolName.ApplicationCache.GetApplicationCacheForFrame)] + public class GetApplicationCacheForFrameCommand + { + /// <summary> + /// Gets or sets Identifier of the frame containing document whose application cache is retrieved. + /// </summary> + public string FrameId { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/ApplicationCache/GetApplicationCacheForFrameCommandResponse.cs b/ChromeDevTools/Protocol/ApplicationCache/GetApplicationCacheForFrameCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..e4eb16b30d4409015f5dc7f6fb3591cb0e8e57d6 --- /dev/null +++ b/ChromeDevTools/Protocol/ApplicationCache/GetApplicationCacheForFrameCommandResponse.cs @@ -0,0 +1,17 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.ApplicationCache +{ + /// <summary> + /// Returns relevant application cache data for the document in given frame. + /// </summary> + [CommandResponse(ProtocolName.ApplicationCache.GetApplicationCacheForFrame)] + public class GetApplicationCacheForFrameCommandResponse + { + /// <summary> + /// Gets or sets Relevant application cache data for the document in given frame. + /// </summary> + public ApplicationCache ApplicationCache { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/ApplicationCache/GetFramesWithManifestsCommand.cs b/ChromeDevTools/Protocol/ApplicationCache/GetFramesWithManifestsCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..5d0eaaff21457610611e113dac1045e839aa460c --- /dev/null +++ b/ChromeDevTools/Protocol/ApplicationCache/GetFramesWithManifestsCommand.cs @@ -0,0 +1,13 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.ApplicationCache +{ + /// <summary> + /// Returns array of frame identifiers with manifest urls for each frame containing a document associated with some application cache. + /// </summary> + [Command(ProtocolName.ApplicationCache.GetFramesWithManifests)] + public class GetFramesWithManifestsCommand + { + } +} diff --git a/ChromeDevTools/Protocol/ApplicationCache/GetFramesWithManifestsCommandResponse.cs b/ChromeDevTools/Protocol/ApplicationCache/GetFramesWithManifestsCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..25680b25d8cb04c81077e555aa5eda8a3c570586 --- /dev/null +++ b/ChromeDevTools/Protocol/ApplicationCache/GetFramesWithManifestsCommandResponse.cs @@ -0,0 +1,17 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.ApplicationCache +{ + /// <summary> + /// Returns array of frame identifiers with manifest urls for each frame containing a document associated with some application cache. + /// </summary> + [CommandResponse(ProtocolName.ApplicationCache.GetFramesWithManifests)] + public class GetFramesWithManifestsCommandResponse + { + /// <summary> + /// Gets or sets Array of frame identifiers with manifest urls for each frame containing a document associated with some application cache. + /// </summary> + public FrameWithManifest[] FrameIds { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/ApplicationCache/GetManifestForFrameCommand.cs b/ChromeDevTools/Protocol/ApplicationCache/GetManifestForFrameCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..afef46744e654688957019747bbad67b6bb121aa --- /dev/null +++ b/ChromeDevTools/Protocol/ApplicationCache/GetManifestForFrameCommand.cs @@ -0,0 +1,17 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.ApplicationCache +{ + /// <summary> + /// Returns manifest URL for document in the given frame. + /// </summary> + [Command(ProtocolName.ApplicationCache.GetManifestForFrame)] + public class GetManifestForFrameCommand + { + /// <summary> + /// Gets or sets Identifier of the frame containing document whose manifest is retrieved. + /// </summary> + public string FrameId { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/ApplicationCache/GetManifestForFrameCommandResponse.cs b/ChromeDevTools/Protocol/ApplicationCache/GetManifestForFrameCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..0f76fd33fbf37a661eb20cce038642debc685232 --- /dev/null +++ b/ChromeDevTools/Protocol/ApplicationCache/GetManifestForFrameCommandResponse.cs @@ -0,0 +1,17 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.ApplicationCache +{ + /// <summary> + /// Returns manifest URL for document in the given frame. + /// </summary> + [CommandResponse(ProtocolName.ApplicationCache.GetManifestForFrame)] + public class GetManifestForFrameCommandResponse + { + /// <summary> + /// Gets or sets Manifest URL for document in the given frame. + /// </summary> + public string ManifestURL { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/ApplicationCache/NetworkStateUpdatedEvent.cs b/ChromeDevTools/Protocol/ApplicationCache/NetworkStateUpdatedEvent.cs new file mode 100644 index 0000000000000000000000000000000000000000..85da1da007b33661a8b99c14afd61a0ece3e6a37 --- /dev/null +++ b/ChromeDevTools/Protocol/ApplicationCache/NetworkStateUpdatedEvent.cs @@ -0,0 +1,13 @@ +using ChromeDevTools; + +namespace ChromeDevTools.Protocol.ApplicationCache +{ + [Event(ProtocolName.ApplicationCache.NetworkStateUpdated)] + public class NetworkStateUpdatedEvent + { + /// <summary> + /// Gets or sets IsNowOnline + /// </summary> + public bool IsNowOnline { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/CSS/AddRuleCommand.cs b/ChromeDevTools/Protocol/CSS/AddRuleCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..cb29a475047b3052a805df650b06337d97730f25 --- /dev/null +++ b/ChromeDevTools/Protocol/CSS/AddRuleCommand.cs @@ -0,0 +1,25 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.CSS +{ + /// <summary> + /// Inserts a new rule with the given <code>ruleText</code> in a stylesheet with given <code>styleSheetId</code>, at the position specified by <code>location</code>. + /// </summary> + [Command(ProtocolName.CSS.AddRule)] + public class AddRuleCommand + { + /// <summary> + /// Gets or sets The css style sheet identifier where a new rule should be inserted. + /// </summary> + public string StyleSheetId { get; set; } + /// <summary> + /// Gets or sets The text of a new rule. + /// </summary> + public string RuleText { get; set; } + /// <summary> + /// Gets or sets Text position of a new rule in the target style sheet. + /// </summary> + public SourceRange Location { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/CSS/AddRuleCommandResponse.cs b/ChromeDevTools/Protocol/CSS/AddRuleCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..16eb1f52f5ad127ce73f975982ed6b6ed55fc692 --- /dev/null +++ b/ChromeDevTools/Protocol/CSS/AddRuleCommandResponse.cs @@ -0,0 +1,17 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.CSS +{ + /// <summary> + /// Inserts a new rule with the given <code>ruleText</code> in a stylesheet with given <code>styleSheetId</code>, at the position specified by <code>location</code>. + /// </summary> + [CommandResponse(ProtocolName.CSS.AddRule)] + public class AddRuleCommandResponse + { + /// <summary> + /// Gets or sets The newly created rule. + /// </summary> + public CSSRule Rule { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/CSS/CSSComputedStyleProperty.cs b/ChromeDevTools/Protocol/CSS/CSSComputedStyleProperty.cs new file mode 100644 index 0000000000000000000000000000000000000000..f59daf6921b165c1e5796cdf4c37e8f4527fba07 --- /dev/null +++ b/ChromeDevTools/Protocol/CSS/CSSComputedStyleProperty.cs @@ -0,0 +1,20 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.CSS +{ + /// <summary> + /// + /// </summary> + public class CSSComputedStyleProperty + { + /// <summary> + /// Gets or sets Computed style property name. + /// </summary> + public string Name { get; set; } + /// <summary> + /// Gets or sets Computed style property value. + /// </summary> + public string Value { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/CSS/CSSMedia.cs b/ChromeDevTools/Protocol/CSS/CSSMedia.cs new file mode 100644 index 0000000000000000000000000000000000000000..445072da2d0a0464460b5467911cc1efd15dcac4 --- /dev/null +++ b/ChromeDevTools/Protocol/CSS/CSSMedia.cs @@ -0,0 +1,36 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.CSS +{ + /// <summary> + /// CSS media rule descriptor. + /// </summary> + public class CSSMedia + { + /// <summary> + /// Gets or sets Media query text. + /// </summary> + public string Text { get; set; } + /// <summary> + /// Gets or sets Source of the media query: "mediaRule" if specified by a @media rule, "importRule" if specified by an @import rule, "linkedSheet" if specified by a "media" attribute in a linked stylesheet's LINK tag, "inlineSheet" if specified by a "media" attribute in an inline stylesheet's STYLE tag. + /// </summary> + public string Source { get; set; } + /// <summary> + /// Gets or sets URL of the document containing the media query description. + /// </summary> + public string SourceURL { get; set; } + /// <summary> + /// Gets or sets The associated rule (@media or @import) header range in the enclosing stylesheet (if available). + /// </summary> + public SourceRange Range { get; set; } + /// <summary> + /// Gets or sets Identifier of the stylesheet containing this object (if exists). + /// </summary> + public string ParentStyleSheetId { get; set; } + /// <summary> + /// Gets or sets Array of media queries. + /// </summary> + public MediaQuery[] MediaList { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/CSS/CSSProperty.cs b/ChromeDevTools/Protocol/CSS/CSSProperty.cs new file mode 100644 index 0000000000000000000000000000000000000000..bd87e7c5cd8ec9b1ea9649e4bf1e38657b042192 --- /dev/null +++ b/ChromeDevTools/Protocol/CSS/CSSProperty.cs @@ -0,0 +1,44 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.CSS +{ + /// <summary> + /// CSS property declaration data. + /// </summary> + public class CSSProperty + { + /// <summary> + /// Gets or sets The property name. + /// </summary> + public string Name { get; set; } + /// <summary> + /// Gets or sets The property value. + /// </summary> + public string Value { get; set; } + /// <summary> + /// Gets or sets Whether the property has "!important" annotation (implies <code>false</code> if absent). + /// </summary> + public bool Important { get; set; } + /// <summary> + /// Gets or sets Whether the property is implicit (implies <code>false</code> if absent). + /// </summary> + public bool Implicit { get; set; } + /// <summary> + /// Gets or sets The full property text as specified in the style. + /// </summary> + public string Text { get; set; } + /// <summary> + /// Gets or sets Whether the property is understood by the browser (implies <code>true</code> if absent). + /// </summary> + public bool ParsedOk { get; set; } + /// <summary> + /// Gets or sets Whether the property is disabled by the user (present for source-based properties only). + /// </summary> + public bool Disabled { get; set; } + /// <summary> + /// Gets or sets The entire property range in the enclosing style declaration (if available). + /// </summary> + public SourceRange Range { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/CSS/CSSRule.cs b/ChromeDevTools/Protocol/CSS/CSSRule.cs new file mode 100644 index 0000000000000000000000000000000000000000..77ab94140e55f203c165f263db1266913af40914 --- /dev/null +++ b/ChromeDevTools/Protocol/CSS/CSSRule.cs @@ -0,0 +1,32 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.CSS +{ + /// <summary> + /// CSS rule representation. + /// </summary> + public class CSSRule + { + /// <summary> + /// Gets or sets The css style sheet identifier (absent for user agent stylesheet and user-specified stylesheet rules) this rule came from. + /// </summary> + public string StyleSheetId { get; set; } + /// <summary> + /// Gets or sets Rule selector data. + /// </summary> + public SelectorList SelectorList { get; set; } + /// <summary> + /// Gets or sets Parent stylesheet's origin. + /// </summary> + public StyleSheetOrigin Origin { get; set; } + /// <summary> + /// Gets or sets Associated style declaration. + /// </summary> + public CSSStyle Style { get; set; } + /// <summary> + /// Gets or sets Media list array (for rules involving media queries). The array enumerates media queries starting with the innermost one, going outwards. + /// </summary> + public CSSMedia[] Media { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/CSS/CSSStyle.cs b/ChromeDevTools/Protocol/CSS/CSSStyle.cs new file mode 100644 index 0000000000000000000000000000000000000000..56cc4bbeaac0139ed64245d27c8a5480a3dab8f0 --- /dev/null +++ b/ChromeDevTools/Protocol/CSS/CSSStyle.cs @@ -0,0 +1,32 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.CSS +{ + /// <summary> + /// CSS style representation. + /// </summary> + public class CSSStyle + { + /// <summary> + /// Gets or sets The css style sheet identifier (absent for user agent stylesheet and user-specified stylesheet rules) this rule came from. + /// </summary> + public string StyleSheetId { get; set; } + /// <summary> + /// Gets or sets CSS properties in the style. + /// </summary> + public CSSProperty[] CssProperties { get; set; } + /// <summary> + /// Gets or sets Computed values for all shorthands found in the style. + /// </summary> + public ShorthandEntry[] ShorthandEntries { get; set; } + /// <summary> + /// Gets or sets Style declaration text (if available). + /// </summary> + public string CssText { get; set; } + /// <summary> + /// Gets or sets Style declaration range in the enclosing stylesheet (if available). + /// </summary> + public SourceRange Range { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/CSS/CSSStyleSheetHeader.cs b/ChromeDevTools/Protocol/CSS/CSSStyleSheetHeader.cs new file mode 100644 index 0000000000000000000000000000000000000000..0b982d1451a1d48cfa59e33bc80c93849ac23d88 --- /dev/null +++ b/ChromeDevTools/Protocol/CSS/CSSStyleSheetHeader.cs @@ -0,0 +1,60 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.CSS +{ + /// <summary> + /// CSS stylesheet metainformation. + /// </summary> + public class CSSStyleSheetHeader + { + /// <summary> + /// Gets or sets The stylesheet identifier. + /// </summary> + public string StyleSheetId { get; set; } + /// <summary> + /// Gets or sets Owner frame identifier. + /// </summary> + public string FrameId { get; set; } + /// <summary> + /// Gets or sets Stylesheet resource URL. + /// </summary> + public string SourceURL { get; set; } + /// <summary> + /// Gets or sets URL of source map associated with the stylesheet (if any). + /// </summary> + public string SourceMapURL { get; set; } + /// <summary> + /// Gets or sets Stylesheet origin. + /// </summary> + public StyleSheetOrigin Origin { get; set; } + /// <summary> + /// Gets or sets Stylesheet title. + /// </summary> + public string Title { get; set; } + /// <summary> + /// Gets or sets The backend id for the owner node of the stylesheet. + /// </summary> + public long OwnerNode { get; set; } + /// <summary> + /// Gets or sets Denotes whether the stylesheet is disabled. + /// </summary> + public bool Disabled { get; set; } + /// <summary> + /// Gets or sets Whether the sourceURL field value comes from the sourceURL comment. + /// </summary> + public bool HasSourceURL { get; set; } + /// <summary> + /// Gets or sets Whether this stylesheet is created for STYLE tag by parser. This flag is not set for document.written STYLE tags. + /// </summary> + public bool IsInline { get; set; } + /// <summary> + /// Gets or sets Line offset of the stylesheet within the resource (zero based). + /// </summary> + public double StartLine { get; set; } + /// <summary> + /// Gets or sets Column offset of the stylesheet within the resource (zero based). + /// </summary> + public double StartColumn { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/CSS/CreateStyleSheetCommand.cs b/ChromeDevTools/Protocol/CSS/CreateStyleSheetCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..9f8b3a2bab48171c2df8d215fff565bf0f620cf6 --- /dev/null +++ b/ChromeDevTools/Protocol/CSS/CreateStyleSheetCommand.cs @@ -0,0 +1,17 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.CSS +{ + /// <summary> + /// Creates a new special "via-inspector" stylesheet in the frame with given <code>frameId</code>. + /// </summary> + [Command(ProtocolName.CSS.CreateStyleSheet)] + public class CreateStyleSheetCommand + { + /// <summary> + /// Gets or sets Identifier of the frame where "via-inspector" stylesheet should be created. + /// </summary> + public string FrameId { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/CSS/CreateStyleSheetCommandResponse.cs b/ChromeDevTools/Protocol/CSS/CreateStyleSheetCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..7f9c49ed1d6add1edf0c3416395e20dea54b4815 --- /dev/null +++ b/ChromeDevTools/Protocol/CSS/CreateStyleSheetCommandResponse.cs @@ -0,0 +1,17 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.CSS +{ + /// <summary> + /// Creates a new special "via-inspector" stylesheet in the frame with given <code>frameId</code>. + /// </summary> + [CommandResponse(ProtocolName.CSS.CreateStyleSheet)] + public class CreateStyleSheetCommandResponse + { + /// <summary> + /// Gets or sets Identifier of the created "via-inspector" stylesheet. + /// </summary> + public string StyleSheetId { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/CSS/DisableCommand.cs b/ChromeDevTools/Protocol/CSS/DisableCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..2a4229af62b17fa350f1520e1b79c00afefeb683 --- /dev/null +++ b/ChromeDevTools/Protocol/CSS/DisableCommand.cs @@ -0,0 +1,13 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.CSS +{ + /// <summary> + /// Disables the CSS agent for the given page. + /// </summary> + [Command(ProtocolName.CSS.Disable)] + public class DisableCommand + { + } +} diff --git a/ChromeDevTools/Protocol/CSS/DisableCommandResponse.cs b/ChromeDevTools/Protocol/CSS/DisableCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..0a975a5d8a593f9a1a25667e1ae2d7ca81329344 --- /dev/null +++ b/ChromeDevTools/Protocol/CSS/DisableCommandResponse.cs @@ -0,0 +1,13 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.CSS +{ + /// <summary> + /// Disables the CSS agent for the given page. + /// </summary> + [CommandResponse(ProtocolName.CSS.Disable)] + public class DisableCommandResponse + { + } +} diff --git a/ChromeDevTools/Protocol/CSS/EnableCommand.cs b/ChromeDevTools/Protocol/CSS/EnableCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..14f3ca6088f85c4de46343bd1c51b1ef2ebbefb0 --- /dev/null +++ b/ChromeDevTools/Protocol/CSS/EnableCommand.cs @@ -0,0 +1,13 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.CSS +{ + /// <summary> + /// Enables the CSS agent for the given page. Clients should not assume that the CSS agent has been enabled until the result of this command is received. + /// </summary> + [Command(ProtocolName.CSS.Enable)] + public class EnableCommand + { + } +} diff --git a/ChromeDevTools/Protocol/CSS/EnableCommandResponse.cs b/ChromeDevTools/Protocol/CSS/EnableCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..fb7a1f57c7b1cda4c9c86c3aa1873a61b4d47e51 --- /dev/null +++ b/ChromeDevTools/Protocol/CSS/EnableCommandResponse.cs @@ -0,0 +1,13 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.CSS +{ + /// <summary> + /// Enables the CSS agent for the given page. Clients should not assume that the CSS agent has been enabled until the result of this command is received. + /// </summary> + [CommandResponse(ProtocolName.CSS.Enable)] + public class EnableCommandResponse + { + } +} diff --git a/ChromeDevTools/Protocol/CSS/ForcePseudoStateCommand.cs b/ChromeDevTools/Protocol/CSS/ForcePseudoStateCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..4cba711ea474cb1265988b78a4a1d6b254a726ed --- /dev/null +++ b/ChromeDevTools/Protocol/CSS/ForcePseudoStateCommand.cs @@ -0,0 +1,21 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.CSS +{ + /// <summary> + /// Ensures that the given node will have specified pseudo-classes whenever its style is computed by the browser. + /// </summary> + [Command(ProtocolName.CSS.ForcePseudoState)] + public class ForcePseudoStateCommand + { + /// <summary> + /// Gets or sets The element id for which to force the pseudo state. + /// </summary> + public long NodeId { get; set; } + /// <summary> + /// Gets or sets Element pseudo classes to force when computing the element's style. + /// </summary> + public string[] ForcedPseudoClasses { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/CSS/ForcePseudoStateCommandResponse.cs b/ChromeDevTools/Protocol/CSS/ForcePseudoStateCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..39cb9434e732f385cff1cdc3c5e02bca4fde2a72 --- /dev/null +++ b/ChromeDevTools/Protocol/CSS/ForcePseudoStateCommandResponse.cs @@ -0,0 +1,13 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.CSS +{ + /// <summary> + /// Ensures that the given node will have specified pseudo-classes whenever its style is computed by the browser. + /// </summary> + [CommandResponse(ProtocolName.CSS.ForcePseudoState)] + public class ForcePseudoStateCommandResponse + { + } +} diff --git a/ChromeDevTools/Protocol/CSS/GetComputedStyleForNodeCommand.cs b/ChromeDevTools/Protocol/CSS/GetComputedStyleForNodeCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..2fd5215224bea43ef97c5b1f4e832f27a7818ea4 --- /dev/null +++ b/ChromeDevTools/Protocol/CSS/GetComputedStyleForNodeCommand.cs @@ -0,0 +1,17 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.CSS +{ + /// <summary> + /// Returns the computed style for a DOM node identified by <code>nodeId</code>. + /// </summary> + [Command(ProtocolName.CSS.GetComputedStyleForNode)] + public class GetComputedStyleForNodeCommand + { + /// <summary> + /// Gets or sets NodeId + /// </summary> + public long NodeId { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/CSS/GetComputedStyleForNodeCommandResponse.cs b/ChromeDevTools/Protocol/CSS/GetComputedStyleForNodeCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..977f703b656b504939caa7c372f12386ccea5ff2 --- /dev/null +++ b/ChromeDevTools/Protocol/CSS/GetComputedStyleForNodeCommandResponse.cs @@ -0,0 +1,17 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.CSS +{ + /// <summary> + /// Returns the computed style for a DOM node identified by <code>nodeId</code>. + /// </summary> + [CommandResponse(ProtocolName.CSS.GetComputedStyleForNode)] + public class GetComputedStyleForNodeCommandResponse + { + /// <summary> + /// Gets or sets Computed style for the specified DOM node. + /// </summary> + public CSSComputedStyleProperty[] ComputedStyle { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/CSS/GetInlineStylesForNodeCommand.cs b/ChromeDevTools/Protocol/CSS/GetInlineStylesForNodeCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..09ada247d448c48f39c9eb0ecb4667e3a7ba1253 --- /dev/null +++ b/ChromeDevTools/Protocol/CSS/GetInlineStylesForNodeCommand.cs @@ -0,0 +1,17 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.CSS +{ + /// <summary> + /// Returns the styles defined inline (explicitly in the "style" attribute and implicitly, using DOM attributes) for a DOM node identified by <code>nodeId</code>. + /// </summary> + [Command(ProtocolName.CSS.GetInlineStylesForNode)] + public class GetInlineStylesForNodeCommand + { + /// <summary> + /// Gets or sets NodeId + /// </summary> + public long NodeId { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/CSS/GetInlineStylesForNodeCommandResponse.cs b/ChromeDevTools/Protocol/CSS/GetInlineStylesForNodeCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..25a52f82544bbcdd48dc9c37a81f247b45c40f16 --- /dev/null +++ b/ChromeDevTools/Protocol/CSS/GetInlineStylesForNodeCommandResponse.cs @@ -0,0 +1,21 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.CSS +{ + /// <summary> + /// Returns the styles defined inline (explicitly in the "style" attribute and implicitly, using DOM attributes) for a DOM node identified by <code>nodeId</code>. + /// </summary> + [CommandResponse(ProtocolName.CSS.GetInlineStylesForNode)] + public class GetInlineStylesForNodeCommandResponse + { + /// <summary> + /// Gets or sets Inline style for the specified DOM node. + /// </summary> + public CSSStyle InlineStyle { get; set; } + /// <summary> + /// Gets or sets Attribute-defined element style (e.g. resulting from "width=20 height=100%"). + /// </summary> + public CSSStyle AttributesStyle { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/CSS/GetMatchedStylesForNodeCommand.cs b/ChromeDevTools/Protocol/CSS/GetMatchedStylesForNodeCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..5878b60b4f3af908fb603f7012f82118d3188da6 --- /dev/null +++ b/ChromeDevTools/Protocol/CSS/GetMatchedStylesForNodeCommand.cs @@ -0,0 +1,25 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.CSS +{ + /// <summary> + /// Returns requested styles for a DOM node identified by <code>nodeId</code>. + /// </summary> + [Command(ProtocolName.CSS.GetMatchedStylesForNode)] + public class GetMatchedStylesForNodeCommand + { + /// <summary> + /// Gets or sets NodeId + /// </summary> + public long NodeId { get; set; } + /// <summary> + /// Gets or sets Whether to exclude pseudo styles (default: false). + /// </summary> + public bool ExcludePseudo { get; set; } + /// <summary> + /// Gets or sets Whether to exclude inherited styles (default: false). + /// </summary> + public bool ExcludeInherited { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/CSS/GetMatchedStylesForNodeCommandResponse.cs b/ChromeDevTools/Protocol/CSS/GetMatchedStylesForNodeCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..3526b35b4aa779fbbb579950923e471d1049eb28 --- /dev/null +++ b/ChromeDevTools/Protocol/CSS/GetMatchedStylesForNodeCommandResponse.cs @@ -0,0 +1,25 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.CSS +{ + /// <summary> + /// Returns requested styles for a DOM node identified by <code>nodeId</code>. + /// </summary> + [CommandResponse(ProtocolName.CSS.GetMatchedStylesForNode)] + public class GetMatchedStylesForNodeCommandResponse + { + /// <summary> + /// Gets or sets CSS rules matching this node, from all applicable stylesheets. + /// </summary> + public RuleMatch[] MatchedCSSRules { get; set; } + /// <summary> + /// Gets or sets Pseudo style matches for this node. + /// </summary> + public PseudoIdMatches[] PseudoElements { get; set; } + /// <summary> + /// Gets or sets A chain of inherited styles (from the immediate node parent up to the DOM tree root). + /// </summary> + public InheritedStyleEntry[] Inherited { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/CSS/GetMediaQueriesCommand.cs b/ChromeDevTools/Protocol/CSS/GetMediaQueriesCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..f84d5c83480d1be5541100b7735fe5f0f1334ead --- /dev/null +++ b/ChromeDevTools/Protocol/CSS/GetMediaQueriesCommand.cs @@ -0,0 +1,13 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.CSS +{ + /// <summary> + /// Returns all media queries parsed by the rendering engine. + /// </summary> + [Command(ProtocolName.CSS.GetMediaQueries)] + public class GetMediaQueriesCommand + { + } +} diff --git a/ChromeDevTools/Protocol/CSS/GetMediaQueriesCommandResponse.cs b/ChromeDevTools/Protocol/CSS/GetMediaQueriesCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..1a215a52d731249aae9ff1f1fe5ab82f907b6ff7 --- /dev/null +++ b/ChromeDevTools/Protocol/CSS/GetMediaQueriesCommandResponse.cs @@ -0,0 +1,17 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.CSS +{ + /// <summary> + /// Returns all media queries parsed by the rendering engine. + /// </summary> + [CommandResponse(ProtocolName.CSS.GetMediaQueries)] + public class GetMediaQueriesCommandResponse + { + /// <summary> + /// Gets or sets Medias + /// </summary> + public CSSMedia[] Medias { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/CSS/GetPlatformFontsForNodeCommand.cs b/ChromeDevTools/Protocol/CSS/GetPlatformFontsForNodeCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..5146459f620299ba4dea62d2e041f53de862def9 --- /dev/null +++ b/ChromeDevTools/Protocol/CSS/GetPlatformFontsForNodeCommand.cs @@ -0,0 +1,17 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.CSS +{ + /// <summary> + /// Requests information about platform fonts which we used to render child TextNodes in the given node. + /// </summary> + [Command(ProtocolName.CSS.GetPlatformFontsForNode)] + public class GetPlatformFontsForNodeCommand + { + /// <summary> + /// Gets or sets NodeId + /// </summary> + public long NodeId { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/CSS/GetPlatformFontsForNodeCommandResponse.cs b/ChromeDevTools/Protocol/CSS/GetPlatformFontsForNodeCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..8bd67043eea5b341272a3a163e178fc2358a5d18 --- /dev/null +++ b/ChromeDevTools/Protocol/CSS/GetPlatformFontsForNodeCommandResponse.cs @@ -0,0 +1,21 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.CSS +{ + /// <summary> + /// Requests information about platform fonts which we used to render child TextNodes in the given node. + /// </summary> + [CommandResponse(ProtocolName.CSS.GetPlatformFontsForNode)] + public class GetPlatformFontsForNodeCommandResponse + { + /// <summary> + /// Gets or sets Font family name which is determined by computed style. + /// </summary> + public string CssFamilyName { get; set; } + /// <summary> + /// Gets or sets Usage statistics for every employed platform font. + /// </summary> + public PlatformFontUsage[] Fonts { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/CSS/GetStyleSheetTextCommand.cs b/ChromeDevTools/Protocol/CSS/GetStyleSheetTextCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..9fc89bff6f4cd738e01fec2d5e5aea2f18315fe8 --- /dev/null +++ b/ChromeDevTools/Protocol/CSS/GetStyleSheetTextCommand.cs @@ -0,0 +1,17 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.CSS +{ + /// <summary> + /// Returns the current textual content and the URL for a stylesheet. + /// </summary> + [Command(ProtocolName.CSS.GetStyleSheetText)] + public class GetStyleSheetTextCommand + { + /// <summary> + /// Gets or sets StyleSheetId + /// </summary> + public string StyleSheetId { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/CSS/GetStyleSheetTextCommandResponse.cs b/ChromeDevTools/Protocol/CSS/GetStyleSheetTextCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..f6304391a02c3f7d80dd2dcca4a7b6b110c3993b --- /dev/null +++ b/ChromeDevTools/Protocol/CSS/GetStyleSheetTextCommandResponse.cs @@ -0,0 +1,17 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.CSS +{ + /// <summary> + /// Returns the current textual content and the URL for a stylesheet. + /// </summary> + [CommandResponse(ProtocolName.CSS.GetStyleSheetText)] + public class GetStyleSheetTextCommandResponse + { + /// <summary> + /// Gets or sets The stylesheet text. + /// </summary> + public string Text { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/CSS/InheritedStyleEntry.cs b/ChromeDevTools/Protocol/CSS/InheritedStyleEntry.cs new file mode 100644 index 0000000000000000000000000000000000000000..c2a299a9e149bf893c51896e15bdad08b1a20931 --- /dev/null +++ b/ChromeDevTools/Protocol/CSS/InheritedStyleEntry.cs @@ -0,0 +1,20 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.CSS +{ + /// <summary> + /// Inherited CSS rule collection from ancestor node. + /// </summary> + public class InheritedStyleEntry + { + /// <summary> + /// Gets or sets The ancestor node's inline style, if any, in the style inheritance chain. + /// </summary> + public CSSStyle InlineStyle { get; set; } + /// <summary> + /// Gets or sets Matches of CSS rules matching the ancestor node in the style inheritance chain. + /// </summary> + public RuleMatch[] MatchedCSSRules { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/CSS/MediaQuery.cs b/ChromeDevTools/Protocol/CSS/MediaQuery.cs new file mode 100644 index 0000000000000000000000000000000000000000..ee95052e0e36a312c44b139d564b7b98d7264e08 --- /dev/null +++ b/ChromeDevTools/Protocol/CSS/MediaQuery.cs @@ -0,0 +1,20 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.CSS +{ + /// <summary> + /// Media query descriptor. + /// </summary> + public class MediaQuery + { + /// <summary> + /// Gets or sets Array of media query expressions. + /// </summary> + public MediaQueryExpression[] Expressions { get; set; } + /// <summary> + /// Gets or sets Whether the media query condition is satisfied. + /// </summary> + public bool Active { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/CSS/MediaQueryExpression.cs b/ChromeDevTools/Protocol/CSS/MediaQueryExpression.cs new file mode 100644 index 0000000000000000000000000000000000000000..26c27b906e39fd8fbf967edf2b79d83d1da5dd94 --- /dev/null +++ b/ChromeDevTools/Protocol/CSS/MediaQueryExpression.cs @@ -0,0 +1,32 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.CSS +{ + /// <summary> + /// Media query expression descriptor. + /// </summary> + public class MediaQueryExpression + { + /// <summary> + /// Gets or sets Media query expression value. + /// </summary> + public double Value { get; set; } + /// <summary> + /// Gets or sets Media query expression units. + /// </summary> + public string Unit { get; set; } + /// <summary> + /// Gets or sets Media query expression feature. + /// </summary> + public string Feature { get; set; } + /// <summary> + /// Gets or sets The associated range of the value text in the enclosing stylesheet (if available). + /// </summary> + public SourceRange ValueRange { get; set; } + /// <summary> + /// Gets or sets Computed length of media query expression (if applicable). + /// </summary> + public double ComputedLength { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/CSS/MediaQueryResultChangedEvent.cs b/ChromeDevTools/Protocol/CSS/MediaQueryResultChangedEvent.cs new file mode 100644 index 0000000000000000000000000000000000000000..b8b59e025abd56b41cdde972db2ad19334f1447f --- /dev/null +++ b/ChromeDevTools/Protocol/CSS/MediaQueryResultChangedEvent.cs @@ -0,0 +1,12 @@ +using ChromeDevTools; + +namespace ChromeDevTools.Protocol.CSS +{ + /// <summary> + /// Fires whenever a MediaQuery result changes (for example, after a browser window has been resized.) The current implementation considers only viewport-dependent media features. + /// </summary> + [Event(ProtocolName.CSS.MediaQueryResultChanged)] + public class MediaQueryResultChangedEvent + { + } +} diff --git a/ChromeDevTools/Protocol/CSS/PlatformFontUsage.cs b/ChromeDevTools/Protocol/CSS/PlatformFontUsage.cs new file mode 100644 index 0000000000000000000000000000000000000000..4521e3dc2b8f682ad47cf180b3d70d974ecb7052 --- /dev/null +++ b/ChromeDevTools/Protocol/CSS/PlatformFontUsage.cs @@ -0,0 +1,20 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.CSS +{ + /// <summary> + /// Information about amount of glyphs that were rendered with given font. + /// </summary> + public class PlatformFontUsage + { + /// <summary> + /// Gets or sets Font's family name reported by platform. + /// </summary> + public string FamilyName { get; set; } + /// <summary> + /// Gets or sets Amount of glyphs that were rendered with this font. + /// </summary> + public double GlyphCount { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/CSS/PseudoIdMatches.cs b/ChromeDevTools/Protocol/CSS/PseudoIdMatches.cs new file mode 100644 index 0000000000000000000000000000000000000000..13b997aeba2d9637ecec048541236574b3bc77bc --- /dev/null +++ b/ChromeDevTools/Protocol/CSS/PseudoIdMatches.cs @@ -0,0 +1,20 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.CSS +{ + /// <summary> + /// CSS rule collection for a single pseudo style. + /// </summary> + public class PseudoIdMatches + { + /// <summary> + /// Gets or sets Pseudo style identifier (see <code>enum PseudoId</code> in <code>ComputedStyleConstants.h</code>). + /// </summary> + public long PseudoId { get; set; } + /// <summary> + /// Gets or sets Matches of CSS rules applicable to the pseudo style. + /// </summary> + public RuleMatch[] Matches { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/CSS/RuleMatch.cs b/ChromeDevTools/Protocol/CSS/RuleMatch.cs new file mode 100644 index 0000000000000000000000000000000000000000..bf619d9f4bd8ed5a2e211a553cda2854f2cf1f55 --- /dev/null +++ b/ChromeDevTools/Protocol/CSS/RuleMatch.cs @@ -0,0 +1,20 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.CSS +{ + /// <summary> + /// Match data for a CSS rule. + /// </summary> + public class RuleMatch + { + /// <summary> + /// Gets or sets CSS rule in the match. + /// </summary> + public CSSRule Rule { get; set; } + /// <summary> + /// Gets or sets Matching selector indices in the rule's selectorList selectors (0-based). + /// </summary> + public long[] MatchingSelectors { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/CSS/Selector.cs b/ChromeDevTools/Protocol/CSS/Selector.cs new file mode 100644 index 0000000000000000000000000000000000000000..39e2f3c8b96634cb04ba43d3ebb563c453f1f24a --- /dev/null +++ b/ChromeDevTools/Protocol/CSS/Selector.cs @@ -0,0 +1,20 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.CSS +{ + /// <summary> + /// Data for a simple selector (these are delimited by commas in a selector list). + /// </summary> + public class Selector + { + /// <summary> + /// Gets or sets Selector text. + /// </summary> + public string Value { get; set; } + /// <summary> + /// Gets or sets Selector range in the underlying resource (if available). + /// </summary> + public SourceRange Range { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/CSS/SelectorList.cs b/ChromeDevTools/Protocol/CSS/SelectorList.cs new file mode 100644 index 0000000000000000000000000000000000000000..d63b6120a60c1d150b732f82b6ab34e932a73f06 --- /dev/null +++ b/ChromeDevTools/Protocol/CSS/SelectorList.cs @@ -0,0 +1,20 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.CSS +{ + /// <summary> + /// Selector list data. + /// </summary> + public class SelectorList + { + /// <summary> + /// Gets or sets Selectors in the list. + /// </summary> + public Selector[] Selectors { get; set; } + /// <summary> + /// Gets or sets Rule selector text. + /// </summary> + public string Text { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/CSS/SetMediaTextCommand.cs b/ChromeDevTools/Protocol/CSS/SetMediaTextCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..28442a52ea37b7208d6afd0c632716de6949ff46 --- /dev/null +++ b/ChromeDevTools/Protocol/CSS/SetMediaTextCommand.cs @@ -0,0 +1,25 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.CSS +{ + /// <summary> + /// Modifies the rule selector. + /// </summary> + [Command(ProtocolName.CSS.SetMediaText)] + public class SetMediaTextCommand + { + /// <summary> + /// Gets or sets StyleSheetId + /// </summary> + public string StyleSheetId { get; set; } + /// <summary> + /// Gets or sets Range + /// </summary> + public SourceRange Range { get; set; } + /// <summary> + /// Gets or sets Text + /// </summary> + public string Text { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/CSS/SetMediaTextCommandResponse.cs b/ChromeDevTools/Protocol/CSS/SetMediaTextCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..8e38adbebb6e66c1cf8ca0c5957cb5d3ec3072ac --- /dev/null +++ b/ChromeDevTools/Protocol/CSS/SetMediaTextCommandResponse.cs @@ -0,0 +1,17 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.CSS +{ + /// <summary> + /// Modifies the rule selector. + /// </summary> + [CommandResponse(ProtocolName.CSS.SetMediaText)] + public class SetMediaTextCommandResponse + { + /// <summary> + /// Gets or sets The resulting CSS media rule after modification. + /// </summary> + public CSSMedia Media { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/CSS/SetPropertyTextCommand.cs b/ChromeDevTools/Protocol/CSS/SetPropertyTextCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..dbe266e6c9c6aa222cb5f1488b99b83393f7e8a7 --- /dev/null +++ b/ChromeDevTools/Protocol/CSS/SetPropertyTextCommand.cs @@ -0,0 +1,25 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.CSS +{ + /// <summary> + /// Either replaces a property identified by <code>styleSheetId</code> and <code>range</code> with <code>text</code> or inserts a new property <code>text</code> at the position identified by an empty <code>range</code>. + /// </summary> + [Command(ProtocolName.CSS.SetPropertyText)] + public class SetPropertyTextCommand + { + /// <summary> + /// Gets or sets StyleSheetId + /// </summary> + public string StyleSheetId { get; set; } + /// <summary> + /// Gets or sets Either a source range of the property to be edited or an empty range representing a position for the property insertion. + /// </summary> + public SourceRange Range { get; set; } + /// <summary> + /// Gets or sets Text + /// </summary> + public string Text { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/CSS/SetPropertyTextCommandResponse.cs b/ChromeDevTools/Protocol/CSS/SetPropertyTextCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..1bca03a154f86ab4d6ba682c9e0e954f55c5fac7 --- /dev/null +++ b/ChromeDevTools/Protocol/CSS/SetPropertyTextCommandResponse.cs @@ -0,0 +1,17 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.CSS +{ + /// <summary> + /// Either replaces a property identified by <code>styleSheetId</code> and <code>range</code> with <code>text</code> or inserts a new property <code>text</code> at the position identified by an empty <code>range</code>. + /// </summary> + [CommandResponse(ProtocolName.CSS.SetPropertyText)] + public class SetPropertyTextCommandResponse + { + /// <summary> + /// Gets or sets The resulting style after the property text modification. + /// </summary> + public CSSStyle Style { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/CSS/SetRuleSelectorCommand.cs b/ChromeDevTools/Protocol/CSS/SetRuleSelectorCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..0b991e6353c5dee41de4572359b6e44597723094 --- /dev/null +++ b/ChromeDevTools/Protocol/CSS/SetRuleSelectorCommand.cs @@ -0,0 +1,25 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.CSS +{ + /// <summary> + /// Modifies the rule selector. + /// </summary> + [Command(ProtocolName.CSS.SetRuleSelector)] + public class SetRuleSelectorCommand + { + /// <summary> + /// Gets or sets StyleSheetId + /// </summary> + public string StyleSheetId { get; set; } + /// <summary> + /// Gets or sets Range + /// </summary> + public SourceRange Range { get; set; } + /// <summary> + /// Gets or sets Selector + /// </summary> + public string Selector { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/CSS/SetRuleSelectorCommandResponse.cs b/ChromeDevTools/Protocol/CSS/SetRuleSelectorCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..d6ad3f24afec1de33b778a31057792902afbf46d --- /dev/null +++ b/ChromeDevTools/Protocol/CSS/SetRuleSelectorCommandResponse.cs @@ -0,0 +1,17 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.CSS +{ + /// <summary> + /// Modifies the rule selector. + /// </summary> + [CommandResponse(ProtocolName.CSS.SetRuleSelector)] + public class SetRuleSelectorCommandResponse + { + /// <summary> + /// Gets or sets The resulting rule after the selector modification. + /// </summary> + public CSSRule Rule { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/CSS/SetStyleSheetTextCommand.cs b/ChromeDevTools/Protocol/CSS/SetStyleSheetTextCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..02ec42e622bc21b39958b062ec59cb0cda587d40 --- /dev/null +++ b/ChromeDevTools/Protocol/CSS/SetStyleSheetTextCommand.cs @@ -0,0 +1,21 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.CSS +{ + /// <summary> + /// Sets the new stylesheet text. + /// </summary> + [Command(ProtocolName.CSS.SetStyleSheetText)] + public class SetStyleSheetTextCommand + { + /// <summary> + /// Gets or sets StyleSheetId + /// </summary> + public string StyleSheetId { get; set; } + /// <summary> + /// Gets or sets Text + /// </summary> + public string Text { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/CSS/SetStyleSheetTextCommandResponse.cs b/ChromeDevTools/Protocol/CSS/SetStyleSheetTextCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..18934ad3e21b2733673037f5cf3f4c9931aa200a --- /dev/null +++ b/ChromeDevTools/Protocol/CSS/SetStyleSheetTextCommandResponse.cs @@ -0,0 +1,13 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.CSS +{ + /// <summary> + /// Sets the new stylesheet text. + /// </summary> + [CommandResponse(ProtocolName.CSS.SetStyleSheetText)] + public class SetStyleSheetTextCommandResponse + { + } +} diff --git a/ChromeDevTools/Protocol/CSS/ShorthandEntry.cs b/ChromeDevTools/Protocol/CSS/ShorthandEntry.cs new file mode 100644 index 0000000000000000000000000000000000000000..8ee6197d98b63297b3296a9bffec035f9d35556e --- /dev/null +++ b/ChromeDevTools/Protocol/CSS/ShorthandEntry.cs @@ -0,0 +1,20 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.CSS +{ + /// <summary> + /// + /// </summary> + public class ShorthandEntry + { + /// <summary> + /// Gets or sets Shorthand name. + /// </summary> + public string Name { get; set; } + /// <summary> + /// Gets or sets Shorthand value. + /// </summary> + public string Value { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/CSS/SourceRange.cs b/ChromeDevTools/Protocol/CSS/SourceRange.cs new file mode 100644 index 0000000000000000000000000000000000000000..47041b086d965b9ab9f73b4bfb5b04c951b81192 --- /dev/null +++ b/ChromeDevTools/Protocol/CSS/SourceRange.cs @@ -0,0 +1,28 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.CSS +{ + /// <summary> + /// Text range within a resource. All numbers are zero-based. + /// </summary> + public class SourceRange + { + /// <summary> + /// Gets or sets Start line of range. + /// </summary> + public long StartLine { get; set; } + /// <summary> + /// Gets or sets Start column of range (inclusive). + /// </summary> + public long StartColumn { get; set; } + /// <summary> + /// Gets or sets End line of range + /// </summary> + public long EndLine { get; set; } + /// <summary> + /// Gets or sets End column of range (exclusive). + /// </summary> + public long EndColumn { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/CSS/StyleSheetAddedEvent.cs b/ChromeDevTools/Protocol/CSS/StyleSheetAddedEvent.cs new file mode 100644 index 0000000000000000000000000000000000000000..2fde6c2041cc357de2272c005c8844a03a60508e --- /dev/null +++ b/ChromeDevTools/Protocol/CSS/StyleSheetAddedEvent.cs @@ -0,0 +1,16 @@ +using ChromeDevTools; + +namespace ChromeDevTools.Protocol.CSS +{ + /// <summary> + /// Fired whenever an active document stylesheet is added. + /// </summary> + [Event(ProtocolName.CSS.StyleSheetAdded)] + public class StyleSheetAddedEvent + { + /// <summary> + /// Gets or sets Added stylesheet metainfo. + /// </summary> + public CSSStyleSheetHeader Header { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/CSS/StyleSheetChangedEvent.cs b/ChromeDevTools/Protocol/CSS/StyleSheetChangedEvent.cs new file mode 100644 index 0000000000000000000000000000000000000000..06cacf945c3a73feebf5244d0cbaf17f94fde736 --- /dev/null +++ b/ChromeDevTools/Protocol/CSS/StyleSheetChangedEvent.cs @@ -0,0 +1,16 @@ +using ChromeDevTools; + +namespace ChromeDevTools.Protocol.CSS +{ + /// <summary> + /// Fired whenever a stylesheet is changed as a result of the client operation. + /// </summary> + [Event(ProtocolName.CSS.StyleSheetChanged)] + public class StyleSheetChangedEvent + { + /// <summary> + /// Gets or sets StyleSheetId + /// </summary> + public string StyleSheetId { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/CSS/StyleSheetOrigin.cs b/ChromeDevTools/Protocol/CSS/StyleSheetOrigin.cs new file mode 100644 index 0000000000000000000000000000000000000000..358a1bcd7cc60aa12a4148c7ac95c891287e4b6b --- /dev/null +++ b/ChromeDevTools/Protocol/CSS/StyleSheetOrigin.cs @@ -0,0 +1,14 @@ +using ChromeDevTools; + +namespace ChromeDevTools.Protocol.CSS{ + /// <summary> + /// Stylesheet type: "injected" for stylesheets injected via extension, "user-agent" for user-agent stylesheets, "inspector" for stylesheets created by the inspector (i.e. those holding the "via inspector" rules), "regular" for regular stylesheets. + /// </summary> + public enum StyleSheetOrigin + { + Injected, + User_agent, + Inspector, + Regular, + } +} diff --git a/ChromeDevTools/Protocol/CSS/StyleSheetRemovedEvent.cs b/ChromeDevTools/Protocol/CSS/StyleSheetRemovedEvent.cs new file mode 100644 index 0000000000000000000000000000000000000000..ed93ea3ce2c515322d0178a01ff7569d2f91fe0c --- /dev/null +++ b/ChromeDevTools/Protocol/CSS/StyleSheetRemovedEvent.cs @@ -0,0 +1,16 @@ +using ChromeDevTools; + +namespace ChromeDevTools.Protocol.CSS +{ + /// <summary> + /// Fired whenever an active document stylesheet is removed. + /// </summary> + [Event(ProtocolName.CSS.StyleSheetRemoved)] + public class StyleSheetRemovedEvent + { + /// <summary> + /// Gets or sets Identifier of the removed stylesheet. + /// </summary> + public string StyleSheetId { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/CacheStorage/Cache.cs b/ChromeDevTools/Protocol/CacheStorage/Cache.cs new file mode 100644 index 0000000000000000000000000000000000000000..0fc0ac2ef5bd4625b1cc8715de7436a641831819 --- /dev/null +++ b/ChromeDevTools/Protocol/CacheStorage/Cache.cs @@ -0,0 +1,24 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.CacheStorage +{ + /// <summary> + /// Cache identifier. + /// </summary> + public class Cache + { + /// <summary> + /// Gets or sets An opaque unique id of the cache. + /// </summary> + public string CacheId { get; set; } + /// <summary> + /// Gets or sets Security origin of the cache. + /// </summary> + public string SecurityOrigin { get; set; } + /// <summary> + /// Gets or sets The name of the cache. + /// </summary> + public string CacheName { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/CacheStorage/DataEntry.cs b/ChromeDevTools/Protocol/CacheStorage/DataEntry.cs new file mode 100644 index 0000000000000000000000000000000000000000..978832f8d9b5e00c983417dc3c5f826f482e8ebe --- /dev/null +++ b/ChromeDevTools/Protocol/CacheStorage/DataEntry.cs @@ -0,0 +1,20 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.CacheStorage +{ + /// <summary> + /// Data entry. + /// </summary> + public class DataEntry + { + /// <summary> + /// Gets or sets JSON-stringified request object. + /// </summary> + public string Request { get; set; } + /// <summary> + /// Gets or sets JSON-stringified response object. + /// </summary> + public string Response { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/CacheStorage/DeleteCacheCommand.cs b/ChromeDevTools/Protocol/CacheStorage/DeleteCacheCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..fe5f63c4d9896a7c37e0a29c023afadd20d39d30 --- /dev/null +++ b/ChromeDevTools/Protocol/CacheStorage/DeleteCacheCommand.cs @@ -0,0 +1,17 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.CacheStorage +{ + /// <summary> + /// Deletes a cache. + /// </summary> + [Command(ProtocolName.CacheStorage.DeleteCache)] + public class DeleteCacheCommand + { + /// <summary> + /// Gets or sets Id of cache for deletion. + /// </summary> + public string CacheId { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/CacheStorage/DeleteCacheCommandResponse.cs b/ChromeDevTools/Protocol/CacheStorage/DeleteCacheCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..7ee50ae7e9d402cd652b059640cff31624aed74f --- /dev/null +++ b/ChromeDevTools/Protocol/CacheStorage/DeleteCacheCommandResponse.cs @@ -0,0 +1,13 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.CacheStorage +{ + /// <summary> + /// Deletes a cache. + /// </summary> + [CommandResponse(ProtocolName.CacheStorage.DeleteCache)] + public class DeleteCacheCommandResponse + { + } +} diff --git a/ChromeDevTools/Protocol/CacheStorage/RequestCacheNamesCommand.cs b/ChromeDevTools/Protocol/CacheStorage/RequestCacheNamesCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..0b496854feb6925bfba7cd002762ce9a85688672 --- /dev/null +++ b/ChromeDevTools/Protocol/CacheStorage/RequestCacheNamesCommand.cs @@ -0,0 +1,17 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.CacheStorage +{ + /// <summary> + /// Requests cache names. + /// </summary> + [Command(ProtocolName.CacheStorage.RequestCacheNames)] + public class RequestCacheNamesCommand + { + /// <summary> + /// Gets or sets Security origin. + /// </summary> + public string SecurityOrigin { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/CacheStorage/RequestCacheNamesCommandResponse.cs b/ChromeDevTools/Protocol/CacheStorage/RequestCacheNamesCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..31c5eac74585a2f939da5bf3b20c6a9ab7bbbd1c --- /dev/null +++ b/ChromeDevTools/Protocol/CacheStorage/RequestCacheNamesCommandResponse.cs @@ -0,0 +1,17 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.CacheStorage +{ + /// <summary> + /// Requests cache names. + /// </summary> + [CommandResponse(ProtocolName.CacheStorage.RequestCacheNames)] + public class RequestCacheNamesCommandResponse + { + /// <summary> + /// Gets or sets Caches for the security origin. + /// </summary> + public Cache[] Caches { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/CacheStorage/RequestEntriesCommand.cs b/ChromeDevTools/Protocol/CacheStorage/RequestEntriesCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..9f09b7e33b365057d1d6863fea09e7dde0c18cc7 --- /dev/null +++ b/ChromeDevTools/Protocol/CacheStorage/RequestEntriesCommand.cs @@ -0,0 +1,25 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.CacheStorage +{ + /// <summary> + /// Requests data from cache. + /// </summary> + [Command(ProtocolName.CacheStorage.RequestEntries)] + public class RequestEntriesCommand + { + /// <summary> + /// Gets or sets ID of cache to get entries from. + /// </summary> + public string CacheId { get; set; } + /// <summary> + /// Gets or sets Number of records to skip. + /// </summary> + public long SkipCount { get; set; } + /// <summary> + /// Gets or sets Number of records to fetch. + /// </summary> + public long PageSize { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/CacheStorage/RequestEntriesCommandResponse.cs b/ChromeDevTools/Protocol/CacheStorage/RequestEntriesCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..68652e713494fd333b4d46e64d1012a784851ae9 --- /dev/null +++ b/ChromeDevTools/Protocol/CacheStorage/RequestEntriesCommandResponse.cs @@ -0,0 +1,21 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.CacheStorage +{ + /// <summary> + /// Requests data from cache. + /// </summary> + [CommandResponse(ProtocolName.CacheStorage.RequestEntries)] + public class RequestEntriesCommandResponse + { + /// <summary> + /// Gets or sets Array of object store data entries. + /// </summary> + public DataEntry[] CacheDataEntries { get; set; } + /// <summary> + /// Gets or sets If true, there are more entries to fetch in the given range. + /// </summary> + public bool HasMore { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/Canvas/Call.cs b/ChromeDevTools/Protocol/Canvas/Call.cs new file mode 100644 index 0000000000000000000000000000000000000000..5e9ef4ffe4bab05d5b162fa7893cc7e95b075a8e --- /dev/null +++ b/ChromeDevTools/Protocol/Canvas/Call.cs @@ -0,0 +1,56 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Canvas +{ + /// <summary> + /// + /// </summary> + public class Call + { + /// <summary> + /// Gets or sets ContextId + /// </summary> + public string ContextId { get; set; } + /// <summary> + /// Gets or sets FunctionName + /// </summary> + public string FunctionName { get; set; } + /// <summary> + /// Gets or sets Arguments + /// </summary> + public CallArgument[] Arguments { get; set; } + /// <summary> + /// Gets or sets Result + /// </summary> + public CallArgument Result { get; set; } + /// <summary> + /// Gets or sets IsDrawingCall + /// </summary> + public bool IsDrawingCall { get; set; } + /// <summary> + /// Gets or sets IsFrameEndCall + /// </summary> + public bool IsFrameEndCall { get; set; } + /// <summary> + /// Gets or sets Property + /// </summary> + public string Property { get; set; } + /// <summary> + /// Gets or sets Value + /// </summary> + public CallArgument Value { get; set; } + /// <summary> + /// Gets or sets SourceURL + /// </summary> + public string SourceURL { get; set; } + /// <summary> + /// Gets or sets LineNumber + /// </summary> + public long LineNumber { get; set; } + /// <summary> + /// Gets or sets ColumnNumber + /// </summary> + public long ColumnNumber { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/Canvas/CallArgument.cs b/ChromeDevTools/Protocol/Canvas/CallArgument.cs new file mode 100644 index 0000000000000000000000000000000000000000..1a09bd3dc769844acca9011abd39c571a1331e40 --- /dev/null +++ b/ChromeDevTools/Protocol/Canvas/CallArgument.cs @@ -0,0 +1,36 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Canvas +{ + /// <summary> + /// + /// </summary> + public class CallArgument + { + /// <summary> + /// Gets or sets String representation of the object. + /// </summary> + public string Description { get; set; } + /// <summary> + /// Gets or sets Enum name, if any, that stands for the value (for example, a WebGL enum name). + /// </summary> + public string EnumName { get; set; } + /// <summary> + /// Gets or sets Resource identifier. Specified for <code>Resource</code> objects only. + /// </summary> + public string ResourceId { get; set; } + /// <summary> + /// Gets or sets Object type. Specified for non <code>Resource</code> objects only. + /// </summary> + public string Type { get; set; } + /// <summary> + /// Gets or sets Object subtype hint. Specified for <code>object</code> type values only. + /// </summary> + public string Subtype { get; set; } + /// <summary> + /// Gets or sets The <code>RemoteObject</code>, if requested. + /// </summary> + public Runtime.RemoteObject RemoteObject { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/Canvas/CaptureFrameCommand.cs b/ChromeDevTools/Protocol/Canvas/CaptureFrameCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..c0b67ca9aa45c679c58d881fdb78a58b89c0a67b --- /dev/null +++ b/ChromeDevTools/Protocol/Canvas/CaptureFrameCommand.cs @@ -0,0 +1,17 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Canvas +{ + /// <summary> + /// Starts (or continues) a canvas frame capturing which will be stopped automatically after the next frame is prepared. + /// </summary> + [Command(ProtocolName.Canvas.CaptureFrame)] + public class CaptureFrameCommand + { + /// <summary> + /// Gets or sets Identifier of the frame containing document whose canvases are to be captured. If omitted, main frame is assumed. + /// </summary> + public string FrameId { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/Canvas/CaptureFrameCommandResponse.cs b/ChromeDevTools/Protocol/Canvas/CaptureFrameCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..78bba1c936dfa12abad3cec04126b9d3d13b823b --- /dev/null +++ b/ChromeDevTools/Protocol/Canvas/CaptureFrameCommandResponse.cs @@ -0,0 +1,17 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Canvas +{ + /// <summary> + /// Starts (or continues) a canvas frame capturing which will be stopped automatically after the next frame is prepared. + /// </summary> + [CommandResponse(ProtocolName.Canvas.CaptureFrame)] + public class CaptureFrameCommandResponse + { + /// <summary> + /// Gets or sets Identifier of the trace log containing captured canvas calls. + /// </summary> + public string TraceLogId { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/Canvas/ContextCreatedEvent.cs b/ChromeDevTools/Protocol/Canvas/ContextCreatedEvent.cs new file mode 100644 index 0000000000000000000000000000000000000000..7134c0244cc4c062829d4d0a1771d533fb958703 --- /dev/null +++ b/ChromeDevTools/Protocol/Canvas/ContextCreatedEvent.cs @@ -0,0 +1,16 @@ +using ChromeDevTools; + +namespace ChromeDevTools.Protocol.Canvas +{ + /// <summary> + /// Fired when a canvas context has been created in the given frame. The context may not be instrumented (see hasUninstrumentedCanvases command). + /// </summary> + [Event(ProtocolName.Canvas.ContextCreated)] + public class ContextCreatedEvent + { + /// <summary> + /// Gets or sets Identifier of the frame containing a canvas with a context. + /// </summary> + public string FrameId { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/Canvas/DisableCommand.cs b/ChromeDevTools/Protocol/Canvas/DisableCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..71d703ce0f17cfe33d46892c6e1d9400c8a4e26a --- /dev/null +++ b/ChromeDevTools/Protocol/Canvas/DisableCommand.cs @@ -0,0 +1,13 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Canvas +{ + /// <summary> + /// Disables Canvas inspection. + /// </summary> + [Command(ProtocolName.Canvas.Disable)] + public class DisableCommand + { + } +} diff --git a/ChromeDevTools/Protocol/Canvas/DisableCommandResponse.cs b/ChromeDevTools/Protocol/Canvas/DisableCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..94a8c88500583814d2446e7484d194dbd4e01600 --- /dev/null +++ b/ChromeDevTools/Protocol/Canvas/DisableCommandResponse.cs @@ -0,0 +1,13 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Canvas +{ + /// <summary> + /// Disables Canvas inspection. + /// </summary> + [CommandResponse(ProtocolName.Canvas.Disable)] + public class DisableCommandResponse + { + } +} diff --git a/ChromeDevTools/Protocol/Canvas/DropTraceLogCommand.cs b/ChromeDevTools/Protocol/Canvas/DropTraceLogCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..82671ff129a4119c3ac00e79b4369ba0b2fa8417 --- /dev/null +++ b/ChromeDevTools/Protocol/Canvas/DropTraceLogCommand.cs @@ -0,0 +1,14 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Canvas +{ + [Command(ProtocolName.Canvas.DropTraceLog)] + public class DropTraceLogCommand + { + /// <summary> + /// Gets or sets TraceLogId + /// </summary> + public string TraceLogId { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/Canvas/DropTraceLogCommandResponse.cs b/ChromeDevTools/Protocol/Canvas/DropTraceLogCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..0131ccbf39b28fb3427dd397f41a710301728921 --- /dev/null +++ b/ChromeDevTools/Protocol/Canvas/DropTraceLogCommandResponse.cs @@ -0,0 +1,10 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Canvas +{ + [CommandResponse(ProtocolName.Canvas.DropTraceLog)] + public class DropTraceLogCommandResponse + { + } +} diff --git a/ChromeDevTools/Protocol/Canvas/EnableCommand.cs b/ChromeDevTools/Protocol/Canvas/EnableCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..fa4f81b48045c90b9601452cd8513f5b50747833 --- /dev/null +++ b/ChromeDevTools/Protocol/Canvas/EnableCommand.cs @@ -0,0 +1,13 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Canvas +{ + /// <summary> + /// Enables Canvas inspection. + /// </summary> + [Command(ProtocolName.Canvas.Enable)] + public class EnableCommand + { + } +} diff --git a/ChromeDevTools/Protocol/Canvas/EnableCommandResponse.cs b/ChromeDevTools/Protocol/Canvas/EnableCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..568fd821b7d230a979bbbbf1f021c4c34aeaf2d3 --- /dev/null +++ b/ChromeDevTools/Protocol/Canvas/EnableCommandResponse.cs @@ -0,0 +1,13 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Canvas +{ + /// <summary> + /// Enables Canvas inspection. + /// </summary> + [CommandResponse(ProtocolName.Canvas.Enable)] + public class EnableCommandResponse + { + } +} diff --git a/ChromeDevTools/Protocol/Canvas/EvaluateTraceLogCallArgumentCommand.cs b/ChromeDevTools/Protocol/Canvas/EvaluateTraceLogCallArgumentCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..c3f510dd83823841dc57e96cbb20ab6720730bc3 --- /dev/null +++ b/ChromeDevTools/Protocol/Canvas/EvaluateTraceLogCallArgumentCommand.cs @@ -0,0 +1,29 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Canvas +{ + /// <summary> + /// Evaluates a given trace call argument or its result. + /// </summary> + [Command(ProtocolName.Canvas.EvaluateTraceLogCallArgument)] + public class EvaluateTraceLogCallArgumentCommand + { + /// <summary> + /// Gets or sets TraceLogId + /// </summary> + public string TraceLogId { get; set; } + /// <summary> + /// Gets or sets Index of the call to evaluate on (zero based). + /// </summary> + public long CallIndex { get; set; } + /// <summary> + /// Gets or sets Index of the argument to evaluate (zero based). Provide <code>-1</code> to evaluate call result. + /// </summary> + public long ArgumentIndex { get; set; } + /// <summary> + /// Gets or sets String object group name to put result into (allows rapid releasing resulting object handles using <code>Runtime.releaseObjectGroup</code>). + /// </summary> + public string ObjectGroup { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/Canvas/EvaluateTraceLogCallArgumentCommandResponse.cs b/ChromeDevTools/Protocol/Canvas/EvaluateTraceLogCallArgumentCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..6c2f046d6c43954b8d1b57091bb20deca6bca41d --- /dev/null +++ b/ChromeDevTools/Protocol/Canvas/EvaluateTraceLogCallArgumentCommandResponse.cs @@ -0,0 +1,21 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Canvas +{ + /// <summary> + /// Evaluates a given trace call argument or its result. + /// </summary> + [CommandResponse(ProtocolName.Canvas.EvaluateTraceLogCallArgument)] + public class EvaluateTraceLogCallArgumentCommandResponse + { + /// <summary> + /// Gets or sets Object wrapper for the evaluation result. + /// </summary> + public Runtime.RemoteObject Result { get; set; } + /// <summary> + /// Gets or sets State of the <code>Resource</code> object. + /// </summary> + public ResourceState ResourceState { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/Canvas/GetResourceStateCommand.cs b/ChromeDevTools/Protocol/Canvas/GetResourceStateCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..0edd15ff24d67425dc0e134f8e2f7dad880665a9 --- /dev/null +++ b/ChromeDevTools/Protocol/Canvas/GetResourceStateCommand.cs @@ -0,0 +1,18 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Canvas +{ + [Command(ProtocolName.Canvas.GetResourceState)] + public class GetResourceStateCommand + { + /// <summary> + /// Gets or sets TraceLogId + /// </summary> + public string TraceLogId { get; set; } + /// <summary> + /// Gets or sets ResourceId + /// </summary> + public string ResourceId { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/Canvas/GetResourceStateCommandResponse.cs b/ChromeDevTools/Protocol/Canvas/GetResourceStateCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..02c2bc10f3b74ffdaa9c401fba2af4519b634322 --- /dev/null +++ b/ChromeDevTools/Protocol/Canvas/GetResourceStateCommandResponse.cs @@ -0,0 +1,14 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Canvas +{ + [CommandResponse(ProtocolName.Canvas.GetResourceState)] + public class GetResourceStateCommandResponse + { + /// <summary> + /// Gets or sets ResourceState + /// </summary> + public ResourceState ResourceState { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/Canvas/GetTraceLogCommand.cs b/ChromeDevTools/Protocol/Canvas/GetTraceLogCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..82f66ef85e45661410b87b893d4ae97db69ecb9b --- /dev/null +++ b/ChromeDevTools/Protocol/Canvas/GetTraceLogCommand.cs @@ -0,0 +1,22 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Canvas +{ + [Command(ProtocolName.Canvas.GetTraceLog)] + public class GetTraceLogCommand + { + /// <summary> + /// Gets or sets TraceLogId + /// </summary> + public string TraceLogId { get; set; } + /// <summary> + /// Gets or sets StartOffset + /// </summary> + public long StartOffset { get; set; } + /// <summary> + /// Gets or sets MaxLength + /// </summary> + public long MaxLength { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/Canvas/GetTraceLogCommandResponse.cs b/ChromeDevTools/Protocol/Canvas/GetTraceLogCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..2ae747fafe3bd22cb9db998e0edf574d25f88287 --- /dev/null +++ b/ChromeDevTools/Protocol/Canvas/GetTraceLogCommandResponse.cs @@ -0,0 +1,14 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Canvas +{ + [CommandResponse(ProtocolName.Canvas.GetTraceLog)] + public class GetTraceLogCommandResponse + { + /// <summary> + /// Gets or sets TraceLog + /// </summary> + public TraceLog TraceLog { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/Canvas/HasUninstrumentedCanvasesCommand.cs b/ChromeDevTools/Protocol/Canvas/HasUninstrumentedCanvasesCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..31e1c72bfed1da2b7eec6da55d3c7d09211aa040 --- /dev/null +++ b/ChromeDevTools/Protocol/Canvas/HasUninstrumentedCanvasesCommand.cs @@ -0,0 +1,13 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Canvas +{ + /// <summary> + /// Checks if there is any uninstrumented canvas in the inspected page. + /// </summary> + [Command(ProtocolName.Canvas.HasUninstrumentedCanvases)] + public class HasUninstrumentedCanvasesCommand + { + } +} diff --git a/ChromeDevTools/Protocol/Canvas/HasUninstrumentedCanvasesCommandResponse.cs b/ChromeDevTools/Protocol/Canvas/HasUninstrumentedCanvasesCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..a375cc57b86c11890a6cff5629b694e3abf63b1b --- /dev/null +++ b/ChromeDevTools/Protocol/Canvas/HasUninstrumentedCanvasesCommandResponse.cs @@ -0,0 +1,17 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Canvas +{ + /// <summary> + /// Checks if there is any uninstrumented canvas in the inspected page. + /// </summary> + [CommandResponse(ProtocolName.Canvas.HasUninstrumentedCanvases)] + public class HasUninstrumentedCanvasesCommandResponse + { + /// <summary> + /// Gets or sets Result + /// </summary> + public bool Result { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/Canvas/ReplayTraceLogCommand.cs b/ChromeDevTools/Protocol/Canvas/ReplayTraceLogCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..87fcebcf98b835821c671f83c744b7a9bddb49a0 --- /dev/null +++ b/ChromeDevTools/Protocol/Canvas/ReplayTraceLogCommand.cs @@ -0,0 +1,18 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Canvas +{ + [Command(ProtocolName.Canvas.ReplayTraceLog)] + public class ReplayTraceLogCommand + { + /// <summary> + /// Gets or sets TraceLogId + /// </summary> + public string TraceLogId { get; set; } + /// <summary> + /// Gets or sets Last call index in the trace log to replay (zero based). + /// </summary> + public long StepNo { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/Canvas/ReplayTraceLogCommandResponse.cs b/ChromeDevTools/Protocol/Canvas/ReplayTraceLogCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..37bc82823ff397ac9c1a30fa99566cbef83e4001 --- /dev/null +++ b/ChromeDevTools/Protocol/Canvas/ReplayTraceLogCommandResponse.cs @@ -0,0 +1,18 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Canvas +{ + [CommandResponse(ProtocolName.Canvas.ReplayTraceLog)] + public class ReplayTraceLogCommandResponse + { + /// <summary> + /// Gets or sets ResourceState + /// </summary> + public ResourceState ResourceState { get; set; } + /// <summary> + /// Gets or sets Replay time (in milliseconds). + /// </summary> + public double ReplayTime { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/Canvas/ResourceState.cs b/ChromeDevTools/Protocol/Canvas/ResourceState.cs new file mode 100644 index 0000000000000000000000000000000000000000..f863ffa8347dea37df9729a99c9ea6b28cdc8897 --- /dev/null +++ b/ChromeDevTools/Protocol/Canvas/ResourceState.cs @@ -0,0 +1,28 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Canvas +{ + /// <summary> + /// Resource state. + /// </summary> + public class ResourceState + { + /// <summary> + /// Gets or sets Id + /// </summary> + public string Id { get; set; } + /// <summary> + /// Gets or sets TraceLogId + /// </summary> + public string TraceLogId { get; set; } + /// <summary> + /// Gets or sets Describes current <code>Resource</code> state. + /// </summary> + public ResourceStateDescriptor[] Descriptors { get; set; } + /// <summary> + /// Gets or sets Screenshot image data URL. + /// </summary> + public string ImageURL { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/Canvas/ResourceStateDescriptor.cs b/ChromeDevTools/Protocol/Canvas/ResourceStateDescriptor.cs new file mode 100644 index 0000000000000000000000000000000000000000..eb747d05bc35e2af8ce0003f65f6da745e6de6a9 --- /dev/null +++ b/ChromeDevTools/Protocol/Canvas/ResourceStateDescriptor.cs @@ -0,0 +1,32 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Canvas +{ + /// <summary> + /// Resource state descriptor. + /// </summary> + public class ResourceStateDescriptor + { + /// <summary> + /// Gets or sets State name. + /// </summary> + public string Name { get; set; } + /// <summary> + /// Gets or sets String representation of the enum value, if <code>name</code> stands for an enum. + /// </summary> + public string EnumValueForName { get; set; } + /// <summary> + /// Gets or sets The value associated with the particular state. + /// </summary> + public CallArgument Value { get; set; } + /// <summary> + /// Gets or sets Array of values associated with the particular state. Either <code>value</code> or <code>values</code> will be specified. + /// </summary> + public ResourceStateDescriptor[] Values { get; set; } + /// <summary> + /// Gets or sets True iff the given <code>values</code> items stand for an array rather than a list of grouped states. + /// </summary> + public bool IsArray { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/Canvas/StartCapturingCommand.cs b/ChromeDevTools/Protocol/Canvas/StartCapturingCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..eaccbdc7a6cc823aadcd524d917f94f79f02b814 --- /dev/null +++ b/ChromeDevTools/Protocol/Canvas/StartCapturingCommand.cs @@ -0,0 +1,17 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Canvas +{ + /// <summary> + /// Starts (or continues) consecutive canvas frames capturing. The capturing is stopped by the corresponding stopCapturing command. + /// </summary> + [Command(ProtocolName.Canvas.StartCapturing)] + public class StartCapturingCommand + { + /// <summary> + /// Gets or sets Identifier of the frame containing document whose canvases are to be captured. If omitted, main frame is assumed. + /// </summary> + public string FrameId { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/Canvas/StartCapturingCommandResponse.cs b/ChromeDevTools/Protocol/Canvas/StartCapturingCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..8385b022f242460b3573315b1f3f21dba5d9604a --- /dev/null +++ b/ChromeDevTools/Protocol/Canvas/StartCapturingCommandResponse.cs @@ -0,0 +1,17 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Canvas +{ + /// <summary> + /// Starts (or continues) consecutive canvas frames capturing. The capturing is stopped by the corresponding stopCapturing command. + /// </summary> + [CommandResponse(ProtocolName.Canvas.StartCapturing)] + public class StartCapturingCommandResponse + { + /// <summary> + /// Gets or sets Identifier of the trace log containing captured canvas calls. + /// </summary> + public string TraceLogId { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/Canvas/StopCapturingCommand.cs b/ChromeDevTools/Protocol/Canvas/StopCapturingCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..a03392b7b3302e32d5def3f93f2d4d27d5e7dc51 --- /dev/null +++ b/ChromeDevTools/Protocol/Canvas/StopCapturingCommand.cs @@ -0,0 +1,14 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Canvas +{ + [Command(ProtocolName.Canvas.StopCapturing)] + public class StopCapturingCommand + { + /// <summary> + /// Gets or sets TraceLogId + /// </summary> + public string TraceLogId { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/Canvas/StopCapturingCommandResponse.cs b/ChromeDevTools/Protocol/Canvas/StopCapturingCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..d457feede7dd33d890e3a851506d87cf0eca12c3 --- /dev/null +++ b/ChromeDevTools/Protocol/Canvas/StopCapturingCommandResponse.cs @@ -0,0 +1,10 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Canvas +{ + [CommandResponse(ProtocolName.Canvas.StopCapturing)] + public class StopCapturingCommandResponse + { + } +} diff --git a/ChromeDevTools/Protocol/Canvas/TraceLog.cs b/ChromeDevTools/Protocol/Canvas/TraceLog.cs new file mode 100644 index 0000000000000000000000000000000000000000..e650da692e66d1c86794c69346302a79ab27feac --- /dev/null +++ b/ChromeDevTools/Protocol/Canvas/TraceLog.cs @@ -0,0 +1,36 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Canvas +{ + /// <summary> + /// + /// </summary> + public class TraceLog + { + /// <summary> + /// Gets or sets Id + /// </summary> + public string Id { get; set; } + /// <summary> + /// Gets or sets Calls + /// </summary> + public Call[] Calls { get; set; } + /// <summary> + /// Gets or sets Contexts + /// </summary> + public CallArgument[] Contexts { get; set; } + /// <summary> + /// Gets or sets StartOffset + /// </summary> + public long StartOffset { get; set; } + /// <summary> + /// Gets or sets Alive + /// </summary> + public bool Alive { get; set; } + /// <summary> + /// Gets or sets TotalAvailableCalls + /// </summary> + public double TotalAvailableCalls { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/Canvas/TraceLogsRemovedEvent.cs b/ChromeDevTools/Protocol/Canvas/TraceLogsRemovedEvent.cs new file mode 100644 index 0000000000000000000000000000000000000000..5fe1f8f3be01c14789060843fe7902cef9ff02bc --- /dev/null +++ b/ChromeDevTools/Protocol/Canvas/TraceLogsRemovedEvent.cs @@ -0,0 +1,20 @@ +using ChromeDevTools; + +namespace ChromeDevTools.Protocol.Canvas +{ + /// <summary> + /// Fired when a set of trace logs were removed from the backend. If no parameters are given, all trace logs were removed. + /// </summary> + [Event(ProtocolName.Canvas.TraceLogsRemoved)] + public class TraceLogsRemovedEvent + { + /// <summary> + /// Gets or sets If given, trace logs from the given frame were removed. + /// </summary> + public string FrameId { get; set; } + /// <summary> + /// Gets or sets If given, trace log with the given ID was removed. + /// </summary> + public string TraceLogId { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/Console/AsyncStackTrace.cs b/ChromeDevTools/Protocol/Console/AsyncStackTrace.cs new file mode 100644 index 0000000000000000000000000000000000000000..45e7dc17cda53ed18d4823e004d7ed6350786c3a --- /dev/null +++ b/ChromeDevTools/Protocol/Console/AsyncStackTrace.cs @@ -0,0 +1,25 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Console +{ + /// <summary> + /// Asynchronous JavaScript call stack. + /// </summary> + public class AsyncStackTrace + { + /// <summary> + /// Gets or sets Call frames of the stack trace. + /// </summary> + public CallFrame[] CallFrames { get; set; } + /// <summary> + /// Gets or sets String label of this stack trace. For async traces this may be a name of the function that initiated the async call. + /// </summary> + public string Description { get; set; } + /// <summary> + /// Gets or sets Next asynchronous stack trace, if any. + /// </summary> + [JsonProperty("asyncStackTrace")] + public AsyncStackTrace AsyncStackTraceChild { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/Console/CallFrame.cs b/ChromeDevTools/Protocol/Console/CallFrame.cs new file mode 100644 index 0000000000000000000000000000000000000000..9332c6722c1c501a63aa79b142f61513950cdda8 --- /dev/null +++ b/ChromeDevTools/Protocol/Console/CallFrame.cs @@ -0,0 +1,32 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Console +{ + /// <summary> + /// Stack entry for console errors and assertions. + /// </summary> + public class CallFrame + { + /// <summary> + /// Gets or sets JavaScript function name. + /// </summary> + public string FunctionName { get; set; } + /// <summary> + /// Gets or sets JavaScript script id. + /// </summary> + public string ScriptId { get; set; } + /// <summary> + /// Gets or sets JavaScript script name or url. + /// </summary> + public string Url { get; set; } + /// <summary> + /// Gets or sets JavaScript script line number. + /// </summary> + public long LineNumber { get; set; } + /// <summary> + /// Gets or sets JavaScript script column number. + /// </summary> + public long ColumnNumber { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/Console/ClearMessagesCommand.cs b/ChromeDevTools/Protocol/Console/ClearMessagesCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..641b59081b3177ad68e63d7cb4a329a807d64b88 --- /dev/null +++ b/ChromeDevTools/Protocol/Console/ClearMessagesCommand.cs @@ -0,0 +1,13 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Console +{ + /// <summary> + /// Clears console messages collected in the browser. + /// </summary> + [Command(ProtocolName.Console.ClearMessages)] + public class ClearMessagesCommand + { + } +} diff --git a/ChromeDevTools/Protocol/Console/ClearMessagesCommandResponse.cs b/ChromeDevTools/Protocol/Console/ClearMessagesCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..7f64562332d8226c1ce9feb23dbf4e771049a8b1 --- /dev/null +++ b/ChromeDevTools/Protocol/Console/ClearMessagesCommandResponse.cs @@ -0,0 +1,13 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Console +{ + /// <summary> + /// Clears console messages collected in the browser. + /// </summary> + [CommandResponse(ProtocolName.Console.ClearMessages)] + public class ClearMessagesCommandResponse + { + } +} diff --git a/ChromeDevTools/Protocol/Console/ConsoleMessage.cs b/ChromeDevTools/Protocol/Console/ConsoleMessage.cs new file mode 100644 index 0000000000000000000000000000000000000000..6b2dfbdb87fd9645e4678e19ad6343c251e2a7f5 --- /dev/null +++ b/ChromeDevTools/Protocol/Console/ConsoleMessage.cs @@ -0,0 +1,72 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Console +{ + /// <summary> + /// Console message. + /// </summary> + public class ConsoleMessage + { + /// <summary> + /// Gets or sets Message source. + /// </summary> + public string Source { get; set; } + /// <summary> + /// Gets or sets Message severity. + /// </summary> + public string Level { get; set; } + /// <summary> + /// Gets or sets Message text. + /// </summary> + public string Text { get; set; } + /// <summary> + /// Gets or sets Console message type. + /// </summary> + public string Type { get; set; } + /// <summary> + /// Gets or sets Script ID of the message origin. + /// </summary> + public string ScriptId { get; set; } + /// <summary> + /// Gets or sets URL of the message origin. + /// </summary> + public string Url { get; set; } + /// <summary> + /// Gets or sets Line number in the resource that generated this message. + /// </summary> + public long Line { get; set; } + /// <summary> + /// Gets or sets Column number in the resource that generated this message. + /// </summary> + public long Column { get; set; } + /// <summary> + /// Gets or sets Repeat count for repeated messages. + /// </summary> + public long RepeatCount { get; set; } + /// <summary> + /// Gets or sets Message parameters in case of the formatted message. + /// </summary> + public Runtime.RemoteObject[] Parameters { get; set; } + /// <summary> + /// Gets or sets JavaScript stack trace for assertions and error messages. + /// </summary> + public CallFrame[] StackTrace { get; set; } + /// <summary> + /// Gets or sets Asynchronous JavaScript stack trace that preceded this message, if available. + /// </summary> + public AsyncStackTrace AsyncStackTrace { get; set; } + /// <summary> + /// Gets or sets Identifier of the network request associated with this message. + /// </summary> + public string NetworkRequestId { get; set; } + /// <summary> + /// Gets or sets Timestamp, when this message was fired. + /// </summary> + public double Timestamp { get; set; } + /// <summary> + /// Gets or sets Identifier of the context where this message was created + /// </summary> + public long ExecutionContextId { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/Console/DisableCommand.cs b/ChromeDevTools/Protocol/Console/DisableCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..bcb057ea2ed19fb8c013e4ebb921fed6c470ec79 --- /dev/null +++ b/ChromeDevTools/Protocol/Console/DisableCommand.cs @@ -0,0 +1,13 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Console +{ + /// <summary> + /// Disables console domain, prevents further console messages from being reported to the client. + /// </summary> + [Command(ProtocolName.Console.Disable)] + public class DisableCommand + { + } +} diff --git a/ChromeDevTools/Protocol/Console/DisableCommandResponse.cs b/ChromeDevTools/Protocol/Console/DisableCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..fad54dc08cf62d44974bc90e491ff34bb18144c4 --- /dev/null +++ b/ChromeDevTools/Protocol/Console/DisableCommandResponse.cs @@ -0,0 +1,13 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Console +{ + /// <summary> + /// Disables console domain, prevents further console messages from being reported to the client. + /// </summary> + [CommandResponse(ProtocolName.Console.Disable)] + public class DisableCommandResponse + { + } +} diff --git a/ChromeDevTools/Protocol/Console/EnableCommand.cs b/ChromeDevTools/Protocol/Console/EnableCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..478cd1870d947482c802b5a1b42414692ecf12a9 --- /dev/null +++ b/ChromeDevTools/Protocol/Console/EnableCommand.cs @@ -0,0 +1,13 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Console +{ + /// <summary> + /// Enables console domain, sends the messages collected so far to the client by means of the <code>messageAdded</code> notification. + /// </summary> + [Command(ProtocolName.Console.Enable)] + public class EnableCommand + { + } +} diff --git a/ChromeDevTools/Protocol/Console/EnableCommandResponse.cs b/ChromeDevTools/Protocol/Console/EnableCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..d6837ee19cd8ef834f577d816fa9b6434117956e --- /dev/null +++ b/ChromeDevTools/Protocol/Console/EnableCommandResponse.cs @@ -0,0 +1,13 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Console +{ + /// <summary> + /// Enables console domain, sends the messages collected so far to the client by means of the <code>messageAdded</code> notification. + /// </summary> + [CommandResponse(ProtocolName.Console.Enable)] + public class EnableCommandResponse + { + } +} diff --git a/ChromeDevTools/Protocol/Console/MessageAddedEvent.cs b/ChromeDevTools/Protocol/Console/MessageAddedEvent.cs new file mode 100644 index 0000000000000000000000000000000000000000..dbefa54247a4c75627e514fae13d7d1aa57d62b6 --- /dev/null +++ b/ChromeDevTools/Protocol/Console/MessageAddedEvent.cs @@ -0,0 +1,16 @@ +using ChromeDevTools; + +namespace ChromeDevTools.Protocol.Console +{ + /// <summary> + /// Issued when new console message is added. + /// </summary> + [Event(ProtocolName.Console.MessageAdded)] + public class MessageAddedEvent + { + /// <summary> + /// Gets or sets Console message that has been added. + /// </summary> + public ConsoleMessage Message { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/Console/MessageRepeatCountUpdatedEvent.cs b/ChromeDevTools/Protocol/Console/MessageRepeatCountUpdatedEvent.cs new file mode 100644 index 0000000000000000000000000000000000000000..94ff47e5c1ec073524d6bae2ca93749fe1045303 --- /dev/null +++ b/ChromeDevTools/Protocol/Console/MessageRepeatCountUpdatedEvent.cs @@ -0,0 +1,20 @@ +using ChromeDevTools; + +namespace ChromeDevTools.Protocol.Console +{ + /// <summary> + /// Is not issued. Will be gone in the future versions of the protocol. + /// </summary> + [Event(ProtocolName.Console.MessageRepeatCountUpdated)] + public class MessageRepeatCountUpdatedEvent + { + /// <summary> + /// Gets or sets New repeat count value. + /// </summary> + public long Count { get; set; } + /// <summary> + /// Gets or sets Timestamp of most recent message in batch. + /// </summary> + public double Timestamp { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/Console/MessagesClearedEvent.cs b/ChromeDevTools/Protocol/Console/MessagesClearedEvent.cs new file mode 100644 index 0000000000000000000000000000000000000000..ac65c7b456d035c2480e3d8487d13c661acde2de --- /dev/null +++ b/ChromeDevTools/Protocol/Console/MessagesClearedEvent.cs @@ -0,0 +1,12 @@ +using ChromeDevTools; + +namespace ChromeDevTools.Protocol.Console +{ + /// <summary> + /// Issued when console is cleared. This happens either upon <code>clearMessages</code> command or after page navigation. + /// </summary> + [Event(ProtocolName.Console.MessagesCleared)] + public class MessagesClearedEvent + { + } +} diff --git a/ChromeDevTools/Protocol/DOM/AttributeModifiedEvent.cs b/ChromeDevTools/Protocol/DOM/AttributeModifiedEvent.cs new file mode 100644 index 0000000000000000000000000000000000000000..c8db2b1dc8f0a4dc10316b5a2ab9b7f02690edb8 --- /dev/null +++ b/ChromeDevTools/Protocol/DOM/AttributeModifiedEvent.cs @@ -0,0 +1,24 @@ +using ChromeDevTools; + +namespace ChromeDevTools.Protocol.DOM +{ + /// <summary> + /// Fired when <code>Element</code>'s attribute is modified. + /// </summary> + [Event(ProtocolName.DOM.AttributeModified)] + public class AttributeModifiedEvent + { + /// <summary> + /// Gets or sets Id of the node that has changed. + /// </summary> + public long NodeId { get; set; } + /// <summary> + /// Gets or sets Attribute name. + /// </summary> + public string Name { get; set; } + /// <summary> + /// Gets or sets Attribute value. + /// </summary> + public string Value { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/DOM/AttributeRemovedEvent.cs b/ChromeDevTools/Protocol/DOM/AttributeRemovedEvent.cs new file mode 100644 index 0000000000000000000000000000000000000000..f1804c63bb3bb51823011e67a47072ed009abb45 --- /dev/null +++ b/ChromeDevTools/Protocol/DOM/AttributeRemovedEvent.cs @@ -0,0 +1,20 @@ +using ChromeDevTools; + +namespace ChromeDevTools.Protocol.DOM +{ + /// <summary> + /// Fired when <code>Element</code>'s attribute is removed. + /// </summary> + [Event(ProtocolName.DOM.AttributeRemoved)] + public class AttributeRemovedEvent + { + /// <summary> + /// Gets or sets Id of the node that has changed. + /// </summary> + public long NodeId { get; set; } + /// <summary> + /// Gets or sets A ttribute name. + /// </summary> + public string Name { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/DOM/BackendNode.cs b/ChromeDevTools/Protocol/DOM/BackendNode.cs new file mode 100644 index 0000000000000000000000000000000000000000..afb0ce7d483beb25a4b8add5502fb7f371f84bb7 --- /dev/null +++ b/ChromeDevTools/Protocol/DOM/BackendNode.cs @@ -0,0 +1,24 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.DOM +{ + /// <summary> + /// Backend node with a friendly name. + /// </summary> + public class BackendNode + { + /// <summary> + /// Gets or sets <code>Node</code>'s nodeType. + /// </summary> + public long NodeType { get; set; } + /// <summary> + /// Gets or sets <code>Node</code>'s nodeName. + /// </summary> + public string NodeName { get; set; } + /// <summary> + /// Gets or sets BackendNodeId + /// </summary> + public long BackendNodeId { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/DOM/BoxModel.cs b/ChromeDevTools/Protocol/DOM/BoxModel.cs new file mode 100644 index 0000000000000000000000000000000000000000..57d2ecde3e1e6b170343023c9f7ca37fd3b9db60 --- /dev/null +++ b/ChromeDevTools/Protocol/DOM/BoxModel.cs @@ -0,0 +1,40 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.DOM +{ + /// <summary> + /// Box model. + /// </summary> + public class BoxModel + { + /// <summary> + /// Gets or sets Content box + /// </summary> + public double[] Content { get; set; } + /// <summary> + /// Gets or sets Padding box + /// </summary> + public double[] Padding { get; set; } + /// <summary> + /// Gets or sets Border box + /// </summary> + public double[] Border { get; set; } + /// <summary> + /// Gets or sets Margin box + /// </summary> + public double[] Margin { get; set; } + /// <summary> + /// Gets or sets Node width + /// </summary> + public long Width { get; set; } + /// <summary> + /// Gets or sets Node height + /// </summary> + public long Height { get; set; } + /// <summary> + /// Gets or sets Shape outside coordinates + /// </summary> + public ShapeOutsideInfo ShapeOutside { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/DOM/CharacterDataModifiedEvent.cs b/ChromeDevTools/Protocol/DOM/CharacterDataModifiedEvent.cs new file mode 100644 index 0000000000000000000000000000000000000000..95b3df46d753fd0d8e179be2e4a40734eaa60dc2 --- /dev/null +++ b/ChromeDevTools/Protocol/DOM/CharacterDataModifiedEvent.cs @@ -0,0 +1,20 @@ +using ChromeDevTools; + +namespace ChromeDevTools.Protocol.DOM +{ + /// <summary> + /// Mirrors <code>DOMCharacterDataModified</code> event. + /// </summary> + [Event(ProtocolName.DOM.CharacterDataModified)] + public class CharacterDataModifiedEvent + { + /// <summary> + /// Gets or sets Id of the node that has changed. + /// </summary> + public long NodeId { get; set; } + /// <summary> + /// Gets or sets New text value. + /// </summary> + public string CharacterData { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/DOM/ChildNodeCountUpdatedEvent.cs b/ChromeDevTools/Protocol/DOM/ChildNodeCountUpdatedEvent.cs new file mode 100644 index 0000000000000000000000000000000000000000..c7fc87eb541d0b2af9cc44f137fd10f8a664c0a0 --- /dev/null +++ b/ChromeDevTools/Protocol/DOM/ChildNodeCountUpdatedEvent.cs @@ -0,0 +1,20 @@ +using ChromeDevTools; + +namespace ChromeDevTools.Protocol.DOM +{ + /// <summary> + /// Fired when <code>Container</code>'s child node count has changed. + /// </summary> + [Event(ProtocolName.DOM.ChildNodeCountUpdated)] + public class ChildNodeCountUpdatedEvent + { + /// <summary> + /// Gets or sets Id of the node that has changed. + /// </summary> + public long NodeId { get; set; } + /// <summary> + /// Gets or sets New node count. + /// </summary> + public long ChildNodeCount { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/DOM/ChildNodeInsertedEvent.cs b/ChromeDevTools/Protocol/DOM/ChildNodeInsertedEvent.cs new file mode 100644 index 0000000000000000000000000000000000000000..d1c9965fad179765db0690c106b1580fa0c58691 --- /dev/null +++ b/ChromeDevTools/Protocol/DOM/ChildNodeInsertedEvent.cs @@ -0,0 +1,24 @@ +using ChromeDevTools; + +namespace ChromeDevTools.Protocol.DOM +{ + /// <summary> + /// Mirrors <code>DOMNodeInserted</code> event. + /// </summary> + [Event(ProtocolName.DOM.ChildNodeInserted)] + public class ChildNodeInsertedEvent + { + /// <summary> + /// Gets or sets Id of the node that has changed. + /// </summary> + public long ParentNodeId { get; set; } + /// <summary> + /// Gets or sets If of the previous siblint. + /// </summary> + public long PreviousNodeId { get; set; } + /// <summary> + /// Gets or sets Inserted node data. + /// </summary> + public Node Node { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/DOM/ChildNodeRemovedEvent.cs b/ChromeDevTools/Protocol/DOM/ChildNodeRemovedEvent.cs new file mode 100644 index 0000000000000000000000000000000000000000..1648d319e1b7411912dfd593e0fbc27981c6d160 --- /dev/null +++ b/ChromeDevTools/Protocol/DOM/ChildNodeRemovedEvent.cs @@ -0,0 +1,20 @@ +using ChromeDevTools; + +namespace ChromeDevTools.Protocol.DOM +{ + /// <summary> + /// Mirrors <code>DOMNodeRemoved</code> event. + /// </summary> + [Event(ProtocolName.DOM.ChildNodeRemoved)] + public class ChildNodeRemovedEvent + { + /// <summary> + /// Gets or sets Parent id. + /// </summary> + public long ParentNodeId { get; set; } + /// <summary> + /// Gets or sets Id of the node that has been removed. + /// </summary> + public long NodeId { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/DOM/CopyToCommand.cs b/ChromeDevTools/Protocol/DOM/CopyToCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..36a1843befa41dfb780c5659add0b801e6563050 --- /dev/null +++ b/ChromeDevTools/Protocol/DOM/CopyToCommand.cs @@ -0,0 +1,25 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.DOM +{ + /// <summary> + /// Creates a deep copy of the specified node and places it into the target container before the given anchor. + /// </summary> + [Command(ProtocolName.DOM.CopyTo)] + public class CopyToCommand + { + /// <summary> + /// Gets or sets Id of the node to copy. + /// </summary> + public long NodeId { get; set; } + /// <summary> + /// Gets or sets Id of the element to drop the copy into. + /// </summary> + public long TargetNodeId { get; set; } + /// <summary> + /// Gets or sets Drop the copy before this node (if absent, the copy becomes the last child of <code>targetNodeId</code>). + /// </summary> + public long InsertBeforeNodeId { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/DOM/CopyToCommandResponse.cs b/ChromeDevTools/Protocol/DOM/CopyToCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..dcaad37974ac57539084a306ed4f5ff84c189166 --- /dev/null +++ b/ChromeDevTools/Protocol/DOM/CopyToCommandResponse.cs @@ -0,0 +1,17 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.DOM +{ + /// <summary> + /// Creates a deep copy of the specified node and places it into the target container before the given anchor. + /// </summary> + [CommandResponse(ProtocolName.DOM.CopyTo)] + public class CopyToCommandResponse + { + /// <summary> + /// Gets or sets Id of the node clone. + /// </summary> + public long NodeId { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/DOM/DisableCommand.cs b/ChromeDevTools/Protocol/DOM/DisableCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..fd904cb7690a779ad448cb49fd3e38615c0d1c7a --- /dev/null +++ b/ChromeDevTools/Protocol/DOM/DisableCommand.cs @@ -0,0 +1,13 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.DOM +{ + /// <summary> + /// Disables DOM agent for the given page. + /// </summary> + [Command(ProtocolName.DOM.Disable)] + public class DisableCommand + { + } +} diff --git a/ChromeDevTools/Protocol/DOM/DisableCommandResponse.cs b/ChromeDevTools/Protocol/DOM/DisableCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..b0894dac1ac53c68d83508932cc6ea842873599b --- /dev/null +++ b/ChromeDevTools/Protocol/DOM/DisableCommandResponse.cs @@ -0,0 +1,13 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.DOM +{ + /// <summary> + /// Disables DOM agent for the given page. + /// </summary> + [CommandResponse(ProtocolName.DOM.Disable)] + public class DisableCommandResponse + { + } +} diff --git a/ChromeDevTools/Protocol/DOM/DiscardSearchResultsCommand.cs b/ChromeDevTools/Protocol/DOM/DiscardSearchResultsCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..cd1f63e856a9dfe237d8994d94aa9beab27e44f2 --- /dev/null +++ b/ChromeDevTools/Protocol/DOM/DiscardSearchResultsCommand.cs @@ -0,0 +1,17 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.DOM +{ + /// <summary> + /// Discards search results from the session with the given id. <code>getSearchResults</code> should no longer be called for that search. + /// </summary> + [Command(ProtocolName.DOM.DiscardSearchResults)] + public class DiscardSearchResultsCommand + { + /// <summary> + /// Gets or sets Unique search session identifier. + /// </summary> + public string SearchId { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/DOM/DiscardSearchResultsCommandResponse.cs b/ChromeDevTools/Protocol/DOM/DiscardSearchResultsCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..50c27d303c204a08bd0e4b9ea4b93ccf43422268 --- /dev/null +++ b/ChromeDevTools/Protocol/DOM/DiscardSearchResultsCommandResponse.cs @@ -0,0 +1,13 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.DOM +{ + /// <summary> + /// Discards search results from the session with the given id. <code>getSearchResults</code> should no longer be called for that search. + /// </summary> + [CommandResponse(ProtocolName.DOM.DiscardSearchResults)] + public class DiscardSearchResultsCommandResponse + { + } +} diff --git a/ChromeDevTools/Protocol/DOM/DistributedNodesUpdatedEvent.cs b/ChromeDevTools/Protocol/DOM/DistributedNodesUpdatedEvent.cs new file mode 100644 index 0000000000000000000000000000000000000000..cd940f0fcaa268620bf8ee63fb575fba2a11fda1 --- /dev/null +++ b/ChromeDevTools/Protocol/DOM/DistributedNodesUpdatedEvent.cs @@ -0,0 +1,20 @@ +using ChromeDevTools; + +namespace ChromeDevTools.Protocol.DOM +{ + /// <summary> + /// Called when distrubution is changed. + /// </summary> + [Event(ProtocolName.DOM.DistributedNodesUpdated)] + public class DistributedNodesUpdatedEvent + { + /// <summary> + /// Gets or sets Insertion point where distrubuted nodes were updated. + /// </summary> + public long InsertionPointId { get; set; } + /// <summary> + /// Gets or sets Distributed nodes for given insertion point. + /// </summary> + public BackendNode[] DistributedNodes { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/DOM/DocumentUpdatedEvent.cs b/ChromeDevTools/Protocol/DOM/DocumentUpdatedEvent.cs new file mode 100644 index 0000000000000000000000000000000000000000..d2b4e4c0c88653668e4b0a57e635695b4906cde8 --- /dev/null +++ b/ChromeDevTools/Protocol/DOM/DocumentUpdatedEvent.cs @@ -0,0 +1,12 @@ +using ChromeDevTools; + +namespace ChromeDevTools.Protocol.DOM +{ + /// <summary> + /// Fired when <code>Document</code> has been totally updated. Node ids are no longer valid. + /// </summary> + [Event(ProtocolName.DOM.DocumentUpdated)] + public class DocumentUpdatedEvent + { + } +} diff --git a/ChromeDevTools/Protocol/DOM/EnableCommand.cs b/ChromeDevTools/Protocol/DOM/EnableCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..7cc3a4f0d9f8450ef7008ffeb76c6032fed7f93e --- /dev/null +++ b/ChromeDevTools/Protocol/DOM/EnableCommand.cs @@ -0,0 +1,13 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.DOM +{ + /// <summary> + /// Enables DOM agent for the given page. + /// </summary> + [Command(ProtocolName.DOM.Enable)] + public class EnableCommand + { + } +} diff --git a/ChromeDevTools/Protocol/DOM/EnableCommandResponse.cs b/ChromeDevTools/Protocol/DOM/EnableCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..a2b30a0c2e4b0779c3d1f7a28adbdc50b02f9c25 --- /dev/null +++ b/ChromeDevTools/Protocol/DOM/EnableCommandResponse.cs @@ -0,0 +1,13 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.DOM +{ + /// <summary> + /// Enables DOM agent for the given page. + /// </summary> + [CommandResponse(ProtocolName.DOM.Enable)] + public class EnableCommandResponse + { + } +} diff --git a/ChromeDevTools/Protocol/DOM/EventListener.cs b/ChromeDevTools/Protocol/DOM/EventListener.cs new file mode 100644 index 0000000000000000000000000000000000000000..170f77217e3fe61f0dfcea3522230940f10bf0e4 --- /dev/null +++ b/ChromeDevTools/Protocol/DOM/EventListener.cs @@ -0,0 +1,36 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.DOM +{ + /// <summary> + /// DOM interaction is implemented in terms of mirror objects that represent the actual DOM nodes. DOMNode is a base node mirror type. + /// </summary> + public class EventListener + { + /// <summary> + /// Gets or sets <code>EventListener</code>'s type. + /// </summary> + public string Type { get; set; } + /// <summary> + /// Gets or sets <code>EventListener</code>'s useCapture. + /// </summary> + public bool UseCapture { get; set; } + /// <summary> + /// Gets or sets <code>EventListener</code>'s isAttribute. + /// </summary> + public bool IsAttribute { get; set; } + /// <summary> + /// Gets or sets Target <code>DOMNode</code> id. + /// </summary> + public long NodeId { get; set; } + /// <summary> + /// Gets or sets Handler code location. + /// </summary> + public Debugger.Location Location { get; set; } + /// <summary> + /// Gets or sets Event handler function value. + /// </summary> + public Runtime.RemoteObject Handler { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/DOM/FocusCommand.cs b/ChromeDevTools/Protocol/DOM/FocusCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..b4229afa0d750298695fd9a89e410be8c3c6349f --- /dev/null +++ b/ChromeDevTools/Protocol/DOM/FocusCommand.cs @@ -0,0 +1,17 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.DOM +{ + /// <summary> + /// Focuses the given element. + /// </summary> + [Command(ProtocolName.DOM.Focus)] + public class FocusCommand + { + /// <summary> + /// Gets or sets Id of the node to focus. + /// </summary> + public long NodeId { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/DOM/FocusCommandResponse.cs b/ChromeDevTools/Protocol/DOM/FocusCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..7bf3270ab4aeb932360e13499501ed021b2eb081 --- /dev/null +++ b/ChromeDevTools/Protocol/DOM/FocusCommandResponse.cs @@ -0,0 +1,13 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.DOM +{ + /// <summary> + /// Focuses the given element. + /// </summary> + [CommandResponse(ProtocolName.DOM.Focus)] + public class FocusCommandResponse + { + } +} diff --git a/ChromeDevTools/Protocol/DOM/GetAttributesCommand.cs b/ChromeDevTools/Protocol/DOM/GetAttributesCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..53296368c7885562eff6ee0af56c453670be5e18 --- /dev/null +++ b/ChromeDevTools/Protocol/DOM/GetAttributesCommand.cs @@ -0,0 +1,17 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.DOM +{ + /// <summary> + /// Returns attributes for the specified node. + /// </summary> + [Command(ProtocolName.DOM.GetAttributes)] + public class GetAttributesCommand + { + /// <summary> + /// Gets or sets Id of the node to retrieve attibutes for. + /// </summary> + public long NodeId { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/DOM/GetAttributesCommandResponse.cs b/ChromeDevTools/Protocol/DOM/GetAttributesCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..90c0a4df1fa875c975ff6561857a6958d458e7ce --- /dev/null +++ b/ChromeDevTools/Protocol/DOM/GetAttributesCommandResponse.cs @@ -0,0 +1,17 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.DOM +{ + /// <summary> + /// Returns attributes for the specified node. + /// </summary> + [CommandResponse(ProtocolName.DOM.GetAttributes)] + public class GetAttributesCommandResponse + { + /// <summary> + /// Gets or sets An interleaved array of node attribute names and values. + /// </summary> + public string[] Attributes { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/DOM/GetBoxModelCommand.cs b/ChromeDevTools/Protocol/DOM/GetBoxModelCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..6906001fedb26b6d56846440bfde926d11a0f8d8 --- /dev/null +++ b/ChromeDevTools/Protocol/DOM/GetBoxModelCommand.cs @@ -0,0 +1,17 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.DOM +{ + /// <summary> + /// Returns boxes for the currently selected nodes. + /// </summary> + [Command(ProtocolName.DOM.GetBoxModel)] + public class GetBoxModelCommand + { + /// <summary> + /// Gets or sets Id of the node to get box model for. + /// </summary> + public long NodeId { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/DOM/GetBoxModelCommandResponse.cs b/ChromeDevTools/Protocol/DOM/GetBoxModelCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..1acd9ff1775b8673bc9fb64d7cf9b1feec0dd9eb --- /dev/null +++ b/ChromeDevTools/Protocol/DOM/GetBoxModelCommandResponse.cs @@ -0,0 +1,17 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.DOM +{ + /// <summary> + /// Returns boxes for the currently selected nodes. + /// </summary> + [CommandResponse(ProtocolName.DOM.GetBoxModel)] + public class GetBoxModelCommandResponse + { + /// <summary> + /// Gets or sets Box model for the node. + /// </summary> + public BoxModel Model { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/DOM/GetDocumentCommand.cs b/ChromeDevTools/Protocol/DOM/GetDocumentCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..15afb2b60489b7130dc578ecbc42c09ac68f843f --- /dev/null +++ b/ChromeDevTools/Protocol/DOM/GetDocumentCommand.cs @@ -0,0 +1,13 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.DOM +{ + /// <summary> + /// Returns the root DOM node to the caller. + /// </summary> + [Command(ProtocolName.DOM.GetDocument)] + public class GetDocumentCommand + { + } +} diff --git a/ChromeDevTools/Protocol/DOM/GetDocumentCommandResponse.cs b/ChromeDevTools/Protocol/DOM/GetDocumentCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..19ab4c9723e03e2692d8b41f508196dd2120f036 --- /dev/null +++ b/ChromeDevTools/Protocol/DOM/GetDocumentCommandResponse.cs @@ -0,0 +1,17 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.DOM +{ + /// <summary> + /// Returns the root DOM node to the caller. + /// </summary> + [CommandResponse(ProtocolName.DOM.GetDocument)] + public class GetDocumentCommandResponse + { + /// <summary> + /// Gets or sets Resulting node. + /// </summary> + public Node Root { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/DOM/GetEventListenersForNodeCommand.cs b/ChromeDevTools/Protocol/DOM/GetEventListenersForNodeCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..4c166bc773e2e7a4a843c72051ceabcca75f753d --- /dev/null +++ b/ChromeDevTools/Protocol/DOM/GetEventListenersForNodeCommand.cs @@ -0,0 +1,21 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.DOM +{ + /// <summary> + /// Returns event listeners relevant to the node. + /// </summary> + [Command(ProtocolName.DOM.GetEventListenersForNode)] + public class GetEventListenersForNodeCommand + { + /// <summary> + /// Gets or sets Id of the node to get listeners for. + /// </summary> + public long NodeId { get; set; } + /// <summary> + /// Gets or sets Symbolic group name for handler value. Handler value is not returned without this parameter specified. + /// </summary> + public string ObjectGroup { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/DOM/GetEventListenersForNodeCommandResponse.cs b/ChromeDevTools/Protocol/DOM/GetEventListenersForNodeCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..2e6583e3796cea1e0a34a71132a0b9c15afa21d2 --- /dev/null +++ b/ChromeDevTools/Protocol/DOM/GetEventListenersForNodeCommandResponse.cs @@ -0,0 +1,17 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.DOM +{ + /// <summary> + /// Returns event listeners relevant to the node. + /// </summary> + [CommandResponse(ProtocolName.DOM.GetEventListenersForNode)] + public class GetEventListenersForNodeCommandResponse + { + /// <summary> + /// Gets or sets Array of relevant listeners. + /// </summary> + public EventListener[] Listeners { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/DOM/GetHighlightObjectForTestCommand.cs b/ChromeDevTools/Protocol/DOM/GetHighlightObjectForTestCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..c9d70062c01a78727d7f05a9efc9a492b2d74cde --- /dev/null +++ b/ChromeDevTools/Protocol/DOM/GetHighlightObjectForTestCommand.cs @@ -0,0 +1,17 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.DOM +{ + /// <summary> + /// For testing. + /// </summary> + [Command(ProtocolName.DOM.GetHighlightObjectForTest)] + public class GetHighlightObjectForTestCommand + { + /// <summary> + /// Gets or sets Id of the node to get highlight object for. + /// </summary> + public long NodeId { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/DOM/GetHighlightObjectForTestCommandResponse.cs b/ChromeDevTools/Protocol/DOM/GetHighlightObjectForTestCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..49d75ce256969b49e4f933bab65a5a5ec1e735c9 --- /dev/null +++ b/ChromeDevTools/Protocol/DOM/GetHighlightObjectForTestCommandResponse.cs @@ -0,0 +1,17 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.DOM +{ + /// <summary> + /// For testing. + /// </summary> + [CommandResponse(ProtocolName.DOM.GetHighlightObjectForTest)] + public class GetHighlightObjectForTestCommandResponse + { + /// <summary> + /// Gets or sets Highlight data for the node. + /// </summary> + public object Highlight { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/DOM/GetNodeForLocationCommand.cs b/ChromeDevTools/Protocol/DOM/GetNodeForLocationCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..45fb11e458a974dd157e4a9dc00f83605ab4362a --- /dev/null +++ b/ChromeDevTools/Protocol/DOM/GetNodeForLocationCommand.cs @@ -0,0 +1,21 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.DOM +{ + /// <summary> + /// Returns node id at given location. + /// </summary> + [Command(ProtocolName.DOM.GetNodeForLocation)] + public class GetNodeForLocationCommand + { + /// <summary> + /// Gets or sets X coordinate. + /// </summary> + public long X { get; set; } + /// <summary> + /// Gets or sets Y coordinate. + /// </summary> + public long Y { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/DOM/GetNodeForLocationCommandResponse.cs b/ChromeDevTools/Protocol/DOM/GetNodeForLocationCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..b1735e5a289f490325de47634b7009291c30875b --- /dev/null +++ b/ChromeDevTools/Protocol/DOM/GetNodeForLocationCommandResponse.cs @@ -0,0 +1,17 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.DOM +{ + /// <summary> + /// Returns node id at given location. + /// </summary> + [CommandResponse(ProtocolName.DOM.GetNodeForLocation)] + public class GetNodeForLocationCommandResponse + { + /// <summary> + /// Gets or sets Id of the node at given coordinates. + /// </summary> + public long NodeId { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/DOM/GetOuterHTMLCommand.cs b/ChromeDevTools/Protocol/DOM/GetOuterHTMLCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..21370f66f19ceaa47f1f129b2643079f85db1690 --- /dev/null +++ b/ChromeDevTools/Protocol/DOM/GetOuterHTMLCommand.cs @@ -0,0 +1,17 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.DOM +{ + /// <summary> + /// Returns node's HTML markup. + /// </summary> + [Command(ProtocolName.DOM.GetOuterHTML)] + public class GetOuterHTMLCommand + { + /// <summary> + /// Gets or sets Id of the node to get markup for. + /// </summary> + public long NodeId { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/DOM/GetOuterHTMLCommandResponse.cs b/ChromeDevTools/Protocol/DOM/GetOuterHTMLCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..7217148595b595e88bf2fbf8e2b760e799604411 --- /dev/null +++ b/ChromeDevTools/Protocol/DOM/GetOuterHTMLCommandResponse.cs @@ -0,0 +1,17 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.DOM +{ + /// <summary> + /// Returns node's HTML markup. + /// </summary> + [CommandResponse(ProtocolName.DOM.GetOuterHTML)] + public class GetOuterHTMLCommandResponse + { + /// <summary> + /// Gets or sets Outer HTML markup. + /// </summary> + public string OuterHTML { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/DOM/GetRelayoutBoundaryCommand.cs b/ChromeDevTools/Protocol/DOM/GetRelayoutBoundaryCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..3ef448f8c487f1306cf0df883c4bc851bad233bf --- /dev/null +++ b/ChromeDevTools/Protocol/DOM/GetRelayoutBoundaryCommand.cs @@ -0,0 +1,17 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.DOM +{ + /// <summary> + /// Returns the id of the nearest ancestor that is a relayout boundary. + /// </summary> + [Command(ProtocolName.DOM.GetRelayoutBoundary)] + public class GetRelayoutBoundaryCommand + { + /// <summary> + /// Gets or sets Id of the node. + /// </summary> + public long NodeId { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/DOM/GetRelayoutBoundaryCommandResponse.cs b/ChromeDevTools/Protocol/DOM/GetRelayoutBoundaryCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..f70f27e5905ebb79c071c8940c4ecc63d9fe2ac2 --- /dev/null +++ b/ChromeDevTools/Protocol/DOM/GetRelayoutBoundaryCommandResponse.cs @@ -0,0 +1,17 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.DOM +{ + /// <summary> + /// Returns the id of the nearest ancestor that is a relayout boundary. + /// </summary> + [CommandResponse(ProtocolName.DOM.GetRelayoutBoundary)] + public class GetRelayoutBoundaryCommandResponse + { + /// <summary> + /// Gets or sets Relayout boundary node id for the given node. + /// </summary> + public long NodeId { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/DOM/GetSearchResultsCommand.cs b/ChromeDevTools/Protocol/DOM/GetSearchResultsCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..d96ed06ccb284ae590ea634341f438b7571a79a4 --- /dev/null +++ b/ChromeDevTools/Protocol/DOM/GetSearchResultsCommand.cs @@ -0,0 +1,25 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.DOM +{ + /// <summary> + /// Returns search results from given <code>fromIndex</code> to given <code>toIndex</code> from the sarch with the given identifier. + /// </summary> + [Command(ProtocolName.DOM.GetSearchResults)] + public class GetSearchResultsCommand + { + /// <summary> + /// Gets or sets Unique search session identifier. + /// </summary> + public string SearchId { get; set; } + /// <summary> + /// Gets or sets Start index of the search result to be returned. + /// </summary> + public long FromIndex { get; set; } + /// <summary> + /// Gets or sets End index of the search result to be returned. + /// </summary> + public long ToIndex { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/DOM/GetSearchResultsCommandResponse.cs b/ChromeDevTools/Protocol/DOM/GetSearchResultsCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..6bded691b4ea96de72bd9d082a70ca5ab406eac7 --- /dev/null +++ b/ChromeDevTools/Protocol/DOM/GetSearchResultsCommandResponse.cs @@ -0,0 +1,17 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.DOM +{ + /// <summary> + /// Returns search results from given <code>fromIndex</code> to given <code>toIndex</code> from the sarch with the given identifier. + /// </summary> + [CommandResponse(ProtocolName.DOM.GetSearchResults)] + public class GetSearchResultsCommandResponse + { + /// <summary> + /// Gets or sets Ids of the search result nodes. + /// </summary> + public long[] NodeIds { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/DOM/HideHighlightCommand.cs b/ChromeDevTools/Protocol/DOM/HideHighlightCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..9f060fc172945c10b910e29882dd855301cbb441 --- /dev/null +++ b/ChromeDevTools/Protocol/DOM/HideHighlightCommand.cs @@ -0,0 +1,13 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.DOM +{ + /// <summary> + /// Hides DOM node highlight. + /// </summary> + [Command(ProtocolName.DOM.HideHighlight)] + public class HideHighlightCommand + { + } +} diff --git a/ChromeDevTools/Protocol/DOM/HideHighlightCommandResponse.cs b/ChromeDevTools/Protocol/DOM/HideHighlightCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..6ca18144779a05ee2ecd72cd5d4a1580bb212096 --- /dev/null +++ b/ChromeDevTools/Protocol/DOM/HideHighlightCommandResponse.cs @@ -0,0 +1,13 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.DOM +{ + /// <summary> + /// Hides DOM node highlight. + /// </summary> + [CommandResponse(ProtocolName.DOM.HideHighlight)] + public class HideHighlightCommandResponse + { + } +} diff --git a/ChromeDevTools/Protocol/DOM/HighlightConfig.cs b/ChromeDevTools/Protocol/DOM/HighlightConfig.cs new file mode 100644 index 0000000000000000000000000000000000000000..f4a680f7c449b6ca1af4143397615d701e06717a --- /dev/null +++ b/ChromeDevTools/Protocol/DOM/HighlightConfig.cs @@ -0,0 +1,52 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.DOM +{ + /// <summary> + /// Configuration data for the highlighting of page elements. + /// </summary> + public class HighlightConfig + { + /// <summary> + /// Gets or sets Whether the node info tooltip should be shown (default: false). + /// </summary> + public bool ShowInfo { get; set; } + /// <summary> + /// Gets or sets Whether the rulers should be shown (default: false). + /// </summary> + public bool ShowRulers { get; set; } + /// <summary> + /// Gets or sets Whether the extension lines from node to the rulers should be shown (default: false). + /// </summary> + public bool ShowExtensionLines { get; set; } + /// <summary> + /// Gets or sets The content box highlight fill color (default: transparent). + /// </summary> + public RGBA ContentColor { get; set; } + /// <summary> + /// Gets or sets The padding highlight fill color (default: transparent). + /// </summary> + public RGBA PaddingColor { get; set; } + /// <summary> + /// Gets or sets The border highlight fill color (default: transparent). + /// </summary> + public RGBA BorderColor { get; set; } + /// <summary> + /// Gets or sets The margin highlight fill color (default: transparent). + /// </summary> + public RGBA MarginColor { get; set; } + /// <summary> + /// Gets or sets The event target element highlight fill color (default: transparent). + /// </summary> + public RGBA EventTargetColor { get; set; } + /// <summary> + /// Gets or sets The shape outside fill color (default: transparent). + /// </summary> + public RGBA ShapeColor { get; set; } + /// <summary> + /// Gets or sets The shape margin fill color (default: transparent). + /// </summary> + public RGBA ShapeMarginColor { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/DOM/HighlightFrameCommand.cs b/ChromeDevTools/Protocol/DOM/HighlightFrameCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..eecdfdf5a27a6e8b854dfdda959430c97e9a431e --- /dev/null +++ b/ChromeDevTools/Protocol/DOM/HighlightFrameCommand.cs @@ -0,0 +1,25 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.DOM +{ + /// <summary> + /// Highlights owner element of the frame with given id. + /// </summary> + [Command(ProtocolName.DOM.HighlightFrame)] + public class HighlightFrameCommand + { + /// <summary> + /// Gets or sets Identifier of the frame to highlight. + /// </summary> + public string FrameId { get; set; } + /// <summary> + /// Gets or sets The content box highlight fill color (default: transparent). + /// </summary> + public RGBA ContentColor { get; set; } + /// <summary> + /// Gets or sets The content box highlight outline color (default: transparent). + /// </summary> + public RGBA ContentOutlineColor { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/DOM/HighlightFrameCommandResponse.cs b/ChromeDevTools/Protocol/DOM/HighlightFrameCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..8651f549022e8c28bc113db4b073d6db5c3030b5 --- /dev/null +++ b/ChromeDevTools/Protocol/DOM/HighlightFrameCommandResponse.cs @@ -0,0 +1,13 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.DOM +{ + /// <summary> + /// Highlights owner element of the frame with given id. + /// </summary> + [CommandResponse(ProtocolName.DOM.HighlightFrame)] + public class HighlightFrameCommandResponse + { + } +} diff --git a/ChromeDevTools/Protocol/DOM/HighlightNodeCommand.cs b/ChromeDevTools/Protocol/DOM/HighlightNodeCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..fe333a0b5e4416a639a09e7141407f4c6ba55ee9 --- /dev/null +++ b/ChromeDevTools/Protocol/DOM/HighlightNodeCommand.cs @@ -0,0 +1,29 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.DOM +{ + /// <summary> + /// Highlights DOM node with given id or with the given JavaScript object wrapper. Either nodeId or objectId must be specified. + /// </summary> + [Command(ProtocolName.DOM.HighlightNode)] + public class HighlightNodeCommand + { + /// <summary> + /// Gets or sets A descriptor for the highlight appearance. + /// </summary> + public HighlightConfig HighlightConfig { get; set; } + /// <summary> + /// Gets or sets Identifier of the node to highlight. + /// </summary> + public long NodeId { get; set; } + /// <summary> + /// Gets or sets Identifier of the backend node to highlight. + /// </summary> + public long BackendNodeId { get; set; } + /// <summary> + /// Gets or sets JavaScript object id of the node to be highlighted. + /// </summary> + public string ObjectId { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/DOM/HighlightNodeCommandResponse.cs b/ChromeDevTools/Protocol/DOM/HighlightNodeCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..e66be3c19788fff2981b3cc03fcd07d04e700159 --- /dev/null +++ b/ChromeDevTools/Protocol/DOM/HighlightNodeCommandResponse.cs @@ -0,0 +1,13 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.DOM +{ + /// <summary> + /// Highlights DOM node with given id or with the given JavaScript object wrapper. Either nodeId or objectId must be specified. + /// </summary> + [CommandResponse(ProtocolName.DOM.HighlightNode)] + public class HighlightNodeCommandResponse + { + } +} diff --git a/ChromeDevTools/Protocol/DOM/HighlightQuadCommand.cs b/ChromeDevTools/Protocol/DOM/HighlightQuadCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..c4315c1ad2cf13a8819ef6b9fa5d54c6533e31f4 --- /dev/null +++ b/ChromeDevTools/Protocol/DOM/HighlightQuadCommand.cs @@ -0,0 +1,25 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.DOM +{ + /// <summary> + /// Highlights given quad. Coordinates are absolute with respect to the main frame viewport. + /// </summary> + [Command(ProtocolName.DOM.HighlightQuad)] + public class HighlightQuadCommand + { + /// <summary> + /// Gets or sets Quad to highlight + /// </summary> + public double[] Quad { get; set; } + /// <summary> + /// Gets or sets The highlight fill color (default: transparent). + /// </summary> + public RGBA Color { get; set; } + /// <summary> + /// Gets or sets The highlight outline color (default: transparent). + /// </summary> + public RGBA OutlineColor { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/DOM/HighlightQuadCommandResponse.cs b/ChromeDevTools/Protocol/DOM/HighlightQuadCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..354c4f65346326c7c2f26b1b974c9fb1db51b810 --- /dev/null +++ b/ChromeDevTools/Protocol/DOM/HighlightQuadCommandResponse.cs @@ -0,0 +1,13 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.DOM +{ + /// <summary> + /// Highlights given quad. Coordinates are absolute with respect to the main frame viewport. + /// </summary> + [CommandResponse(ProtocolName.DOM.HighlightQuad)] + public class HighlightQuadCommandResponse + { + } +} diff --git a/ChromeDevTools/Protocol/DOM/HighlightRectCommand.cs b/ChromeDevTools/Protocol/DOM/HighlightRectCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..8ed26776555457322443f8619e50e12443f5600a --- /dev/null +++ b/ChromeDevTools/Protocol/DOM/HighlightRectCommand.cs @@ -0,0 +1,37 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.DOM +{ + /// <summary> + /// Highlights given rectangle. Coordinates are absolute with respect to the main frame viewport. + /// </summary> + [Command(ProtocolName.DOM.HighlightRect)] + public class HighlightRectCommand + { + /// <summary> + /// Gets or sets X coordinate + /// </summary> + public long X { get; set; } + /// <summary> + /// Gets or sets Y coordinate + /// </summary> + public long Y { get; set; } + /// <summary> + /// Gets or sets Rectangle width + /// </summary> + public long Width { get; set; } + /// <summary> + /// Gets or sets Rectangle height + /// </summary> + public long Height { get; set; } + /// <summary> + /// Gets or sets The highlight fill color (default: transparent). + /// </summary> + public RGBA Color { get; set; } + /// <summary> + /// Gets or sets The highlight outline color (default: transparent). + /// </summary> + public RGBA OutlineColor { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/DOM/HighlightRectCommandResponse.cs b/ChromeDevTools/Protocol/DOM/HighlightRectCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..264e9c3a1a88deb235da859144b8bbaf32021e31 --- /dev/null +++ b/ChromeDevTools/Protocol/DOM/HighlightRectCommandResponse.cs @@ -0,0 +1,13 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.DOM +{ + /// <summary> + /// Highlights given rectangle. Coordinates are absolute with respect to the main frame viewport. + /// </summary> + [CommandResponse(ProtocolName.DOM.HighlightRect)] + public class HighlightRectCommandResponse + { + } +} diff --git a/ChromeDevTools/Protocol/DOM/InlineStyleInvalidatedEvent.cs b/ChromeDevTools/Protocol/DOM/InlineStyleInvalidatedEvent.cs new file mode 100644 index 0000000000000000000000000000000000000000..0f5b131db34fbe3158c7e0cf8b135d3126c715ad --- /dev/null +++ b/ChromeDevTools/Protocol/DOM/InlineStyleInvalidatedEvent.cs @@ -0,0 +1,16 @@ +using ChromeDevTools; + +namespace ChromeDevTools.Protocol.DOM +{ + /// <summary> + /// Fired when <code>Element</code>'s inline style is modified via a CSS property modification. + /// </summary> + [Event(ProtocolName.DOM.InlineStyleInvalidated)] + public class InlineStyleInvalidatedEvent + { + /// <summary> + /// Gets or sets Ids of the nodes for which the inline styles have been invalidated. + /// </summary> + public long[] NodeIds { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/DOM/InspectNodeRequestedEvent.cs b/ChromeDevTools/Protocol/DOM/InspectNodeRequestedEvent.cs new file mode 100644 index 0000000000000000000000000000000000000000..c8142c62b2d1547aa01de0b442f133de93202f7b --- /dev/null +++ b/ChromeDevTools/Protocol/DOM/InspectNodeRequestedEvent.cs @@ -0,0 +1,16 @@ +using ChromeDevTools; + +namespace ChromeDevTools.Protocol.DOM +{ + /// <summary> + /// Fired when the node should be inspected. This happens after call to <code>setInspectModeEnabled</code>. + /// </summary> + [Event(ProtocolName.DOM.InspectNodeRequested)] + public class InspectNodeRequestedEvent + { + /// <summary> + /// Gets or sets Id of the node to inspect. + /// </summary> + public long BackendNodeId { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/DOM/MarkUndoableStateCommand.cs b/ChromeDevTools/Protocol/DOM/MarkUndoableStateCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..2e6380ba21736a47b6d9523a850ce4699eadb1cb --- /dev/null +++ b/ChromeDevTools/Protocol/DOM/MarkUndoableStateCommand.cs @@ -0,0 +1,13 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.DOM +{ + /// <summary> + /// Marks last undoable state. + /// </summary> + [Command(ProtocolName.DOM.MarkUndoableState)] + public class MarkUndoableStateCommand + { + } +} diff --git a/ChromeDevTools/Protocol/DOM/MarkUndoableStateCommandResponse.cs b/ChromeDevTools/Protocol/DOM/MarkUndoableStateCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..cb41c847553b254fb673e3c2cffda14471fc3d49 --- /dev/null +++ b/ChromeDevTools/Protocol/DOM/MarkUndoableStateCommandResponse.cs @@ -0,0 +1,13 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.DOM +{ + /// <summary> + /// Marks last undoable state. + /// </summary> + [CommandResponse(ProtocolName.DOM.MarkUndoableState)] + public class MarkUndoableStateCommandResponse + { + } +} diff --git a/ChromeDevTools/Protocol/DOM/MoveToCommand.cs b/ChromeDevTools/Protocol/DOM/MoveToCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..d31a9887335df4e3442a59099ba9cfb3536ceb94 --- /dev/null +++ b/ChromeDevTools/Protocol/DOM/MoveToCommand.cs @@ -0,0 +1,25 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.DOM +{ + /// <summary> + /// Moves node into the new container, places it before the given anchor. + /// </summary> + [Command(ProtocolName.DOM.MoveTo)] + public class MoveToCommand + { + /// <summary> + /// Gets or sets Id of the node to move. + /// </summary> + public long NodeId { get; set; } + /// <summary> + /// Gets or sets Id of the element to drop the moved node into. + /// </summary> + public long TargetNodeId { get; set; } + /// <summary> + /// Gets or sets Drop node before this one (if absent, the moved node becomes the last child of <code>targetNodeId</code>). + /// </summary> + public long InsertBeforeNodeId { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/DOM/MoveToCommandResponse.cs b/ChromeDevTools/Protocol/DOM/MoveToCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..994638ee2be888ed03faec110fe397c7d726fd36 --- /dev/null +++ b/ChromeDevTools/Protocol/DOM/MoveToCommandResponse.cs @@ -0,0 +1,17 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.DOM +{ + /// <summary> + /// Moves node into the new container, places it before the given anchor. + /// </summary> + [CommandResponse(ProtocolName.DOM.MoveTo)] + public class MoveToCommandResponse + { + /// <summary> + /// Gets or sets New id of the moved node. + /// </summary> + public long NodeId { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/DOM/Node.cs b/ChromeDevTools/Protocol/DOM/Node.cs new file mode 100644 index 0000000000000000000000000000000000000000..79c8c9be0303fdb56c030517bf8570e44b58631f --- /dev/null +++ b/ChromeDevTools/Protocol/DOM/Node.cs @@ -0,0 +1,112 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.DOM +{ + /// <summary> + /// DOM interaction is implemented in terms of mirror objects that represent the actual DOM nodes. DOMNode is a base node mirror type. + /// </summary> + public class Node + { + /// <summary> + /// Gets or sets Node identifier that is passed into the rest of the DOM messages as the <code>nodeId</code>. Backend will only push node with given <code>id</code> once. It is aware of all requested nodes and will only fire DOM events for nodes known to the client. + /// </summary> + public long NodeId { get; set; } + /// <summary> + /// Gets or sets <code>Node</code>'s nodeType. + /// </summary> + public long NodeType { get; set; } + /// <summary> + /// Gets or sets <code>Node</code>'s nodeName. + /// </summary> + public string NodeName { get; set; } + /// <summary> + /// Gets or sets <code>Node</code>'s localName. + /// </summary> + public string LocalName { get; set; } + /// <summary> + /// Gets or sets <code>Node</code>'s nodeValue. + /// </summary> + public string NodeValue { get; set; } + /// <summary> + /// Gets or sets Child count for <code>Container</code> nodes. + /// </summary> + public long ChildNodeCount { get; set; } + /// <summary> + /// Gets or sets Child nodes of this node when requested with children. + /// </summary> + public Node[] Children { get; set; } + /// <summary> + /// Gets or sets Attributes of the <code>Element</code> node in the form of flat array <code>[name1, value1, name2, value2]</code>. + /// </summary> + public string[] Attributes { get; set; } + /// <summary> + /// Gets or sets Document URL that <code>Document</code> or <code>FrameOwner</code> node points to. + /// </summary> + public string DocumentURL { get; set; } + /// <summary> + /// Gets or sets Base URL that <code>Document</code> or <code>FrameOwner</code> node uses for URL completion. + /// </summary> + public string BaseURL { get; set; } + /// <summary> + /// Gets or sets <code>DocumentType</code>'s publicId. + /// </summary> + public string PublicId { get; set; } + /// <summary> + /// Gets or sets <code>DocumentType</code>'s systemId. + /// </summary> + public string SystemId { get; set; } + /// <summary> + /// Gets or sets <code>DocumentType</code>'s internalSubset. + /// </summary> + public string InternalSubset { get; set; } + /// <summary> + /// Gets or sets <code>Document</code>'s XML version in case of XML documents. + /// </summary> + public string XmlVersion { get; set; } + /// <summary> + /// Gets or sets <code>Attr</code>'s name. + /// </summary> + public string Name { get; set; } + /// <summary> + /// Gets or sets <code>Attr</code>'s value. + /// </summary> + public string Value { get; set; } + /// <summary> + /// Gets or sets Pseudo element type for this node. + /// </summary> + public PseudoType PseudoType { get; set; } + /// <summary> + /// Gets or sets Shadow root type. + /// </summary> + public ShadowRootType ShadowRootType { get; set; } + /// <summary> + /// Gets or sets Frame ID for frame owner elements. + /// </summary> + public string FrameId { get; set; } + /// <summary> + /// Gets or sets Content document for frame owner elements. + /// </summary> + public Node ContentDocument { get; set; } + /// <summary> + /// Gets or sets Shadow root list for given element host. + /// </summary> + public Node[] ShadowRoots { get; set; } + /// <summary> + /// Gets or sets Content document fragment for template elements. + /// </summary> + public Node TemplateContent { get; set; } + /// <summary> + /// Gets or sets Pseudo elements associated with this node. + /// </summary> + public Node[] PseudoElements { get; set; } + /// <summary> + /// Gets or sets Import document for the HTMLImport links. + /// </summary> + public Node ImportedDocument { get; set; } + /// <summary> + /// Gets or sets Distributed nodes for given insertion point. + /// </summary> + public BackendNode[] DistributedNodes { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/DOM/PerformSearchCommand.cs b/ChromeDevTools/Protocol/DOM/PerformSearchCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..5cf21271df3dd29052812d1b192c2f27c77da453 --- /dev/null +++ b/ChromeDevTools/Protocol/DOM/PerformSearchCommand.cs @@ -0,0 +1,21 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.DOM +{ + /// <summary> + /// Searches for a given string in the DOM tree. Use <code>getSearchResults</code> to access search results or <code>cancelSearch</code> to end this search session. + /// </summary> + [Command(ProtocolName.DOM.PerformSearch)] + public class PerformSearchCommand + { + /// <summary> + /// Gets or sets Plain text or query selector or XPath search query. + /// </summary> + public string Query { get; set; } + /// <summary> + /// Gets or sets True to search in user agent shadow DOM. + /// </summary> + public bool IncludeUserAgentShadowDOM { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/DOM/PerformSearchCommandResponse.cs b/ChromeDevTools/Protocol/DOM/PerformSearchCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..13e854521b930d76efa30bd0e36c10c031ab263f --- /dev/null +++ b/ChromeDevTools/Protocol/DOM/PerformSearchCommandResponse.cs @@ -0,0 +1,21 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.DOM +{ + /// <summary> + /// Searches for a given string in the DOM tree. Use <code>getSearchResults</code> to access search results or <code>cancelSearch</code> to end this search session. + /// </summary> + [CommandResponse(ProtocolName.DOM.PerformSearch)] + public class PerformSearchCommandResponse + { + /// <summary> + /// Gets or sets Unique search session identifier. + /// </summary> + public string SearchId { get; set; } + /// <summary> + /// Gets or sets Number of search results. + /// </summary> + public long ResultCount { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/DOM/PseudoElementAddedEvent.cs b/ChromeDevTools/Protocol/DOM/PseudoElementAddedEvent.cs new file mode 100644 index 0000000000000000000000000000000000000000..36a2b58d997ab9ca830d156c633239a5a8ba6127 --- /dev/null +++ b/ChromeDevTools/Protocol/DOM/PseudoElementAddedEvent.cs @@ -0,0 +1,20 @@ +using ChromeDevTools; + +namespace ChromeDevTools.Protocol.DOM +{ + /// <summary> + /// Called when a pseudo element is added to an element. + /// </summary> + [Event(ProtocolName.DOM.PseudoElementAdded)] + public class PseudoElementAddedEvent + { + /// <summary> + /// Gets or sets Pseudo element's parent element id. + /// </summary> + public long ParentId { get; set; } + /// <summary> + /// Gets or sets The added pseudo element. + /// </summary> + public Node PseudoElement { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/DOM/PseudoElementRemovedEvent.cs b/ChromeDevTools/Protocol/DOM/PseudoElementRemovedEvent.cs new file mode 100644 index 0000000000000000000000000000000000000000..5791d4016906c8f53d579466068577def58c0e09 --- /dev/null +++ b/ChromeDevTools/Protocol/DOM/PseudoElementRemovedEvent.cs @@ -0,0 +1,20 @@ +using ChromeDevTools; + +namespace ChromeDevTools.Protocol.DOM +{ + /// <summary> + /// Called when a pseudo element is removed from an element. + /// </summary> + [Event(ProtocolName.DOM.PseudoElementRemoved)] + public class PseudoElementRemovedEvent + { + /// <summary> + /// Gets or sets Pseudo element's parent element id. + /// </summary> + public long ParentId { get; set; } + /// <summary> + /// Gets or sets The removed pseudo element id. + /// </summary> + public long PseudoElementId { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/DOM/PseudoType.cs b/ChromeDevTools/Protocol/DOM/PseudoType.cs new file mode 100644 index 0000000000000000000000000000000000000000..6276f172f93abc8b70bfc9ccda38a139471f7220 --- /dev/null +++ b/ChromeDevTools/Protocol/DOM/PseudoType.cs @@ -0,0 +1,25 @@ +using ChromeDevTools; + +namespace ChromeDevTools.Protocol.DOM{ + /// <summary> + /// Pseudo element type. + /// </summary> + public enum PseudoType + { + First_line, + First_letter, + Before, + After, + Backdrop, + Selection, + First_line_inherited, + Scrollbar, + Scrollbar_thumb, + Scrollbar_button, + Scrollbar_track, + Scrollbar_track_piece, + Scrollbar_corner, + Resizer, + Input_list_button, + } +} diff --git a/ChromeDevTools/Protocol/DOM/PushNodeByPathToFrontendCommand.cs b/ChromeDevTools/Protocol/DOM/PushNodeByPathToFrontendCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..967742bcb43835654dd0a81cf0e7c9ba2d9dc608 --- /dev/null +++ b/ChromeDevTools/Protocol/DOM/PushNodeByPathToFrontendCommand.cs @@ -0,0 +1,17 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.DOM +{ + /// <summary> + /// Requests that the node is sent to the caller given its path. // FIXME, use XPath + /// </summary> + [Command(ProtocolName.DOM.PushNodeByPathToFrontend)] + public class PushNodeByPathToFrontendCommand + { + /// <summary> + /// Gets or sets Path to node in the proprietary format. + /// </summary> + public string Path { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/DOM/PushNodeByPathToFrontendCommandResponse.cs b/ChromeDevTools/Protocol/DOM/PushNodeByPathToFrontendCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..eedb92444936c5ebda4b1756555226fb0120c9cc --- /dev/null +++ b/ChromeDevTools/Protocol/DOM/PushNodeByPathToFrontendCommandResponse.cs @@ -0,0 +1,17 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.DOM +{ + /// <summary> + /// Requests that the node is sent to the caller given its path. // FIXME, use XPath + /// </summary> + [CommandResponse(ProtocolName.DOM.PushNodeByPathToFrontend)] + public class PushNodeByPathToFrontendCommandResponse + { + /// <summary> + /// Gets or sets Id of the node for given path. + /// </summary> + public long NodeId { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/DOM/PushNodesByBackendIdsToFrontendCommand.cs b/ChromeDevTools/Protocol/DOM/PushNodesByBackendIdsToFrontendCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..b53d7203b3c2e219e00eaabc4148272080058578 --- /dev/null +++ b/ChromeDevTools/Protocol/DOM/PushNodesByBackendIdsToFrontendCommand.cs @@ -0,0 +1,17 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.DOM +{ + /// <summary> + /// Requests that a batch of nodes is sent to the caller given their backend node ids. + /// </summary> + [Command(ProtocolName.DOM.PushNodesByBackendIdsToFrontend)] + public class PushNodesByBackendIdsToFrontendCommand + { + /// <summary> + /// Gets or sets The array of backend node ids. + /// </summary> + public long[] BackendNodeIds { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/DOM/PushNodesByBackendIdsToFrontendCommandResponse.cs b/ChromeDevTools/Protocol/DOM/PushNodesByBackendIdsToFrontendCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..3af44082a278d3d0e9ed54434e2707c92d270a47 --- /dev/null +++ b/ChromeDevTools/Protocol/DOM/PushNodesByBackendIdsToFrontendCommandResponse.cs @@ -0,0 +1,17 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.DOM +{ + /// <summary> + /// Requests that a batch of nodes is sent to the caller given their backend node ids. + /// </summary> + [CommandResponse(ProtocolName.DOM.PushNodesByBackendIdsToFrontend)] + public class PushNodesByBackendIdsToFrontendCommandResponse + { + /// <summary> + /// Gets or sets The array of ids of pushed nodes that correspond to the backend ids specified in backendNodeIds. + /// </summary> + public long[] NodeIds { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/DOM/QuerySelectorAllCommand.cs b/ChromeDevTools/Protocol/DOM/QuerySelectorAllCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..4c1cebaf87924491d82b1892502e3cdb542d1a2b --- /dev/null +++ b/ChromeDevTools/Protocol/DOM/QuerySelectorAllCommand.cs @@ -0,0 +1,21 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.DOM +{ + /// <summary> + /// Executes <code>querySelectorAll</code> on a given node. + /// </summary> + [Command(ProtocolName.DOM.QuerySelectorAll)] + public class QuerySelectorAllCommand + { + /// <summary> + /// Gets or sets Id of the node to query upon. + /// </summary> + public long NodeId { get; set; } + /// <summary> + /// Gets or sets Selector string. + /// </summary> + public string Selector { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/DOM/QuerySelectorAllCommandResponse.cs b/ChromeDevTools/Protocol/DOM/QuerySelectorAllCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..cae230c0a81f5f672ae4ba3fa87d442f70120882 --- /dev/null +++ b/ChromeDevTools/Protocol/DOM/QuerySelectorAllCommandResponse.cs @@ -0,0 +1,17 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.DOM +{ + /// <summary> + /// Executes <code>querySelectorAll</code> on a given node. + /// </summary> + [CommandResponse(ProtocolName.DOM.QuerySelectorAll)] + public class QuerySelectorAllCommandResponse + { + /// <summary> + /// Gets or sets Query selector result. + /// </summary> + public long[] NodeIds { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/DOM/QuerySelectorCommand.cs b/ChromeDevTools/Protocol/DOM/QuerySelectorCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..fd80ca362e2077a004337046ac82930edefc61e4 --- /dev/null +++ b/ChromeDevTools/Protocol/DOM/QuerySelectorCommand.cs @@ -0,0 +1,21 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.DOM +{ + /// <summary> + /// Executes <code>querySelector</code> on a given node. + /// </summary> + [Command(ProtocolName.DOM.QuerySelector)] + public class QuerySelectorCommand + { + /// <summary> + /// Gets or sets Id of the node to query upon. + /// </summary> + public long NodeId { get; set; } + /// <summary> + /// Gets or sets Selector string. + /// </summary> + public string Selector { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/DOM/QuerySelectorCommandResponse.cs b/ChromeDevTools/Protocol/DOM/QuerySelectorCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..9eb5cb0ce8f3e165e0f5093bb23a235bca850efb --- /dev/null +++ b/ChromeDevTools/Protocol/DOM/QuerySelectorCommandResponse.cs @@ -0,0 +1,17 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.DOM +{ + /// <summary> + /// Executes <code>querySelector</code> on a given node. + /// </summary> + [CommandResponse(ProtocolName.DOM.QuerySelector)] + public class QuerySelectorCommandResponse + { + /// <summary> + /// Gets or sets Query selector result. + /// </summary> + public long NodeId { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/DOM/RGBA.cs b/ChromeDevTools/Protocol/DOM/RGBA.cs new file mode 100644 index 0000000000000000000000000000000000000000..711da1fdfff2d41b1a566e5cf94395f5ff91a7f9 --- /dev/null +++ b/ChromeDevTools/Protocol/DOM/RGBA.cs @@ -0,0 +1,28 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.DOM +{ + /// <summary> + /// A structure holding an RGBA color. + /// </summary> + public class RGBA + { + /// <summary> + /// Gets or sets The red component, in the [0-255] range. + /// </summary> + public long R { get; set; } + /// <summary> + /// Gets or sets The green component, in the [0-255] range. + /// </summary> + public long G { get; set; } + /// <summary> + /// Gets or sets The blue component, in the [0-255] range. + /// </summary> + public long B { get; set; } + /// <summary> + /// Gets or sets The alpha component, in the [0-1] range (default: 1). + /// </summary> + public double A { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/DOM/Rect.cs b/ChromeDevTools/Protocol/DOM/Rect.cs new file mode 100644 index 0000000000000000000000000000000000000000..6d30baa35b8ed265946b6c5636c06aa7f587cdf5 --- /dev/null +++ b/ChromeDevTools/Protocol/DOM/Rect.cs @@ -0,0 +1,28 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.DOM +{ + /// <summary> + /// Rectangle. + /// </summary> + public class Rect + { + /// <summary> + /// Gets or sets X coordinate + /// </summary> + public double X { get; set; } + /// <summary> + /// Gets or sets Y coordinate + /// </summary> + public double Y { get; set; } + /// <summary> + /// Gets or sets Rectangle width + /// </summary> + public double Width { get; set; } + /// <summary> + /// Gets or sets Rectangle height + /// </summary> + public double Height { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/DOM/RedoCommand.cs b/ChromeDevTools/Protocol/DOM/RedoCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..a79d914adda54be26191ef719d9fd7d06cf44226 --- /dev/null +++ b/ChromeDevTools/Protocol/DOM/RedoCommand.cs @@ -0,0 +1,13 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.DOM +{ + /// <summary> + /// Re-does the last undone action. + /// </summary> + [Command(ProtocolName.DOM.Redo)] + public class RedoCommand + { + } +} diff --git a/ChromeDevTools/Protocol/DOM/RedoCommandResponse.cs b/ChromeDevTools/Protocol/DOM/RedoCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..9e61eb7b2dfb389abd483936f8c0959d0482ee7d --- /dev/null +++ b/ChromeDevTools/Protocol/DOM/RedoCommandResponse.cs @@ -0,0 +1,13 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.DOM +{ + /// <summary> + /// Re-does the last undone action. + /// </summary> + [CommandResponse(ProtocolName.DOM.Redo)] + public class RedoCommandResponse + { + } +} diff --git a/ChromeDevTools/Protocol/DOM/RemoveAttributeCommand.cs b/ChromeDevTools/Protocol/DOM/RemoveAttributeCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..2d2fad198b1d2f4c9e0b11f1c8a64b4969446de2 --- /dev/null +++ b/ChromeDevTools/Protocol/DOM/RemoveAttributeCommand.cs @@ -0,0 +1,21 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.DOM +{ + /// <summary> + /// Removes attribute with given name from an element with given id. + /// </summary> + [Command(ProtocolName.DOM.RemoveAttribute)] + public class RemoveAttributeCommand + { + /// <summary> + /// Gets or sets Id of the element to remove attribute from. + /// </summary> + public long NodeId { get; set; } + /// <summary> + /// Gets or sets Name of the attribute to remove. + /// </summary> + public string Name { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/DOM/RemoveAttributeCommandResponse.cs b/ChromeDevTools/Protocol/DOM/RemoveAttributeCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..d5e5478b7b111975b4c992a8c4fd6dc93da2ab36 --- /dev/null +++ b/ChromeDevTools/Protocol/DOM/RemoveAttributeCommandResponse.cs @@ -0,0 +1,13 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.DOM +{ + /// <summary> + /// Removes attribute with given name from an element with given id. + /// </summary> + [CommandResponse(ProtocolName.DOM.RemoveAttribute)] + public class RemoveAttributeCommandResponse + { + } +} diff --git a/ChromeDevTools/Protocol/DOM/RemoveNodeCommand.cs b/ChromeDevTools/Protocol/DOM/RemoveNodeCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..c1864393fd3765a7b58abe22a3ce25c3428813ce --- /dev/null +++ b/ChromeDevTools/Protocol/DOM/RemoveNodeCommand.cs @@ -0,0 +1,17 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.DOM +{ + /// <summary> + /// Removes node with given id. + /// </summary> + [Command(ProtocolName.DOM.RemoveNode)] + public class RemoveNodeCommand + { + /// <summary> + /// Gets or sets Id of the node to remove. + /// </summary> + public long NodeId { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/DOM/RemoveNodeCommandResponse.cs b/ChromeDevTools/Protocol/DOM/RemoveNodeCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..68d474a3b526206d2eae63dee3c2d1b299df9c35 --- /dev/null +++ b/ChromeDevTools/Protocol/DOM/RemoveNodeCommandResponse.cs @@ -0,0 +1,13 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.DOM +{ + /// <summary> + /// Removes node with given id. + /// </summary> + [CommandResponse(ProtocolName.DOM.RemoveNode)] + public class RemoveNodeCommandResponse + { + } +} diff --git a/ChromeDevTools/Protocol/DOM/RequestChildNodesCommand.cs b/ChromeDevTools/Protocol/DOM/RequestChildNodesCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..ca76200b7ad458ea46564fcd928f967a34b6b78f --- /dev/null +++ b/ChromeDevTools/Protocol/DOM/RequestChildNodesCommand.cs @@ -0,0 +1,21 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.DOM +{ + /// <summary> + /// Requests that children of the node with given id are returned to the caller in form of <code>setChildNodes</code> events where not only immediate children are retrieved, but all children down to the specified depth. + /// </summary> + [Command(ProtocolName.DOM.RequestChildNodes)] + public class RequestChildNodesCommand + { + /// <summary> + /// Gets or sets Id of the node to get children for. + /// </summary> + public long NodeId { get; set; } + /// <summary> + /// Gets or sets The maximum depth at which children should be retrieved, defaults to 1. Use -1 for the entire subtree or provide an integer larger than 0. + /// </summary> + public long Depth { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/DOM/RequestChildNodesCommandResponse.cs b/ChromeDevTools/Protocol/DOM/RequestChildNodesCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..c153673ebfeb626d03e46665716d771e78113d78 --- /dev/null +++ b/ChromeDevTools/Protocol/DOM/RequestChildNodesCommandResponse.cs @@ -0,0 +1,13 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.DOM +{ + /// <summary> + /// Requests that children of the node with given id are returned to the caller in form of <code>setChildNodes</code> events where not only immediate children are retrieved, but all children down to the specified depth. + /// </summary> + [CommandResponse(ProtocolName.DOM.RequestChildNodes)] + public class RequestChildNodesCommandResponse + { + } +} diff --git a/ChromeDevTools/Protocol/DOM/RequestNodeCommand.cs b/ChromeDevTools/Protocol/DOM/RequestNodeCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..fa2a4c0e874313bce8d6d4d8e28fc8b8c6f6760c --- /dev/null +++ b/ChromeDevTools/Protocol/DOM/RequestNodeCommand.cs @@ -0,0 +1,17 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.DOM +{ + /// <summary> + /// Requests that the node is sent to the caller given the JavaScript node object reference. All nodes that form the path from the node to the root are also sent to the client as a series of <code>setChildNodes</code> notifications. + /// </summary> + [Command(ProtocolName.DOM.RequestNode)] + public class RequestNodeCommand + { + /// <summary> + /// Gets or sets JavaScript object id to convert into node. + /// </summary> + public string ObjectId { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/DOM/RequestNodeCommandResponse.cs b/ChromeDevTools/Protocol/DOM/RequestNodeCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..e4d1c19182bee1839aa675904635e1d9c0649716 --- /dev/null +++ b/ChromeDevTools/Protocol/DOM/RequestNodeCommandResponse.cs @@ -0,0 +1,17 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.DOM +{ + /// <summary> + /// Requests that the node is sent to the caller given the JavaScript node object reference. All nodes that form the path from the node to the root are also sent to the client as a series of <code>setChildNodes</code> notifications. + /// </summary> + [CommandResponse(ProtocolName.DOM.RequestNode)] + public class RequestNodeCommandResponse + { + /// <summary> + /// Gets or sets Node id for given object. + /// </summary> + public long NodeId { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/DOM/ResolveNodeCommand.cs b/ChromeDevTools/Protocol/DOM/ResolveNodeCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..5ad000a69ee2c0102e5e493b16d06421bd0896bf --- /dev/null +++ b/ChromeDevTools/Protocol/DOM/ResolveNodeCommand.cs @@ -0,0 +1,21 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.DOM +{ + /// <summary> + /// Resolves JavaScript node object for given node id. + /// </summary> + [Command(ProtocolName.DOM.ResolveNode)] + public class ResolveNodeCommand + { + /// <summary> + /// Gets or sets Id of the node to resolve. + /// </summary> + public long NodeId { get; set; } + /// <summary> + /// Gets or sets Symbolic group name that can be used to release multiple objects. + /// </summary> + public string ObjectGroup { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/DOM/ResolveNodeCommandResponse.cs b/ChromeDevTools/Protocol/DOM/ResolveNodeCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..fb260d901de793cef4dc4d67077608f15665b908 --- /dev/null +++ b/ChromeDevTools/Protocol/DOM/ResolveNodeCommandResponse.cs @@ -0,0 +1,17 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.DOM +{ + /// <summary> + /// Resolves JavaScript node object for given node id. + /// </summary> + [CommandResponse(ProtocolName.DOM.ResolveNode)] + public class ResolveNodeCommandResponse + { + /// <summary> + /// Gets or sets JavaScript object wrapper for given node. + /// </summary> + public Runtime.RemoteObject Object { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/DOM/SetAttributeValueCommand.cs b/ChromeDevTools/Protocol/DOM/SetAttributeValueCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..1ed0a2e74b5e6bb85eee75a387b9428262f3735b --- /dev/null +++ b/ChromeDevTools/Protocol/DOM/SetAttributeValueCommand.cs @@ -0,0 +1,25 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.DOM +{ + /// <summary> + /// Sets attribute for an element with given id. + /// </summary> + [Command(ProtocolName.DOM.SetAttributeValue)] + public class SetAttributeValueCommand + { + /// <summary> + /// Gets or sets Id of the element to set attribute for. + /// </summary> + public long NodeId { get; set; } + /// <summary> + /// Gets or sets Attribute name. + /// </summary> + public string Name { get; set; } + /// <summary> + /// Gets or sets Attribute value. + /// </summary> + public string Value { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/DOM/SetAttributeValueCommandResponse.cs b/ChromeDevTools/Protocol/DOM/SetAttributeValueCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..6d3cce91b96afe7ba2a4508039b9f7c6d285f3ea --- /dev/null +++ b/ChromeDevTools/Protocol/DOM/SetAttributeValueCommandResponse.cs @@ -0,0 +1,13 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.DOM +{ + /// <summary> + /// Sets attribute for an element with given id. + /// </summary> + [CommandResponse(ProtocolName.DOM.SetAttributeValue)] + public class SetAttributeValueCommandResponse + { + } +} diff --git a/ChromeDevTools/Protocol/DOM/SetAttributesAsTextCommand.cs b/ChromeDevTools/Protocol/DOM/SetAttributesAsTextCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..76a6278314a578127beb1659be2b228249f8173c --- /dev/null +++ b/ChromeDevTools/Protocol/DOM/SetAttributesAsTextCommand.cs @@ -0,0 +1,25 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.DOM +{ + /// <summary> + /// Sets attributes on element with given id. This method is useful when user edits some existing attribute value and types in several attribute name/value pairs. + /// </summary> + [Command(ProtocolName.DOM.SetAttributesAsText)] + public class SetAttributesAsTextCommand + { + /// <summary> + /// Gets or sets Id of the element to set attributes for. + /// </summary> + public long NodeId { get; set; } + /// <summary> + /// Gets or sets Text with a number of attributes. Will parse this text using HTML parser. + /// </summary> + public string Text { get; set; } + /// <summary> + /// Gets or sets Attribute name to replace with new attributes derived from text in case text parsed successfully. + /// </summary> + public string Name { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/DOM/SetAttributesAsTextCommandResponse.cs b/ChromeDevTools/Protocol/DOM/SetAttributesAsTextCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..edcab04f18fae55cf74ead2e96c532a4c2f305a6 --- /dev/null +++ b/ChromeDevTools/Protocol/DOM/SetAttributesAsTextCommandResponse.cs @@ -0,0 +1,13 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.DOM +{ + /// <summary> + /// Sets attributes on element with given id. This method is useful when user edits some existing attribute value and types in several attribute name/value pairs. + /// </summary> + [CommandResponse(ProtocolName.DOM.SetAttributesAsText)] + public class SetAttributesAsTextCommandResponse + { + } +} diff --git a/ChromeDevTools/Protocol/DOM/SetChildNodesEvent.cs b/ChromeDevTools/Protocol/DOM/SetChildNodesEvent.cs new file mode 100644 index 0000000000000000000000000000000000000000..f7ef1b66e4d0cc51c306f312caf90951e998815c --- /dev/null +++ b/ChromeDevTools/Protocol/DOM/SetChildNodesEvent.cs @@ -0,0 +1,20 @@ +using ChromeDevTools; + +namespace ChromeDevTools.Protocol.DOM +{ + /// <summary> + /// Fired when backend wants to provide client with the missing DOM structure. This happens upon most of the calls requesting node ids. + /// </summary> + [Event(ProtocolName.DOM.SetChildNodes)] + public class SetChildNodesEvent + { + /// <summary> + /// Gets or sets Parent node id to populate with children. + /// </summary> + public long ParentId { get; set; } + /// <summary> + /// Gets or sets Child nodes array. + /// </summary> + public Node[] Nodes { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/DOM/SetFileInputFilesCommand.cs b/ChromeDevTools/Protocol/DOM/SetFileInputFilesCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..a8877807cc7c61922b6dd4a3dd44ebae3cb4fb4b --- /dev/null +++ b/ChromeDevTools/Protocol/DOM/SetFileInputFilesCommand.cs @@ -0,0 +1,21 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.DOM +{ + /// <summary> + /// Sets files for the given file input element. + /// </summary> + [Command(ProtocolName.DOM.SetFileInputFiles)] + public class SetFileInputFilesCommand + { + /// <summary> + /// Gets or sets Id of the file input node to set files for. + /// </summary> + public long NodeId { get; set; } + /// <summary> + /// Gets or sets Array of file paths to set. + /// </summary> + public string[] Files { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/DOM/SetFileInputFilesCommandResponse.cs b/ChromeDevTools/Protocol/DOM/SetFileInputFilesCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..0ba9cbdbbf82dccd218c39b6d5d1761f5c67beaa --- /dev/null +++ b/ChromeDevTools/Protocol/DOM/SetFileInputFilesCommandResponse.cs @@ -0,0 +1,13 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.DOM +{ + /// <summary> + /// Sets files for the given file input element. + /// </summary> + [CommandResponse(ProtocolName.DOM.SetFileInputFiles)] + public class SetFileInputFilesCommandResponse + { + } +} diff --git a/ChromeDevTools/Protocol/DOM/SetInspectModeEnabledCommand.cs b/ChromeDevTools/Protocol/DOM/SetInspectModeEnabledCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..97add217463aa7fd478242ec168363b61e5a1f5e --- /dev/null +++ b/ChromeDevTools/Protocol/DOM/SetInspectModeEnabledCommand.cs @@ -0,0 +1,25 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.DOM +{ + /// <summary> + /// Enters the 'inspect' mode. In this mode, elements that user is hovering over are highlighted. Backend then generates 'inspectNodeRequested' event upon element selection. + /// </summary> + [Command(ProtocolName.DOM.SetInspectModeEnabled)] + public class SetInspectModeEnabledCommand + { + /// <summary> + /// Gets or sets True to enable inspection mode, false to disable it. + /// </summary> + public bool Enabled { get; set; } + /// <summary> + /// Gets or sets True to enable inspection mode for user agent shadow DOM. + /// </summary> + public bool InspectUAShadowDOM { get; set; } + /// <summary> + /// Gets or sets A descriptor for the highlight appearance of hovered-over nodes. May be omitted if <code>enabled == false</code>. + /// </summary> + public HighlightConfig HighlightConfig { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/DOM/SetInspectModeEnabledCommandResponse.cs b/ChromeDevTools/Protocol/DOM/SetInspectModeEnabledCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..7232e8400d42027bcd02fe95a39c66a90c32302a --- /dev/null +++ b/ChromeDevTools/Protocol/DOM/SetInspectModeEnabledCommandResponse.cs @@ -0,0 +1,13 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.DOM +{ + /// <summary> + /// Enters the 'inspect' mode. In this mode, elements that user is hovering over are highlighted. Backend then generates 'inspectNodeRequested' event upon element selection. + /// </summary> + [CommandResponse(ProtocolName.DOM.SetInspectModeEnabled)] + public class SetInspectModeEnabledCommandResponse + { + } +} diff --git a/ChromeDevTools/Protocol/DOM/SetInspectedNodeCommand.cs b/ChromeDevTools/Protocol/DOM/SetInspectedNodeCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..774303bf2c08e9e1976368d8d29982a789a90882 --- /dev/null +++ b/ChromeDevTools/Protocol/DOM/SetInspectedNodeCommand.cs @@ -0,0 +1,17 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.DOM +{ + /// <summary> + /// Enables console to refer to the node with given id via $x (see Command Line API for more details $x functions). + /// </summary> + [Command(ProtocolName.DOM.SetInspectedNode)] + public class SetInspectedNodeCommand + { + /// <summary> + /// Gets or sets DOM node id to be accessible by means of $x command line API. + /// </summary> + public long NodeId { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/DOM/SetInspectedNodeCommandResponse.cs b/ChromeDevTools/Protocol/DOM/SetInspectedNodeCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..84ebefa2671ca37438db6693d1c738aa801765b9 --- /dev/null +++ b/ChromeDevTools/Protocol/DOM/SetInspectedNodeCommandResponse.cs @@ -0,0 +1,13 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.DOM +{ + /// <summary> + /// Enables console to refer to the node with given id via $x (see Command Line API for more details $x functions). + /// </summary> + [CommandResponse(ProtocolName.DOM.SetInspectedNode)] + public class SetInspectedNodeCommandResponse + { + } +} diff --git a/ChromeDevTools/Protocol/DOM/SetNodeNameCommand.cs b/ChromeDevTools/Protocol/DOM/SetNodeNameCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..119f9c7dd135435399dd308cff2eb8e2c8c2f2e2 --- /dev/null +++ b/ChromeDevTools/Protocol/DOM/SetNodeNameCommand.cs @@ -0,0 +1,21 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.DOM +{ + /// <summary> + /// Sets node name for a node with given id. + /// </summary> + [Command(ProtocolName.DOM.SetNodeName)] + public class SetNodeNameCommand + { + /// <summary> + /// Gets or sets Id of the node to set name for. + /// </summary> + public long NodeId { get; set; } + /// <summary> + /// Gets or sets New node's name. + /// </summary> + public string Name { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/DOM/SetNodeNameCommandResponse.cs b/ChromeDevTools/Protocol/DOM/SetNodeNameCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..60f6f60387852a0d4b79c8dc302176eaf1b8f4db --- /dev/null +++ b/ChromeDevTools/Protocol/DOM/SetNodeNameCommandResponse.cs @@ -0,0 +1,17 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.DOM +{ + /// <summary> + /// Sets node name for a node with given id. + /// </summary> + [CommandResponse(ProtocolName.DOM.SetNodeName)] + public class SetNodeNameCommandResponse + { + /// <summary> + /// Gets or sets New node's id. + /// </summary> + public long NodeId { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/DOM/SetNodeValueCommand.cs b/ChromeDevTools/Protocol/DOM/SetNodeValueCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..46f9fd888ea1208c3fe33b253d9502f2ea7c638f --- /dev/null +++ b/ChromeDevTools/Protocol/DOM/SetNodeValueCommand.cs @@ -0,0 +1,21 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.DOM +{ + /// <summary> + /// Sets node value for a node with given id. + /// </summary> + [Command(ProtocolName.DOM.SetNodeValue)] + public class SetNodeValueCommand + { + /// <summary> + /// Gets or sets Id of the node to set value for. + /// </summary> + public long NodeId { get; set; } + /// <summary> + /// Gets or sets New node's value. + /// </summary> + public string Value { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/DOM/SetNodeValueCommandResponse.cs b/ChromeDevTools/Protocol/DOM/SetNodeValueCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..2ac699325922029a0b77aaf14ef0cc6510484ddd --- /dev/null +++ b/ChromeDevTools/Protocol/DOM/SetNodeValueCommandResponse.cs @@ -0,0 +1,13 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.DOM +{ + /// <summary> + /// Sets node value for a node with given id. + /// </summary> + [CommandResponse(ProtocolName.DOM.SetNodeValue)] + public class SetNodeValueCommandResponse + { + } +} diff --git a/ChromeDevTools/Protocol/DOM/SetOuterHTMLCommand.cs b/ChromeDevTools/Protocol/DOM/SetOuterHTMLCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..c115a61fbff941d15f69387a42efd66f396e3f02 --- /dev/null +++ b/ChromeDevTools/Protocol/DOM/SetOuterHTMLCommand.cs @@ -0,0 +1,21 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.DOM +{ + /// <summary> + /// Sets node HTML markup, returns new node id. + /// </summary> + [Command(ProtocolName.DOM.SetOuterHTML)] + public class SetOuterHTMLCommand + { + /// <summary> + /// Gets or sets Id of the node to set markup for. + /// </summary> + public long NodeId { get; set; } + /// <summary> + /// Gets or sets Outer HTML markup to set. + /// </summary> + public string OuterHTML { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/DOM/SetOuterHTMLCommandResponse.cs b/ChromeDevTools/Protocol/DOM/SetOuterHTMLCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..5891c5dc6ac024a2b523978e63217c976ed28728 --- /dev/null +++ b/ChromeDevTools/Protocol/DOM/SetOuterHTMLCommandResponse.cs @@ -0,0 +1,13 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.DOM +{ + /// <summary> + /// Sets node HTML markup, returns new node id. + /// </summary> + [CommandResponse(ProtocolName.DOM.SetOuterHTML)] + public class SetOuterHTMLCommandResponse + { + } +} diff --git a/ChromeDevTools/Protocol/DOM/ShadowRootPoppedEvent.cs b/ChromeDevTools/Protocol/DOM/ShadowRootPoppedEvent.cs new file mode 100644 index 0000000000000000000000000000000000000000..206b8dd4e3b139d1ccf18d45428a49e0187d9030 --- /dev/null +++ b/ChromeDevTools/Protocol/DOM/ShadowRootPoppedEvent.cs @@ -0,0 +1,20 @@ +using ChromeDevTools; + +namespace ChromeDevTools.Protocol.DOM +{ + /// <summary> + /// Called when shadow root is popped from the element. + /// </summary> + [Event(ProtocolName.DOM.ShadowRootPopped)] + public class ShadowRootPoppedEvent + { + /// <summary> + /// Gets or sets Host element id. + /// </summary> + public long HostId { get; set; } + /// <summary> + /// Gets or sets Shadow root id. + /// </summary> + public long RootId { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/DOM/ShadowRootPushedEvent.cs b/ChromeDevTools/Protocol/DOM/ShadowRootPushedEvent.cs new file mode 100644 index 0000000000000000000000000000000000000000..708353e34ea8fb88651ff6dcb16a1406162a7d01 --- /dev/null +++ b/ChromeDevTools/Protocol/DOM/ShadowRootPushedEvent.cs @@ -0,0 +1,20 @@ +using ChromeDevTools; + +namespace ChromeDevTools.Protocol.DOM +{ + /// <summary> + /// Called when shadow root is pushed into the element. + /// </summary> + [Event(ProtocolName.DOM.ShadowRootPushed)] + public class ShadowRootPushedEvent + { + /// <summary> + /// Gets or sets Host element id. + /// </summary> + public long HostId { get; set; } + /// <summary> + /// Gets or sets Shadow root. + /// </summary> + public Node Root { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/DOM/ShadowRootType.cs b/ChromeDevTools/Protocol/DOM/ShadowRootType.cs new file mode 100644 index 0000000000000000000000000000000000000000..10d722639c4f43c49d9fe0e1076c7a9402a63580 --- /dev/null +++ b/ChromeDevTools/Protocol/DOM/ShadowRootType.cs @@ -0,0 +1,12 @@ +using ChromeDevTools; + +namespace ChromeDevTools.Protocol.DOM{ + /// <summary> + /// Shadow root type. + /// </summary> + public enum ShadowRootType + { + User_agent, + Author, + } +} diff --git a/ChromeDevTools/Protocol/DOM/ShapeOutsideInfo.cs b/ChromeDevTools/Protocol/DOM/ShapeOutsideInfo.cs new file mode 100644 index 0000000000000000000000000000000000000000..ee43f5534d645be355e4303f31391f714326db23 --- /dev/null +++ b/ChromeDevTools/Protocol/DOM/ShapeOutsideInfo.cs @@ -0,0 +1,24 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.DOM +{ + /// <summary> + /// CSS Shape Outside details. + /// </summary> + public class ShapeOutsideInfo + { + /// <summary> + /// Gets or sets Shape bounds + /// </summary> + public double[] Bounds { get; set; } + /// <summary> + /// Gets or sets Shape coordinate details + /// </summary> + public object[] Shape { get; set; } + /// <summary> + /// Gets or sets Margin shape bounds + /// </summary> + public object[] MarginShape { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/DOM/UndoCommand.cs b/ChromeDevTools/Protocol/DOM/UndoCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..f402ef0152de8f1f553691c8ed0ada247085733b --- /dev/null +++ b/ChromeDevTools/Protocol/DOM/UndoCommand.cs @@ -0,0 +1,13 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.DOM +{ + /// <summary> + /// Undoes the last performed action. + /// </summary> + [Command(ProtocolName.DOM.Undo)] + public class UndoCommand + { + } +} diff --git a/ChromeDevTools/Protocol/DOM/UndoCommandResponse.cs b/ChromeDevTools/Protocol/DOM/UndoCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..dbf4e023a58d64597fde43813ecc77b0ebff2a36 --- /dev/null +++ b/ChromeDevTools/Protocol/DOM/UndoCommandResponse.cs @@ -0,0 +1,13 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.DOM +{ + /// <summary> + /// Undoes the last performed action. + /// </summary> + [CommandResponse(ProtocolName.DOM.Undo)] + public class UndoCommandResponse + { + } +} diff --git a/ChromeDevTools/Protocol/DOMDebugger/DOMBreakpointType.cs b/ChromeDevTools/Protocol/DOMDebugger/DOMBreakpointType.cs new file mode 100644 index 0000000000000000000000000000000000000000..92271ea04ee402642530ae368a8133c18e4a1baa --- /dev/null +++ b/ChromeDevTools/Protocol/DOMDebugger/DOMBreakpointType.cs @@ -0,0 +1,13 @@ +using ChromeDevTools; + +namespace ChromeDevTools.Protocol.DOMDebugger{ + /// <summary> + /// DOM breakpoint type. + /// </summary> + public enum DOMBreakpointType + { + Subtree_modified, + Attribute_modified, + Node_removed, + } +} diff --git a/ChromeDevTools/Protocol/DOMDebugger/RemoveDOMBreakpointCommand.cs b/ChromeDevTools/Protocol/DOMDebugger/RemoveDOMBreakpointCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..c7c182f39b018e046dbca309a54fddd8ee52448d --- /dev/null +++ b/ChromeDevTools/Protocol/DOMDebugger/RemoveDOMBreakpointCommand.cs @@ -0,0 +1,21 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.DOMDebugger +{ + /// <summary> + /// Removes DOM breakpoint that was set using <code>setDOMBreakpoint</code>. + /// </summary> + [Command(ProtocolName.DOMDebugger.RemoveDOMBreakpoint)] + public class RemoveDOMBreakpointCommand + { + /// <summary> + /// Gets or sets Identifier of the node to remove breakpoint from. + /// </summary> + public long NodeId { get; set; } + /// <summary> + /// Gets or sets Type of the breakpoint to remove. + /// </summary> + public DOMBreakpointType Type { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/DOMDebugger/RemoveDOMBreakpointCommandResponse.cs b/ChromeDevTools/Protocol/DOMDebugger/RemoveDOMBreakpointCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..075b9fae84fb693a53d78c68bb59fac991a83cdb --- /dev/null +++ b/ChromeDevTools/Protocol/DOMDebugger/RemoveDOMBreakpointCommandResponse.cs @@ -0,0 +1,13 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.DOMDebugger +{ + /// <summary> + /// Removes DOM breakpoint that was set using <code>setDOMBreakpoint</code>. + /// </summary> + [CommandResponse(ProtocolName.DOMDebugger.RemoveDOMBreakpoint)] + public class RemoveDOMBreakpointCommandResponse + { + } +} diff --git a/ChromeDevTools/Protocol/DOMDebugger/RemoveEventListenerBreakpointCommand.cs b/ChromeDevTools/Protocol/DOMDebugger/RemoveEventListenerBreakpointCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..675718e34e6cc9925e9df76e6656051401c0f910 --- /dev/null +++ b/ChromeDevTools/Protocol/DOMDebugger/RemoveEventListenerBreakpointCommand.cs @@ -0,0 +1,21 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.DOMDebugger +{ + /// <summary> + /// Removes breakpoint on particular DOM event. + /// </summary> + [Command(ProtocolName.DOMDebugger.RemoveEventListenerBreakpoint)] + public class RemoveEventListenerBreakpointCommand + { + /// <summary> + /// Gets or sets Event name. + /// </summary> + public string EventName { get; set; } + /// <summary> + /// Gets or sets EventTarget interface name. + /// </summary> + public string TargetName { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/DOMDebugger/RemoveEventListenerBreakpointCommandResponse.cs b/ChromeDevTools/Protocol/DOMDebugger/RemoveEventListenerBreakpointCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..c13bfebff54ac15fb20d1bffdcf95704197fff6d --- /dev/null +++ b/ChromeDevTools/Protocol/DOMDebugger/RemoveEventListenerBreakpointCommandResponse.cs @@ -0,0 +1,13 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.DOMDebugger +{ + /// <summary> + /// Removes breakpoint on particular DOM event. + /// </summary> + [CommandResponse(ProtocolName.DOMDebugger.RemoveEventListenerBreakpoint)] + public class RemoveEventListenerBreakpointCommandResponse + { + } +} diff --git a/ChromeDevTools/Protocol/DOMDebugger/RemoveInstrumentationBreakpointCommand.cs b/ChromeDevTools/Protocol/DOMDebugger/RemoveInstrumentationBreakpointCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..78e6412520183b504e8ee7bea009828590987af7 --- /dev/null +++ b/ChromeDevTools/Protocol/DOMDebugger/RemoveInstrumentationBreakpointCommand.cs @@ -0,0 +1,17 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.DOMDebugger +{ + /// <summary> + /// Removes breakpoint on particular native event. + /// </summary> + [Command(ProtocolName.DOMDebugger.RemoveInstrumentationBreakpoint)] + public class RemoveInstrumentationBreakpointCommand + { + /// <summary> + /// Gets or sets Instrumentation name to stop on. + /// </summary> + public string EventName { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/DOMDebugger/RemoveInstrumentationBreakpointCommandResponse.cs b/ChromeDevTools/Protocol/DOMDebugger/RemoveInstrumentationBreakpointCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..93a0a01c00e5f97c79775a4fae1cc491cd032452 --- /dev/null +++ b/ChromeDevTools/Protocol/DOMDebugger/RemoveInstrumentationBreakpointCommandResponse.cs @@ -0,0 +1,13 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.DOMDebugger +{ + /// <summary> + /// Removes breakpoint on particular native event. + /// </summary> + [CommandResponse(ProtocolName.DOMDebugger.RemoveInstrumentationBreakpoint)] + public class RemoveInstrumentationBreakpointCommandResponse + { + } +} diff --git a/ChromeDevTools/Protocol/DOMDebugger/RemoveXHRBreakpointCommand.cs b/ChromeDevTools/Protocol/DOMDebugger/RemoveXHRBreakpointCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..ea7176d837174e54b569739cf59b86c7d2868262 --- /dev/null +++ b/ChromeDevTools/Protocol/DOMDebugger/RemoveXHRBreakpointCommand.cs @@ -0,0 +1,17 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.DOMDebugger +{ + /// <summary> + /// Removes breakpoint from XMLHttpRequest. + /// </summary> + [Command(ProtocolName.DOMDebugger.RemoveXHRBreakpoint)] + public class RemoveXHRBreakpointCommand + { + /// <summary> + /// Gets or sets Resource URL substring. + /// </summary> + public string Url { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/DOMDebugger/RemoveXHRBreakpointCommandResponse.cs b/ChromeDevTools/Protocol/DOMDebugger/RemoveXHRBreakpointCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..5059b2d765aab1e8480e367bcb18e3f5bf55ee30 --- /dev/null +++ b/ChromeDevTools/Protocol/DOMDebugger/RemoveXHRBreakpointCommandResponse.cs @@ -0,0 +1,13 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.DOMDebugger +{ + /// <summary> + /// Removes breakpoint from XMLHttpRequest. + /// </summary> + [CommandResponse(ProtocolName.DOMDebugger.RemoveXHRBreakpoint)] + public class RemoveXHRBreakpointCommandResponse + { + } +} diff --git a/ChromeDevTools/Protocol/DOMDebugger/SetDOMBreakpointCommand.cs b/ChromeDevTools/Protocol/DOMDebugger/SetDOMBreakpointCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..dedd776912eef1e4f4f71cef0eebd14a88c76a95 --- /dev/null +++ b/ChromeDevTools/Protocol/DOMDebugger/SetDOMBreakpointCommand.cs @@ -0,0 +1,21 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.DOMDebugger +{ + /// <summary> + /// Sets breakpoint on particular operation with DOM. + /// </summary> + [Command(ProtocolName.DOMDebugger.SetDOMBreakpoint)] + public class SetDOMBreakpointCommand + { + /// <summary> + /// Gets or sets Identifier of the node to set breakpoint on. + /// </summary> + public long NodeId { get; set; } + /// <summary> + /// Gets or sets Type of the operation to stop upon. + /// </summary> + public DOMBreakpointType Type { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/DOMDebugger/SetDOMBreakpointCommandResponse.cs b/ChromeDevTools/Protocol/DOMDebugger/SetDOMBreakpointCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..1fdcbd46b93c1fbeb236f4918ffd97cff557ea2b --- /dev/null +++ b/ChromeDevTools/Protocol/DOMDebugger/SetDOMBreakpointCommandResponse.cs @@ -0,0 +1,13 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.DOMDebugger +{ + /// <summary> + /// Sets breakpoint on particular operation with DOM. + /// </summary> + [CommandResponse(ProtocolName.DOMDebugger.SetDOMBreakpoint)] + public class SetDOMBreakpointCommandResponse + { + } +} diff --git a/ChromeDevTools/Protocol/DOMDebugger/SetEventListenerBreakpointCommand.cs b/ChromeDevTools/Protocol/DOMDebugger/SetEventListenerBreakpointCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..9179febc6f3dfdd4a42dfe553d19557e136274c7 --- /dev/null +++ b/ChromeDevTools/Protocol/DOMDebugger/SetEventListenerBreakpointCommand.cs @@ -0,0 +1,21 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.DOMDebugger +{ + /// <summary> + /// Sets breakpoint on particular DOM event. + /// </summary> + [Command(ProtocolName.DOMDebugger.SetEventListenerBreakpoint)] + public class SetEventListenerBreakpointCommand + { + /// <summary> + /// Gets or sets DOM Event name to stop on (any DOM event will do). + /// </summary> + public string EventName { get; set; } + /// <summary> + /// Gets or sets EventTarget interface name to stop on. If equal to <code>"*"</code> or not provided, will stop on any EventTarget. + /// </summary> + public string TargetName { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/DOMDebugger/SetEventListenerBreakpointCommandResponse.cs b/ChromeDevTools/Protocol/DOMDebugger/SetEventListenerBreakpointCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..6cd33eaadb20736c901b1e1781481c496ee91e97 --- /dev/null +++ b/ChromeDevTools/Protocol/DOMDebugger/SetEventListenerBreakpointCommandResponse.cs @@ -0,0 +1,13 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.DOMDebugger +{ + /// <summary> + /// Sets breakpoint on particular DOM event. + /// </summary> + [CommandResponse(ProtocolName.DOMDebugger.SetEventListenerBreakpoint)] + public class SetEventListenerBreakpointCommandResponse + { + } +} diff --git a/ChromeDevTools/Protocol/DOMDebugger/SetInstrumentationBreakpointCommand.cs b/ChromeDevTools/Protocol/DOMDebugger/SetInstrumentationBreakpointCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..9e8ad4800e94267cae3cb24cac796a2868d55023 --- /dev/null +++ b/ChromeDevTools/Protocol/DOMDebugger/SetInstrumentationBreakpointCommand.cs @@ -0,0 +1,17 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.DOMDebugger +{ + /// <summary> + /// Sets breakpoint on particular native event. + /// </summary> + [Command(ProtocolName.DOMDebugger.SetInstrumentationBreakpoint)] + public class SetInstrumentationBreakpointCommand + { + /// <summary> + /// Gets or sets Instrumentation name to stop on. + /// </summary> + public string EventName { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/DOMDebugger/SetInstrumentationBreakpointCommandResponse.cs b/ChromeDevTools/Protocol/DOMDebugger/SetInstrumentationBreakpointCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..7b7198ba050fa616ecde7f3f261fe233081bb764 --- /dev/null +++ b/ChromeDevTools/Protocol/DOMDebugger/SetInstrumentationBreakpointCommandResponse.cs @@ -0,0 +1,13 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.DOMDebugger +{ + /// <summary> + /// Sets breakpoint on particular native event. + /// </summary> + [CommandResponse(ProtocolName.DOMDebugger.SetInstrumentationBreakpoint)] + public class SetInstrumentationBreakpointCommandResponse + { + } +} diff --git a/ChromeDevTools/Protocol/DOMDebugger/SetXHRBreakpointCommand.cs b/ChromeDevTools/Protocol/DOMDebugger/SetXHRBreakpointCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..81020f2d790c34ca0d1c5d4a90d7987d24517044 --- /dev/null +++ b/ChromeDevTools/Protocol/DOMDebugger/SetXHRBreakpointCommand.cs @@ -0,0 +1,17 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.DOMDebugger +{ + /// <summary> + /// Sets breakpoint on XMLHttpRequest. + /// </summary> + [Command(ProtocolName.DOMDebugger.SetXHRBreakpoint)] + public class SetXHRBreakpointCommand + { + /// <summary> + /// Gets or sets Resource URL substring. All XHRs having this substring in the URL will get stopped upon. + /// </summary> + public string Url { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/DOMDebugger/SetXHRBreakpointCommandResponse.cs b/ChromeDevTools/Protocol/DOMDebugger/SetXHRBreakpointCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..6735fb097ab5fdfebd2d2896864be423e15784cb --- /dev/null +++ b/ChromeDevTools/Protocol/DOMDebugger/SetXHRBreakpointCommandResponse.cs @@ -0,0 +1,13 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.DOMDebugger +{ + /// <summary> + /// Sets breakpoint on XMLHttpRequest. + /// </summary> + [CommandResponse(ProtocolName.DOMDebugger.SetXHRBreakpoint)] + public class SetXHRBreakpointCommandResponse + { + } +} diff --git a/ChromeDevTools/Protocol/DOMStorage/DisableCommand.cs b/ChromeDevTools/Protocol/DOMStorage/DisableCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..aad5d4617f60dc779155448f867d71ed73dca04d --- /dev/null +++ b/ChromeDevTools/Protocol/DOMStorage/DisableCommand.cs @@ -0,0 +1,13 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.DOMStorage +{ + /// <summary> + /// Disables storage tracking, prevents storage events from being sent to the client. + /// </summary> + [Command(ProtocolName.DOMStorage.Disable)] + public class DisableCommand + { + } +} diff --git a/ChromeDevTools/Protocol/DOMStorage/DisableCommandResponse.cs b/ChromeDevTools/Protocol/DOMStorage/DisableCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..fd45a5a3c566c6128a553f22a49f765647e90b2b --- /dev/null +++ b/ChromeDevTools/Protocol/DOMStorage/DisableCommandResponse.cs @@ -0,0 +1,13 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.DOMStorage +{ + /// <summary> + /// Disables storage tracking, prevents storage events from being sent to the client. + /// </summary> + [CommandResponse(ProtocolName.DOMStorage.Disable)] + public class DisableCommandResponse + { + } +} diff --git a/ChromeDevTools/Protocol/DOMStorage/DomStorageItemAddedEvent.cs b/ChromeDevTools/Protocol/DOMStorage/DomStorageItemAddedEvent.cs new file mode 100644 index 0000000000000000000000000000000000000000..0461774ee69b4c1508e2c1ede84627aa406db864 --- /dev/null +++ b/ChromeDevTools/Protocol/DOMStorage/DomStorageItemAddedEvent.cs @@ -0,0 +1,21 @@ +using ChromeDevTools; + +namespace ChromeDevTools.Protocol.DOMStorage +{ + [Event(ProtocolName.DOMStorage.DomStorageItemAdded)] + public class DomStorageItemAddedEvent + { + /// <summary> + /// Gets or sets StorageId + /// </summary> + public StorageId StorageId { get; set; } + /// <summary> + /// Gets or sets Key + /// </summary> + public string Key { get; set; } + /// <summary> + /// Gets or sets NewValue + /// </summary> + public string NewValue { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/DOMStorage/DomStorageItemRemovedEvent.cs b/ChromeDevTools/Protocol/DOMStorage/DomStorageItemRemovedEvent.cs new file mode 100644 index 0000000000000000000000000000000000000000..077b479387ba4a5560bfccc76c169638f7624758 --- /dev/null +++ b/ChromeDevTools/Protocol/DOMStorage/DomStorageItemRemovedEvent.cs @@ -0,0 +1,17 @@ +using ChromeDevTools; + +namespace ChromeDevTools.Protocol.DOMStorage +{ + [Event(ProtocolName.DOMStorage.DomStorageItemRemoved)] + public class DomStorageItemRemovedEvent + { + /// <summary> + /// Gets or sets StorageId + /// </summary> + public StorageId StorageId { get; set; } + /// <summary> + /// Gets or sets Key + /// </summary> + public string Key { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/DOMStorage/DomStorageItemUpdatedEvent.cs b/ChromeDevTools/Protocol/DOMStorage/DomStorageItemUpdatedEvent.cs new file mode 100644 index 0000000000000000000000000000000000000000..f19bbd67cb196785b8d1b2cf0a2262b3270a2b6a --- /dev/null +++ b/ChromeDevTools/Protocol/DOMStorage/DomStorageItemUpdatedEvent.cs @@ -0,0 +1,25 @@ +using ChromeDevTools; + +namespace ChromeDevTools.Protocol.DOMStorage +{ + [Event(ProtocolName.DOMStorage.DomStorageItemUpdated)] + public class DomStorageItemUpdatedEvent + { + /// <summary> + /// Gets or sets StorageId + /// </summary> + public StorageId StorageId { get; set; } + /// <summary> + /// Gets or sets Key + /// </summary> + public string Key { get; set; } + /// <summary> + /// Gets or sets OldValue + /// </summary> + public string OldValue { get; set; } + /// <summary> + /// Gets or sets NewValue + /// </summary> + public string NewValue { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/DOMStorage/DomStorageItemsClearedEvent.cs b/ChromeDevTools/Protocol/DOMStorage/DomStorageItemsClearedEvent.cs new file mode 100644 index 0000000000000000000000000000000000000000..a1774384b7b192713a95e46c390af2c0c2ecb3fd --- /dev/null +++ b/ChromeDevTools/Protocol/DOMStorage/DomStorageItemsClearedEvent.cs @@ -0,0 +1,13 @@ +using ChromeDevTools; + +namespace ChromeDevTools.Protocol.DOMStorage +{ + [Event(ProtocolName.DOMStorage.DomStorageItemsCleared)] + public class DomStorageItemsClearedEvent + { + /// <summary> + /// Gets or sets StorageId + /// </summary> + public StorageId StorageId { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/DOMStorage/EnableCommand.cs b/ChromeDevTools/Protocol/DOMStorage/EnableCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..bcfe878fb0417870111ac93817db67e2ecd9fced --- /dev/null +++ b/ChromeDevTools/Protocol/DOMStorage/EnableCommand.cs @@ -0,0 +1,13 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.DOMStorage +{ + /// <summary> + /// Enables storage tracking, storage events will now be delivered to the client. + /// </summary> + [Command(ProtocolName.DOMStorage.Enable)] + public class EnableCommand + { + } +} diff --git a/ChromeDevTools/Protocol/DOMStorage/EnableCommandResponse.cs b/ChromeDevTools/Protocol/DOMStorage/EnableCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..9cd909c9d8ff27764638c2c28bc7f2dee2713251 --- /dev/null +++ b/ChromeDevTools/Protocol/DOMStorage/EnableCommandResponse.cs @@ -0,0 +1,13 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.DOMStorage +{ + /// <summary> + /// Enables storage tracking, storage events will now be delivered to the client. + /// </summary> + [CommandResponse(ProtocolName.DOMStorage.Enable)] + public class EnableCommandResponse + { + } +} diff --git a/ChromeDevTools/Protocol/DOMStorage/GetDOMStorageItemsCommand.cs b/ChromeDevTools/Protocol/DOMStorage/GetDOMStorageItemsCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..674e1699d5a4e2bb6a9e4ffd89e1f0f2872494fe --- /dev/null +++ b/ChromeDevTools/Protocol/DOMStorage/GetDOMStorageItemsCommand.cs @@ -0,0 +1,14 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.DOMStorage +{ + [Command(ProtocolName.DOMStorage.GetDOMStorageItems)] + public class GetDOMStorageItemsCommand + { + /// <summary> + /// Gets or sets StorageId + /// </summary> + public StorageId StorageId { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/DOMStorage/GetDOMStorageItemsCommandResponse.cs b/ChromeDevTools/Protocol/DOMStorage/GetDOMStorageItemsCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..b66ebce21b0233e084bc1ba8ad3d2895555e048e --- /dev/null +++ b/ChromeDevTools/Protocol/DOMStorage/GetDOMStorageItemsCommandResponse.cs @@ -0,0 +1,14 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.DOMStorage +{ + [CommandResponse(ProtocolName.DOMStorage.GetDOMStorageItems)] + public class GetDOMStorageItemsCommandResponse + { + /// <summary> + /// Gets or sets Entries + /// </summary> + public string[][] Entries { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/DOMStorage/RemoveDOMStorageItemCommand.cs b/ChromeDevTools/Protocol/DOMStorage/RemoveDOMStorageItemCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..baef8b539edbdca245ca8f9b595ee229a856a546 --- /dev/null +++ b/ChromeDevTools/Protocol/DOMStorage/RemoveDOMStorageItemCommand.cs @@ -0,0 +1,18 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.DOMStorage +{ + [Command(ProtocolName.DOMStorage.RemoveDOMStorageItem)] + public class RemoveDOMStorageItemCommand + { + /// <summary> + /// Gets or sets StorageId + /// </summary> + public StorageId StorageId { get; set; } + /// <summary> + /// Gets or sets Key + /// </summary> + public string Key { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/DOMStorage/RemoveDOMStorageItemCommandResponse.cs b/ChromeDevTools/Protocol/DOMStorage/RemoveDOMStorageItemCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..ac72eff6d2f837cef47cb2cb4f5f307058ccb027 --- /dev/null +++ b/ChromeDevTools/Protocol/DOMStorage/RemoveDOMStorageItemCommandResponse.cs @@ -0,0 +1,10 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.DOMStorage +{ + [CommandResponse(ProtocolName.DOMStorage.RemoveDOMStorageItem)] + public class RemoveDOMStorageItemCommandResponse + { + } +} diff --git a/ChromeDevTools/Protocol/DOMStorage/SetDOMStorageItemCommand.cs b/ChromeDevTools/Protocol/DOMStorage/SetDOMStorageItemCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..f7568f5f058431d5b43340b603ce5949f302c7aa --- /dev/null +++ b/ChromeDevTools/Protocol/DOMStorage/SetDOMStorageItemCommand.cs @@ -0,0 +1,22 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.DOMStorage +{ + [Command(ProtocolName.DOMStorage.SetDOMStorageItem)] + public class SetDOMStorageItemCommand + { + /// <summary> + /// Gets or sets StorageId + /// </summary> + public StorageId StorageId { get; set; } + /// <summary> + /// Gets or sets Key + /// </summary> + public string Key { get; set; } + /// <summary> + /// Gets or sets Value + /// </summary> + public string Value { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/DOMStorage/SetDOMStorageItemCommandResponse.cs b/ChromeDevTools/Protocol/DOMStorage/SetDOMStorageItemCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..0099bddc66c2b31c4b41a32d6198369c78d2f5e3 --- /dev/null +++ b/ChromeDevTools/Protocol/DOMStorage/SetDOMStorageItemCommandResponse.cs @@ -0,0 +1,10 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.DOMStorage +{ + [CommandResponse(ProtocolName.DOMStorage.SetDOMStorageItem)] + public class SetDOMStorageItemCommandResponse + { + } +} diff --git a/ChromeDevTools/Protocol/DOMStorage/StorageId.cs b/ChromeDevTools/Protocol/DOMStorage/StorageId.cs new file mode 100644 index 0000000000000000000000000000000000000000..26da1e24700649562e7238440317eff6323e7e66 --- /dev/null +++ b/ChromeDevTools/Protocol/DOMStorage/StorageId.cs @@ -0,0 +1,20 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.DOMStorage +{ + /// <summary> + /// DOM Storage identifier. + /// </summary> + public class StorageId + { + /// <summary> + /// Gets or sets Security origin for the storage. + /// </summary> + public string SecurityOrigin { get; set; } + /// <summary> + /// Gets or sets Whether the storage is local storage (not session storage). + /// </summary> + public bool IsLocalStorage { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/Database/AddDatabaseEvent.cs b/ChromeDevTools/Protocol/Database/AddDatabaseEvent.cs new file mode 100644 index 0000000000000000000000000000000000000000..876429417ed3e17e86292188955244a1a5aa5c82 --- /dev/null +++ b/ChromeDevTools/Protocol/Database/AddDatabaseEvent.cs @@ -0,0 +1,13 @@ +using ChromeDevTools; + +namespace ChromeDevTools.Protocol.Database +{ + [Event(ProtocolName.Database.AddDatabase)] + public class AddDatabaseEvent + { + /// <summary> + /// Gets or sets Database + /// </summary> + public Database Database { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/Database/Database.cs b/ChromeDevTools/Protocol/Database/Database.cs new file mode 100644 index 0000000000000000000000000000000000000000..42f730398dcf51b4e6ed1d013f23ffc0e56a9662 --- /dev/null +++ b/ChromeDevTools/Protocol/Database/Database.cs @@ -0,0 +1,28 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Database +{ + /// <summary> + /// Database object. + /// </summary> + public class Database + { + /// <summary> + /// Gets or sets Database ID. + /// </summary> + public string Id { get; set; } + /// <summary> + /// Gets or sets Database domain. + /// </summary> + public string Domain { get; set; } + /// <summary> + /// Gets or sets Database name. + /// </summary> + public string Name { get; set; } + /// <summary> + /// Gets or sets Database version. + /// </summary> + public string Version { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/Database/DisableCommand.cs b/ChromeDevTools/Protocol/Database/DisableCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..72618c664fc20338525802b41c45dffc0cd5cf03 --- /dev/null +++ b/ChromeDevTools/Protocol/Database/DisableCommand.cs @@ -0,0 +1,13 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Database +{ + /// <summary> + /// Disables database tracking, prevents database events from being sent to the client. + /// </summary> + [Command(ProtocolName.Database.Disable)] + public class DisableCommand + { + } +} diff --git a/ChromeDevTools/Protocol/Database/DisableCommandResponse.cs b/ChromeDevTools/Protocol/Database/DisableCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..1e14f3d46498ab1021e3cfeda7cbde869a3afc67 --- /dev/null +++ b/ChromeDevTools/Protocol/Database/DisableCommandResponse.cs @@ -0,0 +1,13 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Database +{ + /// <summary> + /// Disables database tracking, prevents database events from being sent to the client. + /// </summary> + [CommandResponse(ProtocolName.Database.Disable)] + public class DisableCommandResponse + { + } +} diff --git a/ChromeDevTools/Protocol/Database/EnableCommand.cs b/ChromeDevTools/Protocol/Database/EnableCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..3d0d6f692333f7b32bb6fa1c64f535fe7ac4fa91 --- /dev/null +++ b/ChromeDevTools/Protocol/Database/EnableCommand.cs @@ -0,0 +1,13 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Database +{ + /// <summary> + /// Enables database tracking, database events will now be delivered to the client. + /// </summary> + [Command(ProtocolName.Database.Enable)] + public class EnableCommand + { + } +} diff --git a/ChromeDevTools/Protocol/Database/EnableCommandResponse.cs b/ChromeDevTools/Protocol/Database/EnableCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..ed70aaac6794cae6f4e8f339600bdb5561120c68 --- /dev/null +++ b/ChromeDevTools/Protocol/Database/EnableCommandResponse.cs @@ -0,0 +1,13 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Database +{ + /// <summary> + /// Enables database tracking, database events will now be delivered to the client. + /// </summary> + [CommandResponse(ProtocolName.Database.Enable)] + public class EnableCommandResponse + { + } +} diff --git a/ChromeDevTools/Protocol/Database/Error.cs b/ChromeDevTools/Protocol/Database/Error.cs new file mode 100644 index 0000000000000000000000000000000000000000..afebf12f7cf0c89fb89d667220a0e7c2c5b190f1 --- /dev/null +++ b/ChromeDevTools/Protocol/Database/Error.cs @@ -0,0 +1,20 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Database +{ + /// <summary> + /// Database error. + /// </summary> + public class Error + { + /// <summary> + /// Gets or sets Error message. + /// </summary> + public string Message { get; set; } + /// <summary> + /// Gets or sets Error code. + /// </summary> + public long Code { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/Database/ExecuteSQLCommand.cs b/ChromeDevTools/Protocol/Database/ExecuteSQLCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..c669b038beb62396e587b3742e7a7ba323999a3c --- /dev/null +++ b/ChromeDevTools/Protocol/Database/ExecuteSQLCommand.cs @@ -0,0 +1,18 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Database +{ + [Command(ProtocolName.Database.ExecuteSQL)] + public class ExecuteSQLCommand + { + /// <summary> + /// Gets or sets DatabaseId + /// </summary> + public string DatabaseId { get; set; } + /// <summary> + /// Gets or sets Query + /// </summary> + public string Query { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/Database/ExecuteSQLCommandResponse.cs b/ChromeDevTools/Protocol/Database/ExecuteSQLCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..68c41397e8582a030a8ff0b86b9ffdc91dd3d2fd --- /dev/null +++ b/ChromeDevTools/Protocol/Database/ExecuteSQLCommandResponse.cs @@ -0,0 +1,22 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Database +{ + [CommandResponse(ProtocolName.Database.ExecuteSQL)] + public class ExecuteSQLCommandResponse + { + /// <summary> + /// Gets or sets ColumnNames + /// </summary> + public string[] ColumnNames { get; set; } + /// <summary> + /// Gets or sets Values + /// </summary> + public object[] Values { get; set; } + /// <summary> + /// Gets or sets SqlError + /// </summary> + public Error SqlError { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/Database/GetDatabaseTableNamesCommand.cs b/ChromeDevTools/Protocol/Database/GetDatabaseTableNamesCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..77da2efd67086ee41133bd7c42dc7ab7eba5b052 --- /dev/null +++ b/ChromeDevTools/Protocol/Database/GetDatabaseTableNamesCommand.cs @@ -0,0 +1,14 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Database +{ + [Command(ProtocolName.Database.GetDatabaseTableNames)] + public class GetDatabaseTableNamesCommand + { + /// <summary> + /// Gets or sets DatabaseId + /// </summary> + public string DatabaseId { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/Database/GetDatabaseTableNamesCommandResponse.cs b/ChromeDevTools/Protocol/Database/GetDatabaseTableNamesCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..e6e91516efc9511ddae948b2cd4953ac0850d9b1 --- /dev/null +++ b/ChromeDevTools/Protocol/Database/GetDatabaseTableNamesCommandResponse.cs @@ -0,0 +1,14 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Database +{ + [CommandResponse(ProtocolName.Database.GetDatabaseTableNames)] + public class GetDatabaseTableNamesCommandResponse + { + /// <summary> + /// Gets or sets TableNames + /// </summary> + public string[] TableNames { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/Debugger/AsyncOperation.cs b/ChromeDevTools/Protocol/Debugger/AsyncOperation.cs new file mode 100644 index 0000000000000000000000000000000000000000..bcdd25919781b6afa269e6fd3dfad72d98667df5 --- /dev/null +++ b/ChromeDevTools/Protocol/Debugger/AsyncOperation.cs @@ -0,0 +1,28 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Debugger +{ + /// <summary> + /// Information about the async operation. + /// </summary> + public class AsyncOperation + { + /// <summary> + /// Gets or sets Unique id of the async operation. + /// </summary> + public long Id { get; set; } + /// <summary> + /// Gets or sets String description of the async operation. + /// </summary> + public string Description { get; set; } + /// <summary> + /// Gets or sets Stack trace where async operation was scheduled. + /// </summary> + public Console.CallFrame[] StackTrace { get; set; } + /// <summary> + /// Gets or sets Asynchronous stack trace where async operation was scheduled, if available. + /// </summary> + public Console.AsyncStackTrace AsyncStackTrace { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/Debugger/AsyncOperationCompletedEvent.cs b/ChromeDevTools/Protocol/Debugger/AsyncOperationCompletedEvent.cs new file mode 100644 index 0000000000000000000000000000000000000000..3413997166249ee8c593c5c3c5f2b98f6c96d0ce --- /dev/null +++ b/ChromeDevTools/Protocol/Debugger/AsyncOperationCompletedEvent.cs @@ -0,0 +1,16 @@ +using ChromeDevTools; + +namespace ChromeDevTools.Protocol.Debugger +{ + /// <summary> + /// Fired when an async operation is completed (while in a debugger stepping session). + /// </summary> + [Event(ProtocolName.Debugger.AsyncOperationCompleted)] + public class AsyncOperationCompletedEvent + { + /// <summary> + /// Gets or sets ID of the async operation that was completed. + /// </summary> + public long Id { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/Debugger/AsyncOperationStartedEvent.cs b/ChromeDevTools/Protocol/Debugger/AsyncOperationStartedEvent.cs new file mode 100644 index 0000000000000000000000000000000000000000..09c5d84bc85c02df2a8523a9a520e7e2e1043d62 --- /dev/null +++ b/ChromeDevTools/Protocol/Debugger/AsyncOperationStartedEvent.cs @@ -0,0 +1,16 @@ +using ChromeDevTools; + +namespace ChromeDevTools.Protocol.Debugger +{ + /// <summary> + /// Fired when an async operation is scheduled (while in a debugger stepping session). + /// </summary> + [Event(ProtocolName.Debugger.AsyncOperationStarted)] + public class AsyncOperationStartedEvent + { + /// <summary> + /// Gets or sets Information about the async operation. + /// </summary> + public AsyncOperation Operation { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/Debugger/BreakpointResolvedEvent.cs b/ChromeDevTools/Protocol/Debugger/BreakpointResolvedEvent.cs new file mode 100644 index 0000000000000000000000000000000000000000..ff0102d3a640b6175a8d69136bb9318c32d085d8 --- /dev/null +++ b/ChromeDevTools/Protocol/Debugger/BreakpointResolvedEvent.cs @@ -0,0 +1,20 @@ +using ChromeDevTools; + +namespace ChromeDevTools.Protocol.Debugger +{ + /// <summary> + /// Fired when breakpoint is resolved to an actual script and location. + /// </summary> + [Event(ProtocolName.Debugger.BreakpointResolved)] + public class BreakpointResolvedEvent + { + /// <summary> + /// Gets or sets Breakpoint unique identifier. + /// </summary> + public string BreakpointId { get; set; } + /// <summary> + /// Gets or sets Actual breakpoint location. + /// </summary> + public Location Location { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/Debugger/CallFrame.cs b/ChromeDevTools/Protocol/Debugger/CallFrame.cs new file mode 100644 index 0000000000000000000000000000000000000000..ef8d455bf37f7c27a2a2a4a8eef384384aef0611 --- /dev/null +++ b/ChromeDevTools/Protocol/Debugger/CallFrame.cs @@ -0,0 +1,40 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Debugger +{ + /// <summary> + /// JavaScript call frame. Array of call frames form the call stack. + /// </summary> + public class CallFrame + { + /// <summary> + /// Gets or sets Call frame identifier. This identifier is only valid while the virtual machine is paused. + /// </summary> + public string CallFrameId { get; set; } + /// <summary> + /// Gets or sets Name of the JavaScript function called on this call frame. + /// </summary> + public string FunctionName { get; set; } + /// <summary> + /// Gets or sets Location in the source code. + /// </summary> + public Location FunctionLocation { get; set; } + /// <summary> + /// Gets or sets Location in the source code. + /// </summary> + public Location Location { get; set; } + /// <summary> + /// Gets or sets Scope chain for this call frame. + /// </summary> + public Scope[] ScopeChain { get; set; } + /// <summary> + /// Gets or sets <code>this</code> object for this call frame. + /// </summary> + public Runtime.RemoteObject This { get; set; } + /// <summary> + /// Gets or sets The value being returned, if the function is at return point. + /// </summary> + public Runtime.RemoteObject ReturnValue { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/Debugger/CanSetScriptSourceCommand.cs b/ChromeDevTools/Protocol/Debugger/CanSetScriptSourceCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..01013c12f2f5c9b5c9e6be80034e72595ba341d6 --- /dev/null +++ b/ChromeDevTools/Protocol/Debugger/CanSetScriptSourceCommand.cs @@ -0,0 +1,13 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Debugger +{ + /// <summary> + /// Always returns true. + /// </summary> + [Command(ProtocolName.Debugger.CanSetScriptSource)] + public class CanSetScriptSourceCommand + { + } +} diff --git a/ChromeDevTools/Protocol/Debugger/CanSetScriptSourceCommandResponse.cs b/ChromeDevTools/Protocol/Debugger/CanSetScriptSourceCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..9d82513d15545df2131b36317cff87c813273e8e --- /dev/null +++ b/ChromeDevTools/Protocol/Debugger/CanSetScriptSourceCommandResponse.cs @@ -0,0 +1,17 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Debugger +{ + /// <summary> + /// Always returns true. + /// </summary> + [CommandResponse(ProtocolName.Debugger.CanSetScriptSource)] + public class CanSetScriptSourceCommandResponse + { + /// <summary> + /// Gets or sets True if <code>setScriptSource</code> is supported. + /// </summary> + public bool Result { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/Debugger/CollectionEntry.cs b/ChromeDevTools/Protocol/Debugger/CollectionEntry.cs new file mode 100644 index 0000000000000000000000000000000000000000..178f51237a6ff70755dc14eecb6ee8564c89ee89 --- /dev/null +++ b/ChromeDevTools/Protocol/Debugger/CollectionEntry.cs @@ -0,0 +1,20 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Debugger +{ + /// <summary> + /// Collection entry. + /// </summary> + public class CollectionEntry + { + /// <summary> + /// Gets or sets Entry key of a map-like collection, otherwise not provided. + /// </summary> + public Runtime.RemoteObject Key { get; set; } + /// <summary> + /// Gets or sets Entry value. + /// </summary> + public Runtime.RemoteObject Value { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/Debugger/CompileScriptCommand.cs b/ChromeDevTools/Protocol/Debugger/CompileScriptCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..b1d3edbc71a9ba0443e57abdd71fb37733f42840 --- /dev/null +++ b/ChromeDevTools/Protocol/Debugger/CompileScriptCommand.cs @@ -0,0 +1,29 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Debugger +{ + /// <summary> + /// Compiles expression. + /// </summary> + [Command(ProtocolName.Debugger.CompileScript)] + public class CompileScriptCommand + { + /// <summary> + /// Gets or sets Expression to compile. + /// </summary> + public string Expression { get; set; } + /// <summary> + /// Gets or sets Source url to be set for the script. + /// </summary> + public string SourceURL { get; set; } + /// <summary> + /// Gets or sets Specifies whether the compiled script should be persisted. + /// </summary> + public bool PersistScript { get; set; } + /// <summary> + /// Gets or sets Specifies in which isolated context to perform script run. Each content script lives in an isolated context and this parameter may be used to specify one of those contexts. If the parameter is omitted or 0 the evaluation will be performed in the context of the inspected page. + /// </summary> + public long ExecutionContextId { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/Debugger/CompileScriptCommandResponse.cs b/ChromeDevTools/Protocol/Debugger/CompileScriptCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..00fbd6c7074a8bbbc7addba5c646d520322364ef --- /dev/null +++ b/ChromeDevTools/Protocol/Debugger/CompileScriptCommandResponse.cs @@ -0,0 +1,21 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Debugger +{ + /// <summary> + /// Compiles expression. + /// </summary> + [CommandResponse(ProtocolName.Debugger.CompileScript)] + public class CompileScriptCommandResponse + { + /// <summary> + /// Gets or sets Id of the script. + /// </summary> + public string ScriptId { get; set; } + /// <summary> + /// Gets or sets Exception details. + /// </summary> + public ExceptionDetails ExceptionDetails { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/Debugger/ContinueToLocationCommand.cs b/ChromeDevTools/Protocol/Debugger/ContinueToLocationCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..007ebc5ce19b30cc262516330ca658f638862d69 --- /dev/null +++ b/ChromeDevTools/Protocol/Debugger/ContinueToLocationCommand.cs @@ -0,0 +1,21 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Debugger +{ + /// <summary> + /// Continues execution until specific location is reached. + /// </summary> + [Command(ProtocolName.Debugger.ContinueToLocation)] + public class ContinueToLocationCommand + { + /// <summary> + /// Gets or sets Location to continue to. + /// </summary> + public Location Location { get; set; } + /// <summary> + /// Gets or sets Allows breakpoints at the intemediate positions inside statements. + /// </summary> + public bool InterstatementLocation { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/Debugger/ContinueToLocationCommandResponse.cs b/ChromeDevTools/Protocol/Debugger/ContinueToLocationCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..ec0e0ad9f988ddbbfa15b06ee08ffd210c175dbf --- /dev/null +++ b/ChromeDevTools/Protocol/Debugger/ContinueToLocationCommandResponse.cs @@ -0,0 +1,13 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Debugger +{ + /// <summary> + /// Continues execution until specific location is reached. + /// </summary> + [CommandResponse(ProtocolName.Debugger.ContinueToLocation)] + public class ContinueToLocationCommandResponse + { + } +} diff --git a/ChromeDevTools/Protocol/Debugger/DisableCommand.cs b/ChromeDevTools/Protocol/Debugger/DisableCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..f09904cadba162e089af8e06f35623f5094243ce --- /dev/null +++ b/ChromeDevTools/Protocol/Debugger/DisableCommand.cs @@ -0,0 +1,13 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Debugger +{ + /// <summary> + /// Disables debugger for given page. + /// </summary> + [Command(ProtocolName.Debugger.Disable)] + public class DisableCommand + { + } +} diff --git a/ChromeDevTools/Protocol/Debugger/DisableCommandResponse.cs b/ChromeDevTools/Protocol/Debugger/DisableCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..17b7ef4caa8e28b23bd4fc85588ff4b62ee5047f --- /dev/null +++ b/ChromeDevTools/Protocol/Debugger/DisableCommandResponse.cs @@ -0,0 +1,13 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Debugger +{ + /// <summary> + /// Disables debugger for given page. + /// </summary> + [CommandResponse(ProtocolName.Debugger.Disable)] + public class DisableCommandResponse + { + } +} diff --git a/ChromeDevTools/Protocol/Debugger/DisablePromiseTrackerCommand.cs b/ChromeDevTools/Protocol/Debugger/DisablePromiseTrackerCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..4966bca6adedd75d5a4aeca85fccb74d4e8fefee --- /dev/null +++ b/ChromeDevTools/Protocol/Debugger/DisablePromiseTrackerCommand.cs @@ -0,0 +1,13 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Debugger +{ + /// <summary> + /// Disables promise tracking. + /// </summary> + [Command(ProtocolName.Debugger.DisablePromiseTracker)] + public class DisablePromiseTrackerCommand + { + } +} diff --git a/ChromeDevTools/Protocol/Debugger/DisablePromiseTrackerCommandResponse.cs b/ChromeDevTools/Protocol/Debugger/DisablePromiseTrackerCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..e119ec5e73d74727c607b4f46862e5c306d4455f --- /dev/null +++ b/ChromeDevTools/Protocol/Debugger/DisablePromiseTrackerCommandResponse.cs @@ -0,0 +1,13 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Debugger +{ + /// <summary> + /// Disables promise tracking. + /// </summary> + [CommandResponse(ProtocolName.Debugger.DisablePromiseTracker)] + public class DisablePromiseTrackerCommandResponse + { + } +} diff --git a/ChromeDevTools/Protocol/Debugger/EnableCommand.cs b/ChromeDevTools/Protocol/Debugger/EnableCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..28079e33536048ea4cc380bdd7cf9e172063d852 --- /dev/null +++ b/ChromeDevTools/Protocol/Debugger/EnableCommand.cs @@ -0,0 +1,13 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Debugger +{ + /// <summary> + /// Enables debugger for the given page. Clients should not assume that the debugging has been enabled until the result for this command is received. + /// </summary> + [Command(ProtocolName.Debugger.Enable)] + public class EnableCommand + { + } +} diff --git a/ChromeDevTools/Protocol/Debugger/EnableCommandResponse.cs b/ChromeDevTools/Protocol/Debugger/EnableCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..4d476169e6f0e5f04cc7e30f1f20518f777fc008 --- /dev/null +++ b/ChromeDevTools/Protocol/Debugger/EnableCommandResponse.cs @@ -0,0 +1,13 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Debugger +{ + /// <summary> + /// Enables debugger for the given page. Clients should not assume that the debugging has been enabled until the result for this command is received. + /// </summary> + [CommandResponse(ProtocolName.Debugger.Enable)] + public class EnableCommandResponse + { + } +} diff --git a/ChromeDevTools/Protocol/Debugger/EnablePromiseTrackerCommand.cs b/ChromeDevTools/Protocol/Debugger/EnablePromiseTrackerCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..4bcefd933f4a22c7fc22a86d40383d0614a3783f --- /dev/null +++ b/ChromeDevTools/Protocol/Debugger/EnablePromiseTrackerCommand.cs @@ -0,0 +1,17 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Debugger +{ + /// <summary> + /// Enables promise tracking, information about <code>Promise</code>s created or updated will now be stored on the backend. + /// </summary> + [Command(ProtocolName.Debugger.EnablePromiseTracker)] + public class EnablePromiseTrackerCommand + { + /// <summary> + /// Gets or sets Whether to capture stack traces for promise creation and settlement events (default: false). + /// </summary> + public bool CaptureStacks { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/Debugger/EnablePromiseTrackerCommandResponse.cs b/ChromeDevTools/Protocol/Debugger/EnablePromiseTrackerCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..bebf98378f76b9e233ef2a5e35e2b5f2a20985f7 --- /dev/null +++ b/ChromeDevTools/Protocol/Debugger/EnablePromiseTrackerCommandResponse.cs @@ -0,0 +1,13 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Debugger +{ + /// <summary> + /// Enables promise tracking, information about <code>Promise</code>s created or updated will now be stored on the backend. + /// </summary> + [CommandResponse(ProtocolName.Debugger.EnablePromiseTracker)] + public class EnablePromiseTrackerCommandResponse + { + } +} diff --git a/ChromeDevTools/Protocol/Debugger/EvaluateOnCallFrameCommand.cs b/ChromeDevTools/Protocol/Debugger/EvaluateOnCallFrameCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..4aa97b4cc43c5ffe056b145b85de633a0c759ed4 --- /dev/null +++ b/ChromeDevTools/Protocol/Debugger/EvaluateOnCallFrameCommand.cs @@ -0,0 +1,41 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Debugger +{ + /// <summary> + /// Evaluates expression on a given call frame. + /// </summary> + [Command(ProtocolName.Debugger.EvaluateOnCallFrame)] + public class EvaluateOnCallFrameCommand + { + /// <summary> + /// Gets or sets Call frame identifier to evaluate on. + /// </summary> + public string CallFrameId { get; set; } + /// <summary> + /// Gets or sets Expression to evaluate. + /// </summary> + public string Expression { get; set; } + /// <summary> + /// Gets or sets String object group name to put result into (allows rapid releasing resulting object handles using <code>releaseObjectGroup</code>). + /// </summary> + public string ObjectGroup { get; set; } + /// <summary> + /// Gets or sets Specifies whether command line API should be available to the evaluated expression, defaults to false. + /// </summary> + public bool IncludeCommandLineAPI { get; set; } + /// <summary> + /// Gets or sets Specifies whether evaluation should stop on exceptions and mute console. Overrides setPauseOnException state. + /// </summary> + public bool DoNotPauseOnExceptionsAndMuteConsole { get; set; } + /// <summary> + /// Gets or sets Whether the result is expected to be a JSON object that should be sent by value. + /// </summary> + public bool ReturnByValue { get; set; } + /// <summary> + /// Gets or sets Whether preview should be generated for the result. + /// </summary> + public bool GeneratePreview { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/Debugger/EvaluateOnCallFrameCommandResponse.cs b/ChromeDevTools/Protocol/Debugger/EvaluateOnCallFrameCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..29ad1ca10ea93c0fafef5f992d451a5c3ebcfd19 --- /dev/null +++ b/ChromeDevTools/Protocol/Debugger/EvaluateOnCallFrameCommandResponse.cs @@ -0,0 +1,25 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Debugger +{ + /// <summary> + /// Evaluates expression on a given call frame. + /// </summary> + [CommandResponse(ProtocolName.Debugger.EvaluateOnCallFrame)] + public class EvaluateOnCallFrameCommandResponse + { + /// <summary> + /// Gets or sets Object wrapper for the evaluation result. + /// </summary> + public Runtime.RemoteObject Result { get; set; } + /// <summary> + /// Gets or sets True if the result was thrown during the evaluation. + /// </summary> + public bool WasThrown { get; set; } + /// <summary> + /// Gets or sets Exception details. + /// </summary> + public ExceptionDetails ExceptionDetails { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/Debugger/ExceptionDetails.cs b/ChromeDevTools/Protocol/Debugger/ExceptionDetails.cs new file mode 100644 index 0000000000000000000000000000000000000000..1a6e5f76f53ff6a3d7cd765e7244bf7986725411 --- /dev/null +++ b/ChromeDevTools/Protocol/Debugger/ExceptionDetails.cs @@ -0,0 +1,36 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Debugger +{ + /// <summary> + /// Detailed information on exception (or error) that was thrown during script compilation or execution. + /// </summary> + public class ExceptionDetails + { + /// <summary> + /// Gets or sets Exception text. + /// </summary> + public string Text { get; set; } + /// <summary> + /// Gets or sets URL of the message origin. + /// </summary> + public string Url { get; set; } + /// <summary> + /// Gets or sets Script ID of the message origin. + /// </summary> + public string ScriptId { get; set; } + /// <summary> + /// Gets or sets Line number in the resource that generated this message. + /// </summary> + public long Line { get; set; } + /// <summary> + /// Gets or sets Column number in the resource that generated this message. + /// </summary> + public long Column { get; set; } + /// <summary> + /// Gets or sets JavaScript stack trace for assertions and error messages. + /// </summary> + public Console.CallFrame[] StackTrace { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/Debugger/FlushAsyncOperationEventsCommand.cs b/ChromeDevTools/Protocol/Debugger/FlushAsyncOperationEventsCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..a37f2b5cdfb4cfea4942e8d958eb64428b3ba0c4 --- /dev/null +++ b/ChromeDevTools/Protocol/Debugger/FlushAsyncOperationEventsCommand.cs @@ -0,0 +1,13 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Debugger +{ + /// <summary> + /// Fires pending <code>asyncOperationStarted</code> events (if any), as if a debugger stepping session has just been started. + /// </summary> + [Command(ProtocolName.Debugger.FlushAsyncOperationEvents)] + public class FlushAsyncOperationEventsCommand + { + } +} diff --git a/ChromeDevTools/Protocol/Debugger/FlushAsyncOperationEventsCommandResponse.cs b/ChromeDevTools/Protocol/Debugger/FlushAsyncOperationEventsCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..b4e83f99905155c57af8647d2d7a0d60f93baab5 --- /dev/null +++ b/ChromeDevTools/Protocol/Debugger/FlushAsyncOperationEventsCommandResponse.cs @@ -0,0 +1,13 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Debugger +{ + /// <summary> + /// Fires pending <code>asyncOperationStarted</code> events (if any), as if a debugger stepping session has just been started. + /// </summary> + [CommandResponse(ProtocolName.Debugger.FlushAsyncOperationEvents)] + public class FlushAsyncOperationEventsCommandResponse + { + } +} diff --git a/ChromeDevTools/Protocol/Debugger/FunctionDetails.cs b/ChromeDevTools/Protocol/Debugger/FunctionDetails.cs new file mode 100644 index 0000000000000000000000000000000000000000..a474a927768e4d2bc894ce2c59a5e9fc993f04a5 --- /dev/null +++ b/ChromeDevTools/Protocol/Debugger/FunctionDetails.cs @@ -0,0 +1,28 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Debugger +{ + /// <summary> + /// Information about the function. + /// </summary> + public class FunctionDetails + { + /// <summary> + /// Gets or sets Location of the function, none for native functions. + /// </summary> + public Location Location { get; set; } + /// <summary> + /// Gets or sets Name of the function. + /// </summary> + public string FunctionName { get; set; } + /// <summary> + /// Gets or sets Whether this is a generator function. + /// </summary> + public bool IsGenerator { get; set; } + /// <summary> + /// Gets or sets Scope chain for this closure. + /// </summary> + public Scope[] ScopeChain { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/Debugger/GeneratorObjectDetails.cs b/ChromeDevTools/Protocol/Debugger/GeneratorObjectDetails.cs new file mode 100644 index 0000000000000000000000000000000000000000..16b44a0d2214042210ecf7c13f443893216fe219 --- /dev/null +++ b/ChromeDevTools/Protocol/Debugger/GeneratorObjectDetails.cs @@ -0,0 +1,28 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Debugger +{ + /// <summary> + /// Information about the generator object. + /// </summary> + public class GeneratorObjectDetails + { + /// <summary> + /// Gets or sets Generator function. + /// </summary> + public Runtime.RemoteObject Function { get; set; } + /// <summary> + /// Gets or sets Name of the generator function. + /// </summary> + public string FunctionName { get; set; } + /// <summary> + /// Gets or sets Current generator object status. + /// </summary> + public string Status { get; set; } + /// <summary> + /// Gets or sets If suspended, location where generator function was suspended (e.g. location of the last 'yield'). Otherwise, location of the generator function. + /// </summary> + public Location Location { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/Debugger/GetBacktraceCommand.cs b/ChromeDevTools/Protocol/Debugger/GetBacktraceCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..e2dfaab3654ed847b6a981ddb74554bddaf57a0b --- /dev/null +++ b/ChromeDevTools/Protocol/Debugger/GetBacktraceCommand.cs @@ -0,0 +1,13 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Debugger +{ + /// <summary> + /// Returns call stack including variables changed since VM was paused. VM must be paused. + /// </summary> + [Command(ProtocolName.Debugger.GetBacktrace)] + public class GetBacktraceCommand + { + } +} diff --git a/ChromeDevTools/Protocol/Debugger/GetBacktraceCommandResponse.cs b/ChromeDevTools/Protocol/Debugger/GetBacktraceCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..34cde523021bd27707e2a4a8cbd5e775e630466c --- /dev/null +++ b/ChromeDevTools/Protocol/Debugger/GetBacktraceCommandResponse.cs @@ -0,0 +1,21 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Debugger +{ + /// <summary> + /// Returns call stack including variables changed since VM was paused. VM must be paused. + /// </summary> + [CommandResponse(ProtocolName.Debugger.GetBacktrace)] + public class GetBacktraceCommandResponse + { + /// <summary> + /// Gets or sets Call stack the virtual machine stopped on. + /// </summary> + public CallFrame[] CallFrames { get; set; } + /// <summary> + /// Gets or sets Async stack trace, if any. + /// </summary> + public StackTrace AsyncStackTrace { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/Debugger/GetCollectionEntriesCommand.cs b/ChromeDevTools/Protocol/Debugger/GetCollectionEntriesCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..d04b590f447aba1345a9861b2f3264a34d33c499 --- /dev/null +++ b/ChromeDevTools/Protocol/Debugger/GetCollectionEntriesCommand.cs @@ -0,0 +1,17 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Debugger +{ + /// <summary> + /// Returns entries of given collection. + /// </summary> + [Command(ProtocolName.Debugger.GetCollectionEntries)] + public class GetCollectionEntriesCommand + { + /// <summary> + /// Gets or sets Id of the collection to get entries for. + /// </summary> + public string ObjectId { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/Debugger/GetCollectionEntriesCommandResponse.cs b/ChromeDevTools/Protocol/Debugger/GetCollectionEntriesCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..af1cbe54e13ebfb710ee4868de12ff0ebfd86899 --- /dev/null +++ b/ChromeDevTools/Protocol/Debugger/GetCollectionEntriesCommandResponse.cs @@ -0,0 +1,17 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Debugger +{ + /// <summary> + /// Returns entries of given collection. + /// </summary> + [CommandResponse(ProtocolName.Debugger.GetCollectionEntries)] + public class GetCollectionEntriesCommandResponse + { + /// <summary> + /// Gets or sets Array of collection entries. + /// </summary> + public CollectionEntry[] Entries { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/Debugger/GetFunctionDetailsCommand.cs b/ChromeDevTools/Protocol/Debugger/GetFunctionDetailsCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..47bcfc85fa727e3553112520c979eb3d6e96a04c --- /dev/null +++ b/ChromeDevTools/Protocol/Debugger/GetFunctionDetailsCommand.cs @@ -0,0 +1,17 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Debugger +{ + /// <summary> + /// Returns detailed information on given function. + /// </summary> + [Command(ProtocolName.Debugger.GetFunctionDetails)] + public class GetFunctionDetailsCommand + { + /// <summary> + /// Gets or sets Id of the function to get details for. + /// </summary> + public string FunctionId { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/Debugger/GetFunctionDetailsCommandResponse.cs b/ChromeDevTools/Protocol/Debugger/GetFunctionDetailsCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..c1bc4d5d61935de882acc163d97a3bd64562184f --- /dev/null +++ b/ChromeDevTools/Protocol/Debugger/GetFunctionDetailsCommandResponse.cs @@ -0,0 +1,17 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Debugger +{ + /// <summary> + /// Returns detailed information on given function. + /// </summary> + [CommandResponse(ProtocolName.Debugger.GetFunctionDetails)] + public class GetFunctionDetailsCommandResponse + { + /// <summary> + /// Gets or sets Information about the function. + /// </summary> + public FunctionDetails Details { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/Debugger/GetGeneratorObjectDetailsCommand.cs b/ChromeDevTools/Protocol/Debugger/GetGeneratorObjectDetailsCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..61363f206539f97bce08467c4918449596c62488 --- /dev/null +++ b/ChromeDevTools/Protocol/Debugger/GetGeneratorObjectDetailsCommand.cs @@ -0,0 +1,17 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Debugger +{ + /// <summary> + /// Returns detailed information on given generator object. + /// </summary> + [Command(ProtocolName.Debugger.GetGeneratorObjectDetails)] + public class GetGeneratorObjectDetailsCommand + { + /// <summary> + /// Gets or sets Id of the generator object to get details for. + /// </summary> + public string ObjectId { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/Debugger/GetGeneratorObjectDetailsCommandResponse.cs b/ChromeDevTools/Protocol/Debugger/GetGeneratorObjectDetailsCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..18394a722b21fafb47e658aeb5f2f42cafae0d33 --- /dev/null +++ b/ChromeDevTools/Protocol/Debugger/GetGeneratorObjectDetailsCommandResponse.cs @@ -0,0 +1,17 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Debugger +{ + /// <summary> + /// Returns detailed information on given generator object. + /// </summary> + [CommandResponse(ProtocolName.Debugger.GetGeneratorObjectDetails)] + public class GetGeneratorObjectDetailsCommandResponse + { + /// <summary> + /// Gets or sets Information about the generator object. + /// </summary> + public GeneratorObjectDetails Details { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/Debugger/GetPromiseByIdCommand.cs b/ChromeDevTools/Protocol/Debugger/GetPromiseByIdCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..53bde66f9c02f9cc8621cda9fa0dc69996603b07 --- /dev/null +++ b/ChromeDevTools/Protocol/Debugger/GetPromiseByIdCommand.cs @@ -0,0 +1,21 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Debugger +{ + /// <summary> + /// Returns <code>Promise</code> with specified ID. + /// </summary> + [Command(ProtocolName.Debugger.GetPromiseById)] + public class GetPromiseByIdCommand + { + /// <summary> + /// Gets or sets PromiseId + /// </summary> + public long PromiseId { get; set; } + /// <summary> + /// Gets or sets Symbolic group name that can be used to release multiple objects. + /// </summary> + public string ObjectGroup { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/Debugger/GetPromiseByIdCommandResponse.cs b/ChromeDevTools/Protocol/Debugger/GetPromiseByIdCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..c4921c19d6a81b15e51bbf12fd9f59f00a410510 --- /dev/null +++ b/ChromeDevTools/Protocol/Debugger/GetPromiseByIdCommandResponse.cs @@ -0,0 +1,17 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Debugger +{ + /// <summary> + /// Returns <code>Promise</code> with specified ID. + /// </summary> + [CommandResponse(ProtocolName.Debugger.GetPromiseById)] + public class GetPromiseByIdCommandResponse + { + /// <summary> + /// Gets or sets Object wrapper for <code>Promise</code> with specified ID, if any. + /// </summary> + public Runtime.RemoteObject Promise { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/Debugger/GetPromisesCommand.cs b/ChromeDevTools/Protocol/Debugger/GetPromisesCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..364b9745bc50cfe3a893cf1a5c7cca16e2054716 --- /dev/null +++ b/ChromeDevTools/Protocol/Debugger/GetPromisesCommand.cs @@ -0,0 +1,13 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Debugger +{ + /// <summary> + /// Returns detailed information about all <code>Promise</code>s that were created or updated after the <code>enablePromiseTracker</code> command, and have not been garbage collected yet. + /// </summary> + [Command(ProtocolName.Debugger.GetPromises)] + public class GetPromisesCommand + { + } +} diff --git a/ChromeDevTools/Protocol/Debugger/GetPromisesCommandResponse.cs b/ChromeDevTools/Protocol/Debugger/GetPromisesCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..08549cf94cc643594149c1befec742ef38f4076b --- /dev/null +++ b/ChromeDevTools/Protocol/Debugger/GetPromisesCommandResponse.cs @@ -0,0 +1,17 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Debugger +{ + /// <summary> + /// Returns detailed information about all <code>Promise</code>s that were created or updated after the <code>enablePromiseTracker</code> command, and have not been garbage collected yet. + /// </summary> + [CommandResponse(ProtocolName.Debugger.GetPromises)] + public class GetPromisesCommandResponse + { + /// <summary> + /// Gets or sets Information about stored promises. + /// </summary> + public PromiseDetails[] Promises { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/Debugger/GetScriptSourceCommand.cs b/ChromeDevTools/Protocol/Debugger/GetScriptSourceCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..add2472c93f331a50196a3930bc5b9c14709674e --- /dev/null +++ b/ChromeDevTools/Protocol/Debugger/GetScriptSourceCommand.cs @@ -0,0 +1,17 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Debugger +{ + /// <summary> + /// Returns source for the script with given id. + /// </summary> + [Command(ProtocolName.Debugger.GetScriptSource)] + public class GetScriptSourceCommand + { + /// <summary> + /// Gets or sets Id of the script to get source for. + /// </summary> + public string ScriptId { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/Debugger/GetScriptSourceCommandResponse.cs b/ChromeDevTools/Protocol/Debugger/GetScriptSourceCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..417abd6975fab9afa15d5e23be6516b9b4028e1a --- /dev/null +++ b/ChromeDevTools/Protocol/Debugger/GetScriptSourceCommandResponse.cs @@ -0,0 +1,17 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Debugger +{ + /// <summary> + /// Returns source for the script with given id. + /// </summary> + [CommandResponse(ProtocolName.Debugger.GetScriptSource)] + public class GetScriptSourceCommandResponse + { + /// <summary> + /// Gets or sets Script source. + /// </summary> + public string ScriptSource { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/Debugger/GetStepInPositionsCommand.cs b/ChromeDevTools/Protocol/Debugger/GetStepInPositionsCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..19a5d33aa81bfcf6c9a25167fe97c89143963d82 --- /dev/null +++ b/ChromeDevTools/Protocol/Debugger/GetStepInPositionsCommand.cs @@ -0,0 +1,17 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Debugger +{ + /// <summary> + /// Lists all positions where step-in is possible for a current statement in a specified call frame + /// </summary> + [Command(ProtocolName.Debugger.GetStepInPositions)] + public class GetStepInPositionsCommand + { + /// <summary> + /// Gets or sets Id of a call frame where the current statement should be analized + /// </summary> + public string CallFrameId { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/Debugger/GetStepInPositionsCommandResponse.cs b/ChromeDevTools/Protocol/Debugger/GetStepInPositionsCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..49cfea60079385d9241492df85665bdf5bdc0f7e --- /dev/null +++ b/ChromeDevTools/Protocol/Debugger/GetStepInPositionsCommandResponse.cs @@ -0,0 +1,17 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Debugger +{ + /// <summary> + /// Lists all positions where step-in is possible for a current statement in a specified call frame + /// </summary> + [CommandResponse(ProtocolName.Debugger.GetStepInPositions)] + public class GetStepInPositionsCommandResponse + { + /// <summary> + /// Gets or sets experimental + /// </summary> + public Location[] StepInPositions { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/Debugger/GlobalObjectClearedEvent.cs b/ChromeDevTools/Protocol/Debugger/GlobalObjectClearedEvent.cs new file mode 100644 index 0000000000000000000000000000000000000000..2595434debe4cce5775c4957ea6ba0c28bf2182b --- /dev/null +++ b/ChromeDevTools/Protocol/Debugger/GlobalObjectClearedEvent.cs @@ -0,0 +1,12 @@ +using ChromeDevTools; + +namespace ChromeDevTools.Protocol.Debugger +{ + /// <summary> + /// Called when global has been cleared and debugger client should reset its state. Happens upon navigation or reload. + /// </summary> + [Event(ProtocolName.Debugger.GlobalObjectCleared)] + public class GlobalObjectClearedEvent + { + } +} diff --git a/ChromeDevTools/Protocol/Debugger/Location.cs b/ChromeDevTools/Protocol/Debugger/Location.cs new file mode 100644 index 0000000000000000000000000000000000000000..933ea610354da226af8403c7cbd2ff02baf84d28 --- /dev/null +++ b/ChromeDevTools/Protocol/Debugger/Location.cs @@ -0,0 +1,24 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Debugger +{ + /// <summary> + /// Location in the source code. + /// </summary> + public class Location + { + /// <summary> + /// Gets or sets Script identifier as reported in the <code>Debugger.scriptParsed</code>. + /// </summary> + public string ScriptId { get; set; } + /// <summary> + /// Gets or sets Line number in the script (0-based). + /// </summary> + public long LineNumber { get; set; } + /// <summary> + /// Gets or sets Column number in the script (0-based). + /// </summary> + public long ColumnNumber { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/Debugger/PauseCommand.cs b/ChromeDevTools/Protocol/Debugger/PauseCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..f2988e06376dcf5c940c482348a7f699f5a8f69b --- /dev/null +++ b/ChromeDevTools/Protocol/Debugger/PauseCommand.cs @@ -0,0 +1,13 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Debugger +{ + /// <summary> + /// Stops on the next JavaScript statement. + /// </summary> + [Command(ProtocolName.Debugger.Pause)] + public class PauseCommand + { + } +} diff --git a/ChromeDevTools/Protocol/Debugger/PauseCommandResponse.cs b/ChromeDevTools/Protocol/Debugger/PauseCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..236f83a287e600d919e555de165637c518d4f3aa --- /dev/null +++ b/ChromeDevTools/Protocol/Debugger/PauseCommandResponse.cs @@ -0,0 +1,13 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Debugger +{ + /// <summary> + /// Stops on the next JavaScript statement. + /// </summary> + [CommandResponse(ProtocolName.Debugger.Pause)] + public class PauseCommandResponse + { + } +} diff --git a/ChromeDevTools/Protocol/Debugger/PausedEvent.cs b/ChromeDevTools/Protocol/Debugger/PausedEvent.cs new file mode 100644 index 0000000000000000000000000000000000000000..36e0c5ce8c984ac5e54f021e2229f74b72a263c5 --- /dev/null +++ b/ChromeDevTools/Protocol/Debugger/PausedEvent.cs @@ -0,0 +1,32 @@ +using ChromeDevTools; + +namespace ChromeDevTools.Protocol.Debugger +{ + /// <summary> + /// Fired when the virtual machine stopped on breakpoint or exception or any other stop criteria. + /// </summary> + [Event(ProtocolName.Debugger.Paused)] + public class PausedEvent + { + /// <summary> + /// Gets or sets Call stack the virtual machine stopped on. + /// </summary> + public CallFrame[] CallFrames { get; set; } + /// <summary> + /// Gets or sets Pause reason. + /// </summary> + public string Reason { get; set; } + /// <summary> + /// Gets or sets Object containing break-specific auxiliary properties. + /// </summary> + public object Data { get; set; } + /// <summary> + /// Gets or sets Hit breakpoints IDs + /// </summary> + public string[] HitBreakpoints { get; set; } + /// <summary> + /// Gets or sets Async stack trace, if any. + /// </summary> + public StackTrace AsyncStackTrace { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/Debugger/PromiseDetails.cs b/ChromeDevTools/Protocol/Debugger/PromiseDetails.cs new file mode 100644 index 0000000000000000000000000000000000000000..771b19a25556f6a3d994ad63417ff2f73cc14c77 --- /dev/null +++ b/ChromeDevTools/Protocol/Debugger/PromiseDetails.cs @@ -0,0 +1,52 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Debugger +{ + /// <summary> + /// Information about the promise. + /// </summary> + public class PromiseDetails + { + /// <summary> + /// Gets or sets Unique id of the promise. + /// </summary> + public long Id { get; set; } + /// <summary> + /// Gets or sets Status of the promise. + /// </summary> + public string Status { get; set; } + /// <summary> + /// Gets or sets Id of the parent promise. + /// </summary> + public long ParentId { get; set; } + /// <summary> + /// Gets or sets Top call frame on promise creation. + /// </summary> + public Console.CallFrame CallFrame { get; set; } + /// <summary> + /// Gets or sets Creation time of the promise. + /// </summary> + public double CreationTime { get; set; } + /// <summary> + /// Gets or sets Settlement time of the promise. + /// </summary> + public double SettlementTime { get; set; } + /// <summary> + /// Gets or sets JavaScript stack trace on promise creation. + /// </summary> + public Console.CallFrame[] CreationStack { get; set; } + /// <summary> + /// Gets or sets JavaScript asynchronous stack trace on promise creation, if available. + /// </summary> + public Console.AsyncStackTrace AsyncCreationStack { get; set; } + /// <summary> + /// Gets or sets JavaScript stack trace on promise settlement. + /// </summary> + public Console.CallFrame[] SettlementStack { get; set; } + /// <summary> + /// Gets or sets JavaScript asynchronous stack trace on promise settlement, if available. + /// </summary> + public Console.AsyncStackTrace AsyncSettlementStack { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/Debugger/PromiseUpdatedEvent.cs b/ChromeDevTools/Protocol/Debugger/PromiseUpdatedEvent.cs new file mode 100644 index 0000000000000000000000000000000000000000..d3b41fbb8b497453b1972f318f54e40529b12bb5 --- /dev/null +++ b/ChromeDevTools/Protocol/Debugger/PromiseUpdatedEvent.cs @@ -0,0 +1,20 @@ +using ChromeDevTools; + +namespace ChromeDevTools.Protocol.Debugger +{ + /// <summary> + /// Fired when a <code>Promise</code> is created, updated or garbage collected. + /// </summary> + [Event(ProtocolName.Debugger.PromiseUpdated)] + public class PromiseUpdatedEvent + { + /// <summary> + /// Gets or sets Type of the event. + /// </summary> + public string EventType { get; set; } + /// <summary> + /// Gets or sets Information about the updated <code>Promise</code>. + /// </summary> + public PromiseDetails Promise { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/Debugger/RemoveAsyncOperationBreakpointCommand.cs b/ChromeDevTools/Protocol/Debugger/RemoveAsyncOperationBreakpointCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..b28cf9e5efed86344126fc880d34262f7fc5f368 --- /dev/null +++ b/ChromeDevTools/Protocol/Debugger/RemoveAsyncOperationBreakpointCommand.cs @@ -0,0 +1,17 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Debugger +{ + /// <summary> + /// Removes AsyncOperation breakpoint. + /// </summary> + [Command(ProtocolName.Debugger.RemoveAsyncOperationBreakpoint)] + public class RemoveAsyncOperationBreakpointCommand + { + /// <summary> + /// Gets or sets ID of the async operation to remove breakpoint for. + /// </summary> + public long OperationId { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/Debugger/RemoveAsyncOperationBreakpointCommandResponse.cs b/ChromeDevTools/Protocol/Debugger/RemoveAsyncOperationBreakpointCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..729a4da71ba0b3d308ec6770dc7dd2c999dac7d2 --- /dev/null +++ b/ChromeDevTools/Protocol/Debugger/RemoveAsyncOperationBreakpointCommandResponse.cs @@ -0,0 +1,13 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Debugger +{ + /// <summary> + /// Removes AsyncOperation breakpoint. + /// </summary> + [CommandResponse(ProtocolName.Debugger.RemoveAsyncOperationBreakpoint)] + public class RemoveAsyncOperationBreakpointCommandResponse + { + } +} diff --git a/ChromeDevTools/Protocol/Debugger/RemoveBreakpointCommand.cs b/ChromeDevTools/Protocol/Debugger/RemoveBreakpointCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..095bd2d20dceab5a173964326c702a4c8b13819d --- /dev/null +++ b/ChromeDevTools/Protocol/Debugger/RemoveBreakpointCommand.cs @@ -0,0 +1,17 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Debugger +{ + /// <summary> + /// Removes JavaScript breakpoint. + /// </summary> + [Command(ProtocolName.Debugger.RemoveBreakpoint)] + public class RemoveBreakpointCommand + { + /// <summary> + /// Gets or sets BreakpointId + /// </summary> + public string BreakpointId { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/Debugger/RemoveBreakpointCommandResponse.cs b/ChromeDevTools/Protocol/Debugger/RemoveBreakpointCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..a39ca70e6d203940d4291d1e684f26af28ac8f9d --- /dev/null +++ b/ChromeDevTools/Protocol/Debugger/RemoveBreakpointCommandResponse.cs @@ -0,0 +1,13 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Debugger +{ + /// <summary> + /// Removes JavaScript breakpoint. + /// </summary> + [CommandResponse(ProtocolName.Debugger.RemoveBreakpoint)] + public class RemoveBreakpointCommandResponse + { + } +} diff --git a/ChromeDevTools/Protocol/Debugger/RestartFrameCommand.cs b/ChromeDevTools/Protocol/Debugger/RestartFrameCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..7a96fc25e4639a54f88f7f5c160e7f07e3e3f4dc --- /dev/null +++ b/ChromeDevTools/Protocol/Debugger/RestartFrameCommand.cs @@ -0,0 +1,17 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Debugger +{ + /// <summary> + /// Restarts particular call frame from the beginning. + /// </summary> + [Command(ProtocolName.Debugger.RestartFrame)] + public class RestartFrameCommand + { + /// <summary> + /// Gets or sets Call frame identifier to evaluate on. + /// </summary> + public string CallFrameId { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/Debugger/RestartFrameCommandResponse.cs b/ChromeDevTools/Protocol/Debugger/RestartFrameCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..03cd868da9bf3cbed9ca308cafe610f10700239f --- /dev/null +++ b/ChromeDevTools/Protocol/Debugger/RestartFrameCommandResponse.cs @@ -0,0 +1,25 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Debugger +{ + /// <summary> + /// Restarts particular call frame from the beginning. + /// </summary> + [CommandResponse(ProtocolName.Debugger.RestartFrame)] + public class RestartFrameCommandResponse + { + /// <summary> + /// Gets or sets New stack trace. + /// </summary> + public CallFrame[] CallFrames { get; set; } + /// <summary> + /// Gets or sets VM-specific description. + /// </summary> + public object Result { get; set; } + /// <summary> + /// Gets or sets Async stack trace, if any. + /// </summary> + public StackTrace AsyncStackTrace { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/Debugger/ResumeCommand.cs b/ChromeDevTools/Protocol/Debugger/ResumeCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..68f78da3d8aef26c378a63d0623fd31e8ed3441d --- /dev/null +++ b/ChromeDevTools/Protocol/Debugger/ResumeCommand.cs @@ -0,0 +1,13 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Debugger +{ + /// <summary> + /// Resumes JavaScript execution. + /// </summary> + [Command(ProtocolName.Debugger.Resume)] + public class ResumeCommand + { + } +} diff --git a/ChromeDevTools/Protocol/Debugger/ResumeCommandResponse.cs b/ChromeDevTools/Protocol/Debugger/ResumeCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..04aafd325261b9bb0016673c7d113b269bdd6e97 --- /dev/null +++ b/ChromeDevTools/Protocol/Debugger/ResumeCommandResponse.cs @@ -0,0 +1,13 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Debugger +{ + /// <summary> + /// Resumes JavaScript execution. + /// </summary> + [CommandResponse(ProtocolName.Debugger.Resume)] + public class ResumeCommandResponse + { + } +} diff --git a/ChromeDevTools/Protocol/Debugger/ResumedEvent.cs b/ChromeDevTools/Protocol/Debugger/ResumedEvent.cs new file mode 100644 index 0000000000000000000000000000000000000000..f7543c69c65d4b60caf76d3ad2de0b85450513a6 --- /dev/null +++ b/ChromeDevTools/Protocol/Debugger/ResumedEvent.cs @@ -0,0 +1,12 @@ +using ChromeDevTools; + +namespace ChromeDevTools.Protocol.Debugger +{ + /// <summary> + /// Fired when the virtual machine resumed execution. + /// </summary> + [Event(ProtocolName.Debugger.Resumed)] + public class ResumedEvent + { + } +} diff --git a/ChromeDevTools/Protocol/Debugger/RunScriptCommand.cs b/ChromeDevTools/Protocol/Debugger/RunScriptCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..1557d38188316bfb422a01c8d5c32137b219d831 --- /dev/null +++ b/ChromeDevTools/Protocol/Debugger/RunScriptCommand.cs @@ -0,0 +1,29 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Debugger +{ + /// <summary> + /// Runs script with given id in a given context. + /// </summary> + [Command(ProtocolName.Debugger.RunScript)] + public class RunScriptCommand + { + /// <summary> + /// Gets or sets Id of the script to run. + /// </summary> + public string ScriptId { get; set; } + /// <summary> + /// Gets or sets Specifies in which isolated context to perform script run. Each content script lives in an isolated context and this parameter may be used to specify one of those contexts. If the parameter is omitted or 0 the evaluation will be performed in the context of the inspected page. + /// </summary> + public long ExecutionContextId { get; set; } + /// <summary> + /// Gets or sets Symbolic group name that can be used to release multiple objects. + /// </summary> + public string ObjectGroup { get; set; } + /// <summary> + /// Gets or sets Specifies whether script run should stop on exceptions and mute console. Overrides setPauseOnException state. + /// </summary> + public bool DoNotPauseOnExceptionsAndMuteConsole { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/Debugger/RunScriptCommandResponse.cs b/ChromeDevTools/Protocol/Debugger/RunScriptCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..bf312f01bce61e016267573aba95e1356ade987c --- /dev/null +++ b/ChromeDevTools/Protocol/Debugger/RunScriptCommandResponse.cs @@ -0,0 +1,21 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Debugger +{ + /// <summary> + /// Runs script with given id in a given context. + /// </summary> + [CommandResponse(ProtocolName.Debugger.RunScript)] + public class RunScriptCommandResponse + { + /// <summary> + /// Gets or sets Run result. + /// </summary> + public Runtime.RemoteObject Result { get; set; } + /// <summary> + /// Gets or sets Exception details. + /// </summary> + public ExceptionDetails ExceptionDetails { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/Debugger/Scope.cs b/ChromeDevTools/Protocol/Debugger/Scope.cs new file mode 100644 index 0000000000000000000000000000000000000000..ed6d95750f2135d53fe1c5bbaf5abde96576e95a --- /dev/null +++ b/ChromeDevTools/Protocol/Debugger/Scope.cs @@ -0,0 +1,20 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Debugger +{ + /// <summary> + /// Scope description. + /// </summary> + public class Scope + { + /// <summary> + /// Gets or sets Scope type. + /// </summary> + public string Type { get; set; } + /// <summary> + /// Gets or sets Object representing the scope. For <code>global</code> and <code>with</code> scopes it represents the actual object; for the rest of the scopes, it is artificial transient object enumerating scope variables as its properties. + /// </summary> + public Runtime.RemoteObject Object { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/Debugger/ScriptFailedToParseEvent.cs b/ChromeDevTools/Protocol/Debugger/ScriptFailedToParseEvent.cs new file mode 100644 index 0000000000000000000000000000000000000000..d40d8636d5e55073e117585b4f1801abf2308e9a --- /dev/null +++ b/ChromeDevTools/Protocol/Debugger/ScriptFailedToParseEvent.cs @@ -0,0 +1,52 @@ +using ChromeDevTools; + +namespace ChromeDevTools.Protocol.Debugger +{ + /// <summary> + /// Fired when virtual machine fails to parse the script. + /// </summary> + [Event(ProtocolName.Debugger.ScriptFailedToParse)] + public class ScriptFailedToParseEvent + { + /// <summary> + /// Gets or sets Identifier of the script parsed. + /// </summary> + public string ScriptId { get; set; } + /// <summary> + /// Gets or sets URL or name of the script parsed (if any). + /// </summary> + public string Url { get; set; } + /// <summary> + /// Gets or sets Line offset of the script within the resource with given URL (for script tags). + /// </summary> + public long StartLine { get; set; } + /// <summary> + /// Gets or sets Column offset of the script within the resource with given URL. + /// </summary> + public long StartColumn { get; set; } + /// <summary> + /// Gets or sets Last line of the script. + /// </summary> + public long EndLine { get; set; } + /// <summary> + /// Gets or sets Length of the last line of the script. + /// </summary> + public long EndColumn { get; set; } + /// <summary> + /// Gets or sets Determines whether this script is a user extension script. + /// </summary> + public bool IsContentScript { get; set; } + /// <summary> + /// Gets or sets Determines whether this script is an internal script. + /// </summary> + public bool IsInternalScript { get; set; } + /// <summary> + /// Gets or sets URL of source map associated with script (if any). + /// </summary> + public string SourceMapURL { get; set; } + /// <summary> + /// Gets or sets True, if this script has sourceURL. + /// </summary> + public bool HasSourceURL { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/Debugger/ScriptParsedEvent.cs b/ChromeDevTools/Protocol/Debugger/ScriptParsedEvent.cs new file mode 100644 index 0000000000000000000000000000000000000000..01d88e8f7f13de1198491078beee6729de10b433 --- /dev/null +++ b/ChromeDevTools/Protocol/Debugger/ScriptParsedEvent.cs @@ -0,0 +1,52 @@ +using ChromeDevTools; + +namespace ChromeDevTools.Protocol.Debugger +{ + /// <summary> + /// Fired when virtual machine parses script. This event is also fired for all known and uncollected scripts upon enabling debugger. + /// </summary> + [Event(ProtocolName.Debugger.ScriptParsed)] + public class ScriptParsedEvent + { + /// <summary> + /// Gets or sets Identifier of the script parsed. + /// </summary> + public string ScriptId { get; set; } + /// <summary> + /// Gets or sets URL or name of the script parsed (if any). + /// </summary> + public string Url { get; set; } + /// <summary> + /// Gets or sets Line offset of the script within the resource with given URL (for script tags). + /// </summary> + public long StartLine { get; set; } + /// <summary> + /// Gets or sets Column offset of the script within the resource with given URL. + /// </summary> + public long StartColumn { get; set; } + /// <summary> + /// Gets or sets Last line of the script. + /// </summary> + public long EndLine { get; set; } + /// <summary> + /// Gets or sets Length of the last line of the script. + /// </summary> + public long EndColumn { get; set; } + /// <summary> + /// Gets or sets Determines whether this script is a user extension script. + /// </summary> + public bool IsContentScript { get; set; } + /// <summary> + /// Gets or sets Determines whether this script is an internal script. + /// </summary> + public bool IsInternalScript { get; set; } + /// <summary> + /// Gets or sets URL of source map associated with script (if any). + /// </summary> + public string SourceMapURL { get; set; } + /// <summary> + /// Gets or sets True, if this script has sourceURL. + /// </summary> + public bool HasSourceURL { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/Debugger/SearchInContentCommand.cs b/ChromeDevTools/Protocol/Debugger/SearchInContentCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..4c949cc37151a58d5a33719d07805ffce6911e70 --- /dev/null +++ b/ChromeDevTools/Protocol/Debugger/SearchInContentCommand.cs @@ -0,0 +1,29 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Debugger +{ + /// <summary> + /// Searches for given string in script content. + /// </summary> + [Command(ProtocolName.Debugger.SearchInContent)] + public class SearchInContentCommand + { + /// <summary> + /// Gets or sets Id of the script to search in. + /// </summary> + public string ScriptId { get; set; } + /// <summary> + /// Gets or sets String to search for. + /// </summary> + public string Query { get; set; } + /// <summary> + /// Gets or sets If true, search is case sensitive. + /// </summary> + public bool CaseSensitive { get; set; } + /// <summary> + /// Gets or sets If true, treats string parameter as regex. + /// </summary> + public bool IsRegex { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/Debugger/SearchInContentCommandResponse.cs b/ChromeDevTools/Protocol/Debugger/SearchInContentCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..964c9cb75b40e54bb1a5126458391a0ddbc869d5 --- /dev/null +++ b/ChromeDevTools/Protocol/Debugger/SearchInContentCommandResponse.cs @@ -0,0 +1,17 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Debugger +{ + /// <summary> + /// Searches for given string in script content. + /// </summary> + [CommandResponse(ProtocolName.Debugger.SearchInContent)] + public class SearchInContentCommandResponse + { + /// <summary> + /// Gets or sets List of search matches. + /// </summary> + public SearchMatch[] Result { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/Debugger/SearchMatch.cs b/ChromeDevTools/Protocol/Debugger/SearchMatch.cs new file mode 100644 index 0000000000000000000000000000000000000000..dad301bfadf31ea7cc2f68bbfd1050c92d0e3cff --- /dev/null +++ b/ChromeDevTools/Protocol/Debugger/SearchMatch.cs @@ -0,0 +1,20 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Debugger +{ + /// <summary> + /// Search match for resource. + /// </summary> + public class SearchMatch + { + /// <summary> + /// Gets or sets Line number in resource content. + /// </summary> + public double LineNumber { get; set; } + /// <summary> + /// Gets or sets Line with match content. + /// </summary> + public string LineContent { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/Debugger/SetAsyncCallStackDepthCommand.cs b/ChromeDevTools/Protocol/Debugger/SetAsyncCallStackDepthCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..ef04043c50b30d51d67a940b1bc9da0bbf29652e --- /dev/null +++ b/ChromeDevTools/Protocol/Debugger/SetAsyncCallStackDepthCommand.cs @@ -0,0 +1,17 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Debugger +{ + /// <summary> + /// Enables or disables async call stacks tracking. + /// </summary> + [Command(ProtocolName.Debugger.SetAsyncCallStackDepth)] + public class SetAsyncCallStackDepthCommand + { + /// <summary> + /// Gets or sets Maximum depth of async call stacks. Setting to <code>0</code> will effectively disable collecting async call stacks (default). + /// </summary> + public long MaxDepth { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/Debugger/SetAsyncCallStackDepthCommandResponse.cs b/ChromeDevTools/Protocol/Debugger/SetAsyncCallStackDepthCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..9d382948755a07bcd071add57001c9db1cfef671 --- /dev/null +++ b/ChromeDevTools/Protocol/Debugger/SetAsyncCallStackDepthCommandResponse.cs @@ -0,0 +1,13 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Debugger +{ + /// <summary> + /// Enables or disables async call stacks tracking. + /// </summary> + [CommandResponse(ProtocolName.Debugger.SetAsyncCallStackDepth)] + public class SetAsyncCallStackDepthCommandResponse + { + } +} diff --git a/ChromeDevTools/Protocol/Debugger/SetAsyncOperationBreakpointCommand.cs b/ChromeDevTools/Protocol/Debugger/SetAsyncOperationBreakpointCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..7e6ef0f4b17e85e79deacae68c7efda750123643 --- /dev/null +++ b/ChromeDevTools/Protocol/Debugger/SetAsyncOperationBreakpointCommand.cs @@ -0,0 +1,17 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Debugger +{ + /// <summary> + /// Sets breakpoint on AsyncOperation callback handler. + /// </summary> + [Command(ProtocolName.Debugger.SetAsyncOperationBreakpoint)] + public class SetAsyncOperationBreakpointCommand + { + /// <summary> + /// Gets or sets ID of the async operation to set breakpoint for. + /// </summary> + public long OperationId { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/Debugger/SetAsyncOperationBreakpointCommandResponse.cs b/ChromeDevTools/Protocol/Debugger/SetAsyncOperationBreakpointCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..5f0056f1d2d61eaee4b7716196da74d1fb070fc6 --- /dev/null +++ b/ChromeDevTools/Protocol/Debugger/SetAsyncOperationBreakpointCommandResponse.cs @@ -0,0 +1,13 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Debugger +{ + /// <summary> + /// Sets breakpoint on AsyncOperation callback handler. + /// </summary> + [CommandResponse(ProtocolName.Debugger.SetAsyncOperationBreakpoint)] + public class SetAsyncOperationBreakpointCommandResponse + { + } +} diff --git a/ChromeDevTools/Protocol/Debugger/SetBreakpointByUrlCommand.cs b/ChromeDevTools/Protocol/Debugger/SetBreakpointByUrlCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..f700e30fd54783606c16b6744a7ff8207383f70e --- /dev/null +++ b/ChromeDevTools/Protocol/Debugger/SetBreakpointByUrlCommand.cs @@ -0,0 +1,33 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Debugger +{ + /// <summary> + /// Sets JavaScript breakpoint at given location specified either by URL or URL regex. Once this command is issued, all existing parsed scripts will have breakpoints resolved and returned in <code>locations</code> property. Further matching script parsing will result in subsequent <code>breakpointResolved</code> events issued. This logical breakpoint will survive page reloads. + /// </summary> + [Command(ProtocolName.Debugger.SetBreakpointByUrl)] + public class SetBreakpointByUrlCommand + { + /// <summary> + /// Gets or sets Line number to set breakpoint at. + /// </summary> + public long LineNumber { get; set; } + /// <summary> + /// Gets or sets URL of the resources to set breakpoint on. + /// </summary> + public string Url { get; set; } + /// <summary> + /// Gets or sets Regex pattern for the URLs of the resources to set breakpoints on. Either <code>url</code> or <code>urlRegex</code> must be specified. + /// </summary> + public string UrlRegex { get; set; } + /// <summary> + /// Gets or sets Offset in the line to set breakpoint at. + /// </summary> + public long ColumnNumber { get; set; } + /// <summary> + /// Gets or sets Expression to use as a breakpoint condition. When specified, debugger will only stop on the breakpoint if this expression evaluates to true. + /// </summary> + public string Condition { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/Debugger/SetBreakpointByUrlCommandResponse.cs b/ChromeDevTools/Protocol/Debugger/SetBreakpointByUrlCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..c28020f541a34671becb9af33c8b43501abcd435 --- /dev/null +++ b/ChromeDevTools/Protocol/Debugger/SetBreakpointByUrlCommandResponse.cs @@ -0,0 +1,21 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Debugger +{ + /// <summary> + /// Sets JavaScript breakpoint at given location specified either by URL or URL regex. Once this command is issued, all existing parsed scripts will have breakpoints resolved and returned in <code>locations</code> property. Further matching script parsing will result in subsequent <code>breakpointResolved</code> events issued. This logical breakpoint will survive page reloads. + /// </summary> + [CommandResponse(ProtocolName.Debugger.SetBreakpointByUrl)] + public class SetBreakpointByUrlCommandResponse + { + /// <summary> + /// Gets or sets Id of the created breakpoint for further reference. + /// </summary> + public string BreakpointId { get; set; } + /// <summary> + /// Gets or sets List of the locations this breakpoint resolved into upon addition. + /// </summary> + public Location[] Locations { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/Debugger/SetBreakpointCommand.cs b/ChromeDevTools/Protocol/Debugger/SetBreakpointCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..f858c088e99b10895dc29786441eea849e12bbec --- /dev/null +++ b/ChromeDevTools/Protocol/Debugger/SetBreakpointCommand.cs @@ -0,0 +1,21 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Debugger +{ + /// <summary> + /// Sets JavaScript breakpoint at a given location. + /// </summary> + [Command(ProtocolName.Debugger.SetBreakpoint)] + public class SetBreakpointCommand + { + /// <summary> + /// Gets or sets Location to set breakpoint in. + /// </summary> + public Location Location { get; set; } + /// <summary> + /// Gets or sets Expression to use as a breakpoint condition. When specified, debugger will only stop on the breakpoint if this expression evaluates to true. + /// </summary> + public string Condition { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/Debugger/SetBreakpointCommandResponse.cs b/ChromeDevTools/Protocol/Debugger/SetBreakpointCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..0b479a18306a6e71c5f4386553e5078dec5d8ef0 --- /dev/null +++ b/ChromeDevTools/Protocol/Debugger/SetBreakpointCommandResponse.cs @@ -0,0 +1,21 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Debugger +{ + /// <summary> + /// Sets JavaScript breakpoint at a given location. + /// </summary> + [CommandResponse(ProtocolName.Debugger.SetBreakpoint)] + public class SetBreakpointCommandResponse + { + /// <summary> + /// Gets or sets Id of the created breakpoint for further reference. + /// </summary> + public string BreakpointId { get; set; } + /// <summary> + /// Gets or sets Location this breakpoint resolved into. + /// </summary> + public Location ActualLocation { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/Debugger/SetBreakpointsActiveCommand.cs b/ChromeDevTools/Protocol/Debugger/SetBreakpointsActiveCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..1320502de6f1ddaedba6b3243081498c207fa627 --- /dev/null +++ b/ChromeDevTools/Protocol/Debugger/SetBreakpointsActiveCommand.cs @@ -0,0 +1,17 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Debugger +{ + /// <summary> + /// Activates / deactivates all breakpoints on the page. + /// </summary> + [Command(ProtocolName.Debugger.SetBreakpointsActive)] + public class SetBreakpointsActiveCommand + { + /// <summary> + /// Gets or sets New value for breakpoints active state. + /// </summary> + public bool Active { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/Debugger/SetBreakpointsActiveCommandResponse.cs b/ChromeDevTools/Protocol/Debugger/SetBreakpointsActiveCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..af33cff5e8d1a35b030a774014069ad09c39a337 --- /dev/null +++ b/ChromeDevTools/Protocol/Debugger/SetBreakpointsActiveCommandResponse.cs @@ -0,0 +1,13 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Debugger +{ + /// <summary> + /// Activates / deactivates all breakpoints on the page. + /// </summary> + [CommandResponse(ProtocolName.Debugger.SetBreakpointsActive)] + public class SetBreakpointsActiveCommandResponse + { + } +} diff --git a/ChromeDevTools/Protocol/Debugger/SetPauseOnExceptionsCommand.cs b/ChromeDevTools/Protocol/Debugger/SetPauseOnExceptionsCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..861b69cbf20d38a9517e25fe6726e7cd30c4e411 --- /dev/null +++ b/ChromeDevTools/Protocol/Debugger/SetPauseOnExceptionsCommand.cs @@ -0,0 +1,17 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Debugger +{ + /// <summary> + /// Defines pause on exceptions state. Can be set to stop on all exceptions, uncaught exceptions or no exceptions. Initial pause on exceptions state is <code>none</code>. + /// </summary> + [Command(ProtocolName.Debugger.SetPauseOnExceptions)] + public class SetPauseOnExceptionsCommand + { + /// <summary> + /// Gets or sets Pause on exceptions mode. + /// </summary> + public string State { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/Debugger/SetPauseOnExceptionsCommandResponse.cs b/ChromeDevTools/Protocol/Debugger/SetPauseOnExceptionsCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..08bea7dc1b9ea24b758028ca49238a46e2fd1a87 --- /dev/null +++ b/ChromeDevTools/Protocol/Debugger/SetPauseOnExceptionsCommandResponse.cs @@ -0,0 +1,13 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Debugger +{ + /// <summary> + /// Defines pause on exceptions state. Can be set to stop on all exceptions, uncaught exceptions or no exceptions. Initial pause on exceptions state is <code>none</code>. + /// </summary> + [CommandResponse(ProtocolName.Debugger.SetPauseOnExceptions)] + public class SetPauseOnExceptionsCommandResponse + { + } +} diff --git a/ChromeDevTools/Protocol/Debugger/SetScriptSourceCommand.cs b/ChromeDevTools/Protocol/Debugger/SetScriptSourceCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..8575aafbd39092acfccbe466f8b0c976ffa7e3d5 --- /dev/null +++ b/ChromeDevTools/Protocol/Debugger/SetScriptSourceCommand.cs @@ -0,0 +1,25 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Debugger +{ + /// <summary> + /// Edits JavaScript source live. + /// </summary> + [Command(ProtocolName.Debugger.SetScriptSource)] + public class SetScriptSourceCommand + { + /// <summary> + /// Gets or sets Id of the script to edit. + /// </summary> + public string ScriptId { get; set; } + /// <summary> + /// Gets or sets New content of the script. + /// </summary> + public string ScriptSource { get; set; } + /// <summary> + /// Gets or sets If true the change will not actually be applied. Preview mode may be used to get result description without actually modifying the code. + /// </summary> + public bool Preview { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/Debugger/SetScriptSourceCommandResponse.cs b/ChromeDevTools/Protocol/Debugger/SetScriptSourceCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..2f3bd7b1a9d6c018baa1bbc6097d0f1a113ebff1 --- /dev/null +++ b/ChromeDevTools/Protocol/Debugger/SetScriptSourceCommandResponse.cs @@ -0,0 +1,25 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Debugger +{ + /// <summary> + /// Edits JavaScript source live. + /// </summary> + [CommandResponse(ProtocolName.Debugger.SetScriptSource)] + public class SetScriptSourceCommandResponse + { + /// <summary> + /// Gets or sets New stack trace in case editing has happened while VM was stopped. + /// </summary> + public CallFrame[] CallFrames { get; set; } + /// <summary> + /// Gets or sets VM-specific description of the changes applied. + /// </summary> + public object Result { get; set; } + /// <summary> + /// Gets or sets Async stack trace, if any. + /// </summary> + public StackTrace AsyncStackTrace { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/Debugger/SetScriptSourceError.cs b/ChromeDevTools/Protocol/Debugger/SetScriptSourceError.cs new file mode 100644 index 0000000000000000000000000000000000000000..0b3ed14d39e08e9535a673c8db34753bab751f46 --- /dev/null +++ b/ChromeDevTools/Protocol/Debugger/SetScriptSourceError.cs @@ -0,0 +1,16 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Debugger +{ + /// <summary> + /// Error data for setScriptSource command. compileError is a case type for uncompilable script source error. + /// </summary> + public class SetScriptSourceError + { + /// <summary> + /// Gets or sets CompileError + /// </summary> + public object CompileError { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/Debugger/SetSkipAllPausesCommand.cs b/ChromeDevTools/Protocol/Debugger/SetSkipAllPausesCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..b7eb18503c8d3ec598f2f99ec99c6494af0757fd --- /dev/null +++ b/ChromeDevTools/Protocol/Debugger/SetSkipAllPausesCommand.cs @@ -0,0 +1,17 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Debugger +{ + /// <summary> + /// Makes page not interrupt on any pauses (breakpoint, exception, dom exception etc). + /// </summary> + [Command(ProtocolName.Debugger.SetSkipAllPauses)] + public class SetSkipAllPausesCommand + { + /// <summary> + /// Gets or sets New value for skip pauses state. + /// </summary> + public bool Skipped { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/Debugger/SetSkipAllPausesCommandResponse.cs b/ChromeDevTools/Protocol/Debugger/SetSkipAllPausesCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..ba002b55f74bb3f90ccc8cb8a30350a9a3170ae4 --- /dev/null +++ b/ChromeDevTools/Protocol/Debugger/SetSkipAllPausesCommandResponse.cs @@ -0,0 +1,13 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Debugger +{ + /// <summary> + /// Makes page not interrupt on any pauses (breakpoint, exception, dom exception etc). + /// </summary> + [CommandResponse(ProtocolName.Debugger.SetSkipAllPauses)] + public class SetSkipAllPausesCommandResponse + { + } +} diff --git a/ChromeDevTools/Protocol/Debugger/SetVariableValueCommand.cs b/ChromeDevTools/Protocol/Debugger/SetVariableValueCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..4a7cc29f00148bab191efec2afaf32bac9bf4fef --- /dev/null +++ b/ChromeDevTools/Protocol/Debugger/SetVariableValueCommand.cs @@ -0,0 +1,33 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Debugger +{ + /// <summary> + /// Changes value of variable in a callframe or a closure. Either callframe or function must be specified. Object-based scopes are not supported and must be mutated manually. + /// </summary> + [Command(ProtocolName.Debugger.SetVariableValue)] + public class SetVariableValueCommand + { + /// <summary> + /// Gets or sets 0-based number of scope as was listed in scope chain. Only 'local', 'closure' and 'catch' scope types are allowed. Other scopes could be manipulated manually. + /// </summary> + public long ScopeNumber { get; set; } + /// <summary> + /// Gets or sets Variable name. + /// </summary> + public string VariableName { get; set; } + /// <summary> + /// Gets or sets New variable value. + /// </summary> + public Runtime.CallArgument NewValue { get; set; } + /// <summary> + /// Gets or sets Id of callframe that holds variable. + /// </summary> + public string CallFrameId { get; set; } + /// <summary> + /// Gets or sets Object id of closure (function) that holds variable. + /// </summary> + public string FunctionObjectId { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/Debugger/SetVariableValueCommandResponse.cs b/ChromeDevTools/Protocol/Debugger/SetVariableValueCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..efedaec4e18832073b9063428af01cb1edd2c588 --- /dev/null +++ b/ChromeDevTools/Protocol/Debugger/SetVariableValueCommandResponse.cs @@ -0,0 +1,13 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Debugger +{ + /// <summary> + /// Changes value of variable in a callframe or a closure. Either callframe or function must be specified. Object-based scopes are not supported and must be mutated manually. + /// </summary> + [CommandResponse(ProtocolName.Debugger.SetVariableValue)] + public class SetVariableValueCommandResponse + { + } +} diff --git a/ChromeDevTools/Protocol/Debugger/SkipStackFramesCommand.cs b/ChromeDevTools/Protocol/Debugger/SkipStackFramesCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..d94381e7e8a1567d86e8779703bfa3caace1d8bb --- /dev/null +++ b/ChromeDevTools/Protocol/Debugger/SkipStackFramesCommand.cs @@ -0,0 +1,21 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Debugger +{ + /// <summary> + /// Makes backend skip steps in the sources with names matching given pattern. VM will try leave blacklisted scripts by performing 'step in' several times, finally resorting to 'step out' if unsuccessful. + /// </summary> + [Command(ProtocolName.Debugger.SkipStackFrames)] + public class SkipStackFramesCommand + { + /// <summary> + /// Gets or sets Regular expression defining the scripts to ignore while stepping. + /// </summary> + public string Script { get; set; } + /// <summary> + /// Gets or sets True, if all content scripts should be ignored. + /// </summary> + public bool SkipContentScripts { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/Debugger/SkipStackFramesCommandResponse.cs b/ChromeDevTools/Protocol/Debugger/SkipStackFramesCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..45eaaccc56db7d38982be83eb9bad968ea250ac6 --- /dev/null +++ b/ChromeDevTools/Protocol/Debugger/SkipStackFramesCommandResponse.cs @@ -0,0 +1,13 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Debugger +{ + /// <summary> + /// Makes backend skip steps in the sources with names matching given pattern. VM will try leave blacklisted scripts by performing 'step in' several times, finally resorting to 'step out' if unsuccessful. + /// </summary> + [CommandResponse(ProtocolName.Debugger.SkipStackFrames)] + public class SkipStackFramesCommandResponse + { + } +} diff --git a/ChromeDevTools/Protocol/Debugger/StackTrace.cs b/ChromeDevTools/Protocol/Debugger/StackTrace.cs new file mode 100644 index 0000000000000000000000000000000000000000..d43a432e8980ad2728504635ac7cc72e9e7258d2 --- /dev/null +++ b/ChromeDevTools/Protocol/Debugger/StackTrace.cs @@ -0,0 +1,24 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Debugger +{ + /// <summary> + /// JavaScript call stack, including async stack traces. + /// </summary> + public class StackTrace + { + /// <summary> + /// Gets or sets Call frames of the stack trace. + /// </summary> + public CallFrame[] CallFrames { get; set; } + /// <summary> + /// Gets or sets String label of this stack trace. For async traces this may be a name of the function that initiated the async call. + /// </summary> + public string Description { get; set; } + /// <summary> + /// Gets or sets Async stack trace, if any. + /// </summary> + public StackTrace AsyncStackTrace { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/Debugger/StepIntoAsyncCommand.cs b/ChromeDevTools/Protocol/Debugger/StepIntoAsyncCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..9e2d5c34f5b6f287be13df97562833ccf83b2b1f --- /dev/null +++ b/ChromeDevTools/Protocol/Debugger/StepIntoAsyncCommand.cs @@ -0,0 +1,13 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Debugger +{ + /// <summary> + /// Steps into the first async operation handler that was scheduled by or after the current statement. + /// </summary> + [Command(ProtocolName.Debugger.StepIntoAsync)] + public class StepIntoAsyncCommand + { + } +} diff --git a/ChromeDevTools/Protocol/Debugger/StepIntoAsyncCommandResponse.cs b/ChromeDevTools/Protocol/Debugger/StepIntoAsyncCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..b9a27b68a0356fae4469c22231f7cab7ebd3d631 --- /dev/null +++ b/ChromeDevTools/Protocol/Debugger/StepIntoAsyncCommandResponse.cs @@ -0,0 +1,13 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Debugger +{ + /// <summary> + /// Steps into the first async operation handler that was scheduled by or after the current statement. + /// </summary> + [CommandResponse(ProtocolName.Debugger.StepIntoAsync)] + public class StepIntoAsyncCommandResponse + { + } +} diff --git a/ChromeDevTools/Protocol/Debugger/StepIntoCommand.cs b/ChromeDevTools/Protocol/Debugger/StepIntoCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..5f8b396a3ccb4804e4c6c3838492b952b60b6cbe --- /dev/null +++ b/ChromeDevTools/Protocol/Debugger/StepIntoCommand.cs @@ -0,0 +1,13 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Debugger +{ + /// <summary> + /// Steps into the function call. + /// </summary> + [Command(ProtocolName.Debugger.StepInto)] + public class StepIntoCommand + { + } +} diff --git a/ChromeDevTools/Protocol/Debugger/StepIntoCommandResponse.cs b/ChromeDevTools/Protocol/Debugger/StepIntoCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..8c5181be06b1cb5e065f49b88639792fd25e4b2e --- /dev/null +++ b/ChromeDevTools/Protocol/Debugger/StepIntoCommandResponse.cs @@ -0,0 +1,13 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Debugger +{ + /// <summary> + /// Steps into the function call. + /// </summary> + [CommandResponse(ProtocolName.Debugger.StepInto)] + public class StepIntoCommandResponse + { + } +} diff --git a/ChromeDevTools/Protocol/Debugger/StepOutCommand.cs b/ChromeDevTools/Protocol/Debugger/StepOutCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..2604fbe754548a3e95eb6dc64a3f0703c78d82c7 --- /dev/null +++ b/ChromeDevTools/Protocol/Debugger/StepOutCommand.cs @@ -0,0 +1,13 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Debugger +{ + /// <summary> + /// Steps out of the function call. + /// </summary> + [Command(ProtocolName.Debugger.StepOut)] + public class StepOutCommand + { + } +} diff --git a/ChromeDevTools/Protocol/Debugger/StepOutCommandResponse.cs b/ChromeDevTools/Protocol/Debugger/StepOutCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..f00def3a8f730c2974e5601efc7249080e834635 --- /dev/null +++ b/ChromeDevTools/Protocol/Debugger/StepOutCommandResponse.cs @@ -0,0 +1,13 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Debugger +{ + /// <summary> + /// Steps out of the function call. + /// </summary> + [CommandResponse(ProtocolName.Debugger.StepOut)] + public class StepOutCommandResponse + { + } +} diff --git a/ChromeDevTools/Protocol/Debugger/StepOverCommand.cs b/ChromeDevTools/Protocol/Debugger/StepOverCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..9ac7783011815f3d72e70eb4dda88464bc1557db --- /dev/null +++ b/ChromeDevTools/Protocol/Debugger/StepOverCommand.cs @@ -0,0 +1,13 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Debugger +{ + /// <summary> + /// Steps over the statement. + /// </summary> + [Command(ProtocolName.Debugger.StepOver)] + public class StepOverCommand + { + } +} diff --git a/ChromeDevTools/Protocol/Debugger/StepOverCommandResponse.cs b/ChromeDevTools/Protocol/Debugger/StepOverCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..9862c4a25f2e9dbb14e4149b56d835a7df802910 --- /dev/null +++ b/ChromeDevTools/Protocol/Debugger/StepOverCommandResponse.cs @@ -0,0 +1,13 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Debugger +{ + /// <summary> + /// Steps over the statement. + /// </summary> + [CommandResponse(ProtocolName.Debugger.StepOver)] + public class StepOverCommandResponse + { + } +} diff --git a/ChromeDevTools/Protocol/DeviceOrientation/ClearDeviceOrientationOverrideCommand.cs b/ChromeDevTools/Protocol/DeviceOrientation/ClearDeviceOrientationOverrideCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..003f3c066b3d5a878b091a13a5661d3ff295282d --- /dev/null +++ b/ChromeDevTools/Protocol/DeviceOrientation/ClearDeviceOrientationOverrideCommand.cs @@ -0,0 +1,13 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.DeviceOrientation +{ + /// <summary> + /// Clears the overridden Device Orientation. + /// </summary> + [Command(ProtocolName.DeviceOrientation.ClearDeviceOrientationOverride)] + public class ClearDeviceOrientationOverrideCommand + { + } +} diff --git a/ChromeDevTools/Protocol/DeviceOrientation/ClearDeviceOrientationOverrideCommandResponse.cs b/ChromeDevTools/Protocol/DeviceOrientation/ClearDeviceOrientationOverrideCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..97a2690ef6da08ee29ce78b8ae9834f3a322d422 --- /dev/null +++ b/ChromeDevTools/Protocol/DeviceOrientation/ClearDeviceOrientationOverrideCommandResponse.cs @@ -0,0 +1,13 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.DeviceOrientation +{ + /// <summary> + /// Clears the overridden Device Orientation. + /// </summary> + [CommandResponse(ProtocolName.DeviceOrientation.ClearDeviceOrientationOverride)] + public class ClearDeviceOrientationOverrideCommandResponse + { + } +} diff --git a/ChromeDevTools/Protocol/DeviceOrientation/SetDeviceOrientationOverrideCommand.cs b/ChromeDevTools/Protocol/DeviceOrientation/SetDeviceOrientationOverrideCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..dc2f76896daba8993c71ff5eebd3c40c3a19143c --- /dev/null +++ b/ChromeDevTools/Protocol/DeviceOrientation/SetDeviceOrientationOverrideCommand.cs @@ -0,0 +1,25 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.DeviceOrientation +{ + /// <summary> + /// Overrides the Device Orientation. + /// </summary> + [Command(ProtocolName.DeviceOrientation.SetDeviceOrientationOverride)] + public class SetDeviceOrientationOverrideCommand + { + /// <summary> + /// Gets or sets Mock alpha + /// </summary> + public double Alpha { get; set; } + /// <summary> + /// Gets or sets Mock beta + /// </summary> + public double Beta { get; set; } + /// <summary> + /// Gets or sets Mock gamma + /// </summary> + public double Gamma { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/DeviceOrientation/SetDeviceOrientationOverrideCommandResponse.cs b/ChromeDevTools/Protocol/DeviceOrientation/SetDeviceOrientationOverrideCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..bf10addcb092f87f0a985dcfb09e181e97151840 --- /dev/null +++ b/ChromeDevTools/Protocol/DeviceOrientation/SetDeviceOrientationOverrideCommandResponse.cs @@ -0,0 +1,13 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.DeviceOrientation +{ + /// <summary> + /// Overrides the Device Orientation. + /// </summary> + [CommandResponse(ProtocolName.DeviceOrientation.SetDeviceOrientationOverride)] + public class SetDeviceOrientationOverrideCommandResponse + { + } +} diff --git a/ChromeDevTools/Protocol/Emulation/CanEmulateCommand.cs b/ChromeDevTools/Protocol/Emulation/CanEmulateCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..dbcbae4da9a3a9c88bdd618b2283a98a1666517d --- /dev/null +++ b/ChromeDevTools/Protocol/Emulation/CanEmulateCommand.cs @@ -0,0 +1,13 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Emulation +{ + /// <summary> + /// Tells whether emulation is supported. + /// </summary> + [Command(ProtocolName.Emulation.CanEmulate)] + public class CanEmulateCommand + { + } +} diff --git a/ChromeDevTools/Protocol/Emulation/CanEmulateCommandResponse.cs b/ChromeDevTools/Protocol/Emulation/CanEmulateCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..9927280b4305147c752a754c299846b53a9b70f9 --- /dev/null +++ b/ChromeDevTools/Protocol/Emulation/CanEmulateCommandResponse.cs @@ -0,0 +1,17 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Emulation +{ + /// <summary> + /// Tells whether emulation is supported. + /// </summary> + [CommandResponse(ProtocolName.Emulation.CanEmulate)] + public class CanEmulateCommandResponse + { + /// <summary> + /// Gets or sets True if emulation is supported. + /// </summary> + public bool Result { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/Emulation/ClearDeviceMetricsOverrideCommand.cs b/ChromeDevTools/Protocol/Emulation/ClearDeviceMetricsOverrideCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..4ef4aef0c6249f6c42879040c55297ca8e4578ad --- /dev/null +++ b/ChromeDevTools/Protocol/Emulation/ClearDeviceMetricsOverrideCommand.cs @@ -0,0 +1,13 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Emulation +{ + /// <summary> + /// Clears the overriden device metrics. + /// </summary> + [Command(ProtocolName.Emulation.ClearDeviceMetricsOverride)] + public class ClearDeviceMetricsOverrideCommand + { + } +} diff --git a/ChromeDevTools/Protocol/Emulation/ClearDeviceMetricsOverrideCommandResponse.cs b/ChromeDevTools/Protocol/Emulation/ClearDeviceMetricsOverrideCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..5faf09615ce22f8429f0570f364c8fe0d3372735 --- /dev/null +++ b/ChromeDevTools/Protocol/Emulation/ClearDeviceMetricsOverrideCommandResponse.cs @@ -0,0 +1,13 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Emulation +{ + /// <summary> + /// Clears the overriden device metrics. + /// </summary> + [CommandResponse(ProtocolName.Emulation.ClearDeviceMetricsOverride)] + public class ClearDeviceMetricsOverrideCommandResponse + { + } +} diff --git a/ChromeDevTools/Protocol/Emulation/ClearGeolocationOverrideCommand.cs b/ChromeDevTools/Protocol/Emulation/ClearGeolocationOverrideCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..5599d9efd100bd5d85cb5e5f93898c811ca57b5d --- /dev/null +++ b/ChromeDevTools/Protocol/Emulation/ClearGeolocationOverrideCommand.cs @@ -0,0 +1,13 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Emulation +{ + /// <summary> + /// Clears the overriden Geolocation Position and Error. + /// </summary> + [Command(ProtocolName.Emulation.ClearGeolocationOverride)] + public class ClearGeolocationOverrideCommand + { + } +} diff --git a/ChromeDevTools/Protocol/Emulation/ClearGeolocationOverrideCommandResponse.cs b/ChromeDevTools/Protocol/Emulation/ClearGeolocationOverrideCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..fdd772520e898a8ee0c03ad393af411ce4bdd5d8 --- /dev/null +++ b/ChromeDevTools/Protocol/Emulation/ClearGeolocationOverrideCommandResponse.cs @@ -0,0 +1,13 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Emulation +{ + /// <summary> + /// Clears the overriden Geolocation Position and Error. + /// </summary> + [CommandResponse(ProtocolName.Emulation.ClearGeolocationOverride)] + public class ClearGeolocationOverrideCommandResponse + { + } +} diff --git a/ChromeDevTools/Protocol/Emulation/ResetScrollAndPageScaleFactorCommand.cs b/ChromeDevTools/Protocol/Emulation/ResetScrollAndPageScaleFactorCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..9cf671bd04aede60342509cdc86f5a65b88140d7 --- /dev/null +++ b/ChromeDevTools/Protocol/Emulation/ResetScrollAndPageScaleFactorCommand.cs @@ -0,0 +1,13 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Emulation +{ + /// <summary> + /// Requests that scroll offsets and page scale factor are reset to initial values. + /// </summary> + [Command(ProtocolName.Emulation.ResetScrollAndPageScaleFactor)] + public class ResetScrollAndPageScaleFactorCommand + { + } +} diff --git a/ChromeDevTools/Protocol/Emulation/ResetScrollAndPageScaleFactorCommandResponse.cs b/ChromeDevTools/Protocol/Emulation/ResetScrollAndPageScaleFactorCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..cd27419e247b7f41cba50a94d06aa45f0bb04062 --- /dev/null +++ b/ChromeDevTools/Protocol/Emulation/ResetScrollAndPageScaleFactorCommandResponse.cs @@ -0,0 +1,13 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Emulation +{ + /// <summary> + /// Requests that scroll offsets and page scale factor are reset to initial values. + /// </summary> + [CommandResponse(ProtocolName.Emulation.ResetScrollAndPageScaleFactor)] + public class ResetScrollAndPageScaleFactorCommandResponse + { + } +} diff --git a/ChromeDevTools/Protocol/Emulation/SetDeviceMetricsOverrideCommand.cs b/ChromeDevTools/Protocol/Emulation/SetDeviceMetricsOverrideCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..3220ac24bd193f23bf5ce6dae14cba3b5a5f32c8 --- /dev/null +++ b/ChromeDevTools/Protocol/Emulation/SetDeviceMetricsOverrideCommand.cs @@ -0,0 +1,45 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Emulation +{ + /// <summary> + /// Overrides the values of device screen dimensions (window.screen.width, window.screen.height, window.innerWidth, window.innerHeight, and "device-width"/"device-height"-related CSS media query results). + /// </summary> + [Command(ProtocolName.Emulation.SetDeviceMetricsOverride)] + public class SetDeviceMetricsOverrideCommand + { + /// <summary> + /// Gets or sets Overriding width value in pixels (minimum 0, maximum 10000000). 0 disables the override. + /// </summary> + public long Width { get; set; } + /// <summary> + /// Gets or sets Overriding height value in pixels (minimum 0, maximum 10000000). 0 disables the override. + /// </summary> + public long Height { get; set; } + /// <summary> + /// Gets or sets Overriding device scale factor value. 0 disables the override. + /// </summary> + public double DeviceScaleFactor { get; set; } + /// <summary> + /// Gets or sets Whether to emulate mobile device. This includes viewport meta tag, overlay scrollbars, text autosizing and more. + /// </summary> + public bool Mobile { get; set; } + /// <summary> + /// Gets or sets Whether a view that exceeds the available browser window area should be scaled down to fit. + /// </summary> + public bool FitWindow { get; set; } + /// <summary> + /// Gets or sets Scale to apply to resulting view image. Ignored in |fitWindow| mode. + /// </summary> + public double Scale { get; set; } + /// <summary> + /// Gets or sets X offset to shift resulting view image by. Ignored in |fitWindow| mode. + /// </summary> + public double OffsetX { get; set; } + /// <summary> + /// Gets or sets Y offset to shift resulting view image by. Ignored in |fitWindow| mode. + /// </summary> + public double OffsetY { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/Emulation/SetDeviceMetricsOverrideCommandResponse.cs b/ChromeDevTools/Protocol/Emulation/SetDeviceMetricsOverrideCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..c64fd7f5ce59d0abf9c59408b11268172cbc682d --- /dev/null +++ b/ChromeDevTools/Protocol/Emulation/SetDeviceMetricsOverrideCommandResponse.cs @@ -0,0 +1,13 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Emulation +{ + /// <summary> + /// Overrides the values of device screen dimensions (window.screen.width, window.screen.height, window.innerWidth, window.innerHeight, and "device-width"/"device-height"-related CSS media query results). + /// </summary> + [CommandResponse(ProtocolName.Emulation.SetDeviceMetricsOverride)] + public class SetDeviceMetricsOverrideCommandResponse + { + } +} diff --git a/ChromeDevTools/Protocol/Emulation/SetEmulatedMediaCommand.cs b/ChromeDevTools/Protocol/Emulation/SetEmulatedMediaCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..faacdae951b34f406962ff6803359652e71d17e8 --- /dev/null +++ b/ChromeDevTools/Protocol/Emulation/SetEmulatedMediaCommand.cs @@ -0,0 +1,17 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Emulation +{ + /// <summary> + /// Emulates the given media for CSS media queries. + /// </summary> + [Command(ProtocolName.Emulation.SetEmulatedMedia)] + public class SetEmulatedMediaCommand + { + /// <summary> + /// Gets or sets Media type to emulate. Empty string disables the override. + /// </summary> + public string Media { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/Emulation/SetEmulatedMediaCommandResponse.cs b/ChromeDevTools/Protocol/Emulation/SetEmulatedMediaCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..81b35fd47b7ebe9a1423d9b2614fc2fa0c04266d --- /dev/null +++ b/ChromeDevTools/Protocol/Emulation/SetEmulatedMediaCommandResponse.cs @@ -0,0 +1,13 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Emulation +{ + /// <summary> + /// Emulates the given media for CSS media queries. + /// </summary> + [CommandResponse(ProtocolName.Emulation.SetEmulatedMedia)] + public class SetEmulatedMediaCommandResponse + { + } +} diff --git a/ChromeDevTools/Protocol/Emulation/SetGeolocationOverrideCommand.cs b/ChromeDevTools/Protocol/Emulation/SetGeolocationOverrideCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..b726481238d1d73b04804fd750a74e21a461be48 --- /dev/null +++ b/ChromeDevTools/Protocol/Emulation/SetGeolocationOverrideCommand.cs @@ -0,0 +1,25 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Emulation +{ + /// <summary> + /// Overrides the Geolocation Position or Error. Omitting any of the parameters emulates position unavailable. + /// </summary> + [Command(ProtocolName.Emulation.SetGeolocationOverride)] + public class SetGeolocationOverrideCommand + { + /// <summary> + /// Gets or sets Mock latitude + /// </summary> + public double Latitude { get; set; } + /// <summary> + /// Gets or sets Mock longitude + /// </summary> + public double Longitude { get; set; } + /// <summary> + /// Gets or sets Mock accuracy + /// </summary> + public double Accuracy { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/Emulation/SetGeolocationOverrideCommandResponse.cs b/ChromeDevTools/Protocol/Emulation/SetGeolocationOverrideCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..e05b78e73b8c08c8090c9a2985c780aee18cd212 --- /dev/null +++ b/ChromeDevTools/Protocol/Emulation/SetGeolocationOverrideCommandResponse.cs @@ -0,0 +1,13 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Emulation +{ + /// <summary> + /// Overrides the Geolocation Position or Error. Omitting any of the parameters emulates position unavailable. + /// </summary> + [CommandResponse(ProtocolName.Emulation.SetGeolocationOverride)] + public class SetGeolocationOverrideCommandResponse + { + } +} diff --git a/ChromeDevTools/Protocol/Emulation/SetPageScaleFactorCommand.cs b/ChromeDevTools/Protocol/Emulation/SetPageScaleFactorCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..55cb2db5ba8adfca49472bd639ddf8e57adedb79 --- /dev/null +++ b/ChromeDevTools/Protocol/Emulation/SetPageScaleFactorCommand.cs @@ -0,0 +1,17 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Emulation +{ + /// <summary> + /// Sets a specified page scale factor. + /// </summary> + [Command(ProtocolName.Emulation.SetPageScaleFactor)] + public class SetPageScaleFactorCommand + { + /// <summary> + /// Gets or sets Page scale factor. + /// </summary> + public double PageScaleFactor { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/Emulation/SetPageScaleFactorCommandResponse.cs b/ChromeDevTools/Protocol/Emulation/SetPageScaleFactorCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..5c4a994dd47ee1aafd173ae5157718820780e45d --- /dev/null +++ b/ChromeDevTools/Protocol/Emulation/SetPageScaleFactorCommandResponse.cs @@ -0,0 +1,13 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Emulation +{ + /// <summary> + /// Sets a specified page scale factor. + /// </summary> + [CommandResponse(ProtocolName.Emulation.SetPageScaleFactor)] + public class SetPageScaleFactorCommandResponse + { + } +} diff --git a/ChromeDevTools/Protocol/Emulation/SetScriptExecutionDisabledCommand.cs b/ChromeDevTools/Protocol/Emulation/SetScriptExecutionDisabledCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..4c786633c3c37dd4f27a5c78b971940b8e971931 --- /dev/null +++ b/ChromeDevTools/Protocol/Emulation/SetScriptExecutionDisabledCommand.cs @@ -0,0 +1,17 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Emulation +{ + /// <summary> + /// Switches script execution in the page. + /// </summary> + [Command(ProtocolName.Emulation.SetScriptExecutionDisabled)] + public class SetScriptExecutionDisabledCommand + { + /// <summary> + /// Gets or sets Whether script execution should be disabled in the page. + /// </summary> + public bool Value { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/Emulation/SetScriptExecutionDisabledCommandResponse.cs b/ChromeDevTools/Protocol/Emulation/SetScriptExecutionDisabledCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..23063070ca0c7268d430a6fe25f1102caa9b68b1 --- /dev/null +++ b/ChromeDevTools/Protocol/Emulation/SetScriptExecutionDisabledCommandResponse.cs @@ -0,0 +1,13 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Emulation +{ + /// <summary> + /// Switches script execution in the page. + /// </summary> + [CommandResponse(ProtocolName.Emulation.SetScriptExecutionDisabled)] + public class SetScriptExecutionDisabledCommandResponse + { + } +} diff --git a/ChromeDevTools/Protocol/Emulation/SetTouchEmulationEnabledCommand.cs b/ChromeDevTools/Protocol/Emulation/SetTouchEmulationEnabledCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..ecf3da48b36b101e0fa8ac7485ddb8336ed2f726 --- /dev/null +++ b/ChromeDevTools/Protocol/Emulation/SetTouchEmulationEnabledCommand.cs @@ -0,0 +1,21 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Emulation +{ + /// <summary> + /// Toggles mouse event-based touch event emulation. + /// </summary> + [Command(ProtocolName.Emulation.SetTouchEmulationEnabled)] + public class SetTouchEmulationEnabledCommand + { + /// <summary> + /// Gets or sets Whether the touch event emulation should be enabled. + /// </summary> + public bool Enabled { get; set; } + /// <summary> + /// Gets or sets Touch/gesture events configuration. Default: current platform. + /// </summary> + public string Configuration { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/Emulation/SetTouchEmulationEnabledCommandResponse.cs b/ChromeDevTools/Protocol/Emulation/SetTouchEmulationEnabledCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..327049e0c228760e210cba2da4f320f32dd42c0c --- /dev/null +++ b/ChromeDevTools/Protocol/Emulation/SetTouchEmulationEnabledCommandResponse.cs @@ -0,0 +1,13 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Emulation +{ + /// <summary> + /// Toggles mouse event-based touch event emulation. + /// </summary> + [CommandResponse(ProtocolName.Emulation.SetTouchEmulationEnabled)] + public class SetTouchEmulationEnabledCommandResponse + { + } +} diff --git a/ChromeDevTools/Protocol/Emulation/Viewport.cs b/ChromeDevTools/Protocol/Emulation/Viewport.cs new file mode 100644 index 0000000000000000000000000000000000000000..d4568c65b5f2753c6054431195ea7b81b776e50d --- /dev/null +++ b/ChromeDevTools/Protocol/Emulation/Viewport.cs @@ -0,0 +1,40 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Emulation +{ + /// <summary> + /// Visible page viewport + /// </summary> + public class Viewport + { + /// <summary> + /// Gets or sets X scroll offset in CSS pixels. + /// </summary> + public double ScrollX { get; set; } + /// <summary> + /// Gets or sets Y scroll offset in CSS pixels. + /// </summary> + public double ScrollY { get; set; } + /// <summary> + /// Gets or sets Contents width in CSS pixels. + /// </summary> + public double ContentsWidth { get; set; } + /// <summary> + /// Gets or sets Contents height in CSS pixels. + /// </summary> + public double ContentsHeight { get; set; } + /// <summary> + /// Gets or sets Page scale factor. + /// </summary> + public double PageScaleFactor { get; set; } + /// <summary> + /// Gets or sets Minimum page scale factor. + /// </summary> + public double MinimumPageScaleFactor { get; set; } + /// <summary> + /// Gets or sets Maximum page scale factor. + /// </summary> + public double MaximumPageScaleFactor { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/Emulation/ViewportChangedEvent.cs b/ChromeDevTools/Protocol/Emulation/ViewportChangedEvent.cs new file mode 100644 index 0000000000000000000000000000000000000000..1e1a7e3437cde189ac7f06e4b73f91d989532c4f --- /dev/null +++ b/ChromeDevTools/Protocol/Emulation/ViewportChangedEvent.cs @@ -0,0 +1,16 @@ +using ChromeDevTools; + +namespace ChromeDevTools.Protocol.Emulation +{ + /// <summary> + /// Fired when a visible page viewport has changed. Only fired when device metrics are overridden. + /// </summary> + [Event(ProtocolName.Emulation.ViewportChanged)] + public class ViewportChangedEvent + { + /// <summary> + /// Gets or sets Viewport description. + /// </summary> + public Viewport Viewport { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/FileSystem/DeleteEntryCommand.cs b/ChromeDevTools/Protocol/FileSystem/DeleteEntryCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..151b520252ae251761dff08fda5e4c089a4a2843 --- /dev/null +++ b/ChromeDevTools/Protocol/FileSystem/DeleteEntryCommand.cs @@ -0,0 +1,17 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.FileSystem +{ + /// <summary> + /// Deletes specified entry. If the entry is a directory, the agent deletes children recursively. + /// </summary> + [Command(ProtocolName.FileSystem.DeleteEntry)] + public class DeleteEntryCommand + { + /// <summary> + /// Gets or sets URL of the entry to delete. + /// </summary> + public string Url { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/FileSystem/DeleteEntryCommandResponse.cs b/ChromeDevTools/Protocol/FileSystem/DeleteEntryCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..541ea15d540329dc2f72f19702227dbba5d0caa7 --- /dev/null +++ b/ChromeDevTools/Protocol/FileSystem/DeleteEntryCommandResponse.cs @@ -0,0 +1,17 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.FileSystem +{ + /// <summary> + /// Deletes specified entry. If the entry is a directory, the agent deletes children recursively. + /// </summary> + [CommandResponse(ProtocolName.FileSystem.DeleteEntry)] + public class DeleteEntryCommandResponse + { + /// <summary> + /// Gets or sets 0, if no error. Otherwise errorCode is set to FileError::ErrorCode value. + /// </summary> + public long ErrorCode { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/FileSystem/DisableCommand.cs b/ChromeDevTools/Protocol/FileSystem/DisableCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..787252c9dcd243c347eb720e3d6299758e8b8221 --- /dev/null +++ b/ChromeDevTools/Protocol/FileSystem/DisableCommand.cs @@ -0,0 +1,13 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.FileSystem +{ + /// <summary> + /// Disables events from backend. + /// </summary> + [Command(ProtocolName.FileSystem.Disable)] + public class DisableCommand + { + } +} diff --git a/ChromeDevTools/Protocol/FileSystem/DisableCommandResponse.cs b/ChromeDevTools/Protocol/FileSystem/DisableCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..aac4b93965a267197fa572fdcdc16297bf01d1c7 --- /dev/null +++ b/ChromeDevTools/Protocol/FileSystem/DisableCommandResponse.cs @@ -0,0 +1,13 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.FileSystem +{ + /// <summary> + /// Disables events from backend. + /// </summary> + [CommandResponse(ProtocolName.FileSystem.Disable)] + public class DisableCommandResponse + { + } +} diff --git a/ChromeDevTools/Protocol/FileSystem/EnableCommand.cs b/ChromeDevTools/Protocol/FileSystem/EnableCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..69f9dc86e0022b2f766d79a31ae8d9fbd4e2e7f0 --- /dev/null +++ b/ChromeDevTools/Protocol/FileSystem/EnableCommand.cs @@ -0,0 +1,13 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.FileSystem +{ + /// <summary> + /// Enables events from backend. + /// </summary> + [Command(ProtocolName.FileSystem.Enable)] + public class EnableCommand + { + } +} diff --git a/ChromeDevTools/Protocol/FileSystem/EnableCommandResponse.cs b/ChromeDevTools/Protocol/FileSystem/EnableCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..e06a60020cb38b9ee02c205dd338c48321815556 --- /dev/null +++ b/ChromeDevTools/Protocol/FileSystem/EnableCommandResponse.cs @@ -0,0 +1,13 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.FileSystem +{ + /// <summary> + /// Enables events from backend. + /// </summary> + [CommandResponse(ProtocolName.FileSystem.Enable)] + public class EnableCommandResponse + { + } +} diff --git a/ChromeDevTools/Protocol/FileSystem/Entry.cs b/ChromeDevTools/Protocol/FileSystem/Entry.cs new file mode 100644 index 0000000000000000000000000000000000000000..6b88cc63526655f1de54719d960b3ebab1004ac1 --- /dev/null +++ b/ChromeDevTools/Protocol/FileSystem/Entry.cs @@ -0,0 +1,36 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.FileSystem +{ + /// <summary> + /// Represents a browser side file or directory. + /// </summary> + public class Entry + { + /// <summary> + /// Gets or sets filesystem: URL for the entry. + /// </summary> + public string Url { get; set; } + /// <summary> + /// Gets or sets The name of the file or directory. + /// </summary> + public string Name { get; set; } + /// <summary> + /// Gets or sets True if the entry is a directory. + /// </summary> + public bool IsDirectory { get; set; } + /// <summary> + /// Gets or sets MIME type of the entry, available for a file only. + /// </summary> + public string MimeType { get; set; } + /// <summary> + /// Gets or sets ResourceType of the entry, available for a file only. + /// </summary> + public Page.ResourceType ResourceType { get; set; } + /// <summary> + /// Gets or sets True if the entry is a text file. + /// </summary> + public bool IsTextFile { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/FileSystem/Metadata.cs b/ChromeDevTools/Protocol/FileSystem/Metadata.cs new file mode 100644 index 0000000000000000000000000000000000000000..f29e5466df6bc80835d8cced82671191fd9b3ea8 --- /dev/null +++ b/ChromeDevTools/Protocol/FileSystem/Metadata.cs @@ -0,0 +1,20 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.FileSystem +{ + /// <summary> + /// Represents metadata of a file or entry. + /// </summary> + public class Metadata + { + /// <summary> + /// Gets or sets Modification time. + /// </summary> + public double ModificationTime { get; set; } + /// <summary> + /// Gets or sets File size. This field is always zero for directories. + /// </summary> + public double Size { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/FileSystem/RequestDirectoryContentCommand.cs b/ChromeDevTools/Protocol/FileSystem/RequestDirectoryContentCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..bf3ba6143764c71233ebaddb1508ed6be3dced0b --- /dev/null +++ b/ChromeDevTools/Protocol/FileSystem/RequestDirectoryContentCommand.cs @@ -0,0 +1,17 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.FileSystem +{ + /// <summary> + /// Returns content of the directory. + /// </summary> + [Command(ProtocolName.FileSystem.RequestDirectoryContent)] + public class RequestDirectoryContentCommand + { + /// <summary> + /// Gets or sets URL of the directory that the frontend is requesting to read from. + /// </summary> + public string Url { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/FileSystem/RequestDirectoryContentCommandResponse.cs b/ChromeDevTools/Protocol/FileSystem/RequestDirectoryContentCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..c2a4ccc58b2217d4ed745e2ab81480fbdb12a4b7 --- /dev/null +++ b/ChromeDevTools/Protocol/FileSystem/RequestDirectoryContentCommandResponse.cs @@ -0,0 +1,21 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.FileSystem +{ + /// <summary> + /// Returns content of the directory. + /// </summary> + [CommandResponse(ProtocolName.FileSystem.RequestDirectoryContent)] + public class RequestDirectoryContentCommandResponse + { + /// <summary> + /// Gets or sets 0, if no error. Otherwise, errorCode is set to FileError::ErrorCode value. + /// </summary> + public long ErrorCode { get; set; } + /// <summary> + /// Gets or sets Contains all entries on directory if the command completed successfully. + /// </summary> + public Entry[] Entries { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/FileSystem/RequestFileContentCommand.cs b/ChromeDevTools/Protocol/FileSystem/RequestFileContentCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..0cd4dc927b5bce38aba6d991c043272f3d76e2fd --- /dev/null +++ b/ChromeDevTools/Protocol/FileSystem/RequestFileContentCommand.cs @@ -0,0 +1,33 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.FileSystem +{ + /// <summary> + /// Returns content of the file. Result should be sliced into [start, end). + /// </summary> + [Command(ProtocolName.FileSystem.RequestFileContent)] + public class RequestFileContentCommand + { + /// <summary> + /// Gets or sets URL of the file that the frontend is requesting to read from. + /// </summary> + public string Url { get; set; } + /// <summary> + /// Gets or sets True if the content should be read as text, otherwise the result will be returned as base64 encoded text. + /// </summary> + public bool ReadAsText { get; set; } + /// <summary> + /// Gets or sets Specifies the start of range to read. + /// </summary> + public long Start { get; set; } + /// <summary> + /// Gets or sets Specifies the end of range to read exclusively. + /// </summary> + public long End { get; set; } + /// <summary> + /// Gets or sets Overrides charset of the content when content is served as text. + /// </summary> + public string Charset { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/FileSystem/RequestFileContentCommandResponse.cs b/ChromeDevTools/Protocol/FileSystem/RequestFileContentCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..afdd3f0af29d05d89a5e05cd4521066de5383a60 --- /dev/null +++ b/ChromeDevTools/Protocol/FileSystem/RequestFileContentCommandResponse.cs @@ -0,0 +1,25 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.FileSystem +{ + /// <summary> + /// Returns content of the file. Result should be sliced into [start, end). + /// </summary> + [CommandResponse(ProtocolName.FileSystem.RequestFileContent)] + public class RequestFileContentCommandResponse + { + /// <summary> + /// Gets or sets 0, if no error. Otherwise, errorCode is set to FileError::ErrorCode value. + /// </summary> + public long ErrorCode { get; set; } + /// <summary> + /// Gets or sets Content of the file. + /// </summary> + public string Content { get; set; } + /// <summary> + /// Gets or sets Charset of the content if it is served as text. + /// </summary> + public string Charset { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/FileSystem/RequestFileSystemRootCommand.cs b/ChromeDevTools/Protocol/FileSystem/RequestFileSystemRootCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..51f5b3451406744d667597fb286ae58820d46f6c --- /dev/null +++ b/ChromeDevTools/Protocol/FileSystem/RequestFileSystemRootCommand.cs @@ -0,0 +1,21 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.FileSystem +{ + /// <summary> + /// Returns root directory of the FileSystem, if exists. + /// </summary> + [Command(ProtocolName.FileSystem.RequestFileSystemRoot)] + public class RequestFileSystemRootCommand + { + /// <summary> + /// Gets or sets Security origin of requesting FileSystem. One of frames in current page needs to have this security origin. + /// </summary> + public string Origin { get; set; } + /// <summary> + /// Gets or sets FileSystem type of requesting FileSystem. + /// </summary> + public string Type { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/FileSystem/RequestFileSystemRootCommandResponse.cs b/ChromeDevTools/Protocol/FileSystem/RequestFileSystemRootCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..30243579a346522b23f282b33682268faa8f8445 --- /dev/null +++ b/ChromeDevTools/Protocol/FileSystem/RequestFileSystemRootCommandResponse.cs @@ -0,0 +1,21 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.FileSystem +{ + /// <summary> + /// Returns root directory of the FileSystem, if exists. + /// </summary> + [CommandResponse(ProtocolName.FileSystem.RequestFileSystemRoot)] + public class RequestFileSystemRootCommandResponse + { + /// <summary> + /// Gets or sets 0, if no error. Otherwise, errorCode is set to FileError::ErrorCode value. + /// </summary> + public long ErrorCode { get; set; } + /// <summary> + /// Gets or sets Contains root of the requested FileSystem if the command completed successfully. + /// </summary> + public Entry Root { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/FileSystem/RequestMetadataCommand.cs b/ChromeDevTools/Protocol/FileSystem/RequestMetadataCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..d1456d395a7d2d9093aa4365b2a236a5ff81944e --- /dev/null +++ b/ChromeDevTools/Protocol/FileSystem/RequestMetadataCommand.cs @@ -0,0 +1,17 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.FileSystem +{ + /// <summary> + /// Returns metadata of the entry. + /// </summary> + [Command(ProtocolName.FileSystem.RequestMetadata)] + public class RequestMetadataCommand + { + /// <summary> + /// Gets or sets URL of the entry that the frontend is requesting to get metadata from. + /// </summary> + public string Url { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/FileSystem/RequestMetadataCommandResponse.cs b/ChromeDevTools/Protocol/FileSystem/RequestMetadataCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..52959ac979ffdd632a2ff01ed233a3ee9ab49f03 --- /dev/null +++ b/ChromeDevTools/Protocol/FileSystem/RequestMetadataCommandResponse.cs @@ -0,0 +1,21 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.FileSystem +{ + /// <summary> + /// Returns metadata of the entry. + /// </summary> + [CommandResponse(ProtocolName.FileSystem.RequestMetadata)] + public class RequestMetadataCommandResponse + { + /// <summary> + /// Gets or sets 0, if no error. Otherwise, errorCode is set to FileError::ErrorCode value. + /// </summary> + public long ErrorCode { get; set; } + /// <summary> + /// Gets or sets Contains metadata of the entry if the command completed successfully. + /// </summary> + public Metadata Metadata { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/HeapProfiler/AddHeapSnapshotChunkEvent.cs b/ChromeDevTools/Protocol/HeapProfiler/AddHeapSnapshotChunkEvent.cs new file mode 100644 index 0000000000000000000000000000000000000000..7c3eebcff60ac095a028c6ea603eb7277bcd7d93 --- /dev/null +++ b/ChromeDevTools/Protocol/HeapProfiler/AddHeapSnapshotChunkEvent.cs @@ -0,0 +1,13 @@ +using ChromeDevTools; + +namespace ChromeDevTools.Protocol.HeapProfiler +{ + [Event(ProtocolName.HeapProfiler.AddHeapSnapshotChunk)] + public class AddHeapSnapshotChunkEvent + { + /// <summary> + /// Gets or sets Chunk + /// </summary> + public string Chunk { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/HeapProfiler/AddInspectedHeapObjectCommand.cs b/ChromeDevTools/Protocol/HeapProfiler/AddInspectedHeapObjectCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..49416a6d10d167f88d8b1397ea627155c6771534 --- /dev/null +++ b/ChromeDevTools/Protocol/HeapProfiler/AddInspectedHeapObjectCommand.cs @@ -0,0 +1,17 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.HeapProfiler +{ + /// <summary> + /// Enables console to refer to the node with given id via $x (see Command Line API for more details $x functions). + /// </summary> + [Command(ProtocolName.HeapProfiler.AddInspectedHeapObject)] + public class AddInspectedHeapObjectCommand + { + /// <summary> + /// Gets or sets Heap snapshot object id to be accessible by means of $x command line API. + /// </summary> + public string HeapObjectId { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/HeapProfiler/AddInspectedHeapObjectCommandResponse.cs b/ChromeDevTools/Protocol/HeapProfiler/AddInspectedHeapObjectCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..6b02c24412cf894be17bb4c7b5d147a9ee2fb0ae --- /dev/null +++ b/ChromeDevTools/Protocol/HeapProfiler/AddInspectedHeapObjectCommandResponse.cs @@ -0,0 +1,13 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.HeapProfiler +{ + /// <summary> + /// Enables console to refer to the node with given id via $x (see Command Line API for more details $x functions). + /// </summary> + [CommandResponse(ProtocolName.HeapProfiler.AddInspectedHeapObject)] + public class AddInspectedHeapObjectCommandResponse + { + } +} diff --git a/ChromeDevTools/Protocol/HeapProfiler/CollectGarbageCommand.cs b/ChromeDevTools/Protocol/HeapProfiler/CollectGarbageCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..36b58b7757876e672194066f53bf3b669072a34b --- /dev/null +++ b/ChromeDevTools/Protocol/HeapProfiler/CollectGarbageCommand.cs @@ -0,0 +1,10 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.HeapProfiler +{ + [Command(ProtocolName.HeapProfiler.CollectGarbage)] + public class CollectGarbageCommand + { + } +} diff --git a/ChromeDevTools/Protocol/HeapProfiler/CollectGarbageCommandResponse.cs b/ChromeDevTools/Protocol/HeapProfiler/CollectGarbageCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..18e53f86ce64542be3f35f8b6857ddc23ce417bd --- /dev/null +++ b/ChromeDevTools/Protocol/HeapProfiler/CollectGarbageCommandResponse.cs @@ -0,0 +1,10 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.HeapProfiler +{ + [CommandResponse(ProtocolName.HeapProfiler.CollectGarbage)] + public class CollectGarbageCommandResponse + { + } +} diff --git a/ChromeDevTools/Protocol/HeapProfiler/DisableCommand.cs b/ChromeDevTools/Protocol/HeapProfiler/DisableCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..2b6afda3010f19fe5628b62893acc9bc911e1d63 --- /dev/null +++ b/ChromeDevTools/Protocol/HeapProfiler/DisableCommand.cs @@ -0,0 +1,10 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.HeapProfiler +{ + [Command(ProtocolName.HeapProfiler.Disable)] + public class DisableCommand + { + } +} diff --git a/ChromeDevTools/Protocol/HeapProfiler/DisableCommandResponse.cs b/ChromeDevTools/Protocol/HeapProfiler/DisableCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..7c7074ad1f9eb3cd31b6e92fd5349bd0ab6aea24 --- /dev/null +++ b/ChromeDevTools/Protocol/HeapProfiler/DisableCommandResponse.cs @@ -0,0 +1,10 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.HeapProfiler +{ + [CommandResponse(ProtocolName.HeapProfiler.Disable)] + public class DisableCommandResponse + { + } +} diff --git a/ChromeDevTools/Protocol/HeapProfiler/EnableCommand.cs b/ChromeDevTools/Protocol/HeapProfiler/EnableCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..9997940f3e5df233982e08695b9fc96e66a7f1b0 --- /dev/null +++ b/ChromeDevTools/Protocol/HeapProfiler/EnableCommand.cs @@ -0,0 +1,10 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.HeapProfiler +{ + [Command(ProtocolName.HeapProfiler.Enable)] + public class EnableCommand + { + } +} diff --git a/ChromeDevTools/Protocol/HeapProfiler/EnableCommandResponse.cs b/ChromeDevTools/Protocol/HeapProfiler/EnableCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..5f15c8ff78e41174417dfaef3760a81fe6aa4ae3 --- /dev/null +++ b/ChromeDevTools/Protocol/HeapProfiler/EnableCommandResponse.cs @@ -0,0 +1,10 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.HeapProfiler +{ + [CommandResponse(ProtocolName.HeapProfiler.Enable)] + public class EnableCommandResponse + { + } +} diff --git a/ChromeDevTools/Protocol/HeapProfiler/GetHeapObjectIdCommand.cs b/ChromeDevTools/Protocol/HeapProfiler/GetHeapObjectIdCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..b508f16cb51878d97ccccc96359cadd0177d7199 --- /dev/null +++ b/ChromeDevTools/Protocol/HeapProfiler/GetHeapObjectIdCommand.cs @@ -0,0 +1,14 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.HeapProfiler +{ + [Command(ProtocolName.HeapProfiler.GetHeapObjectId)] + public class GetHeapObjectIdCommand + { + /// <summary> + /// Gets or sets Identifier of the object to get heap object id for. + /// </summary> + public string ObjectId { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/HeapProfiler/GetHeapObjectIdCommandResponse.cs b/ChromeDevTools/Protocol/HeapProfiler/GetHeapObjectIdCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..1d499b4e34f205dc8586e2bb58827730efb5002e --- /dev/null +++ b/ChromeDevTools/Protocol/HeapProfiler/GetHeapObjectIdCommandResponse.cs @@ -0,0 +1,14 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.HeapProfiler +{ + [CommandResponse(ProtocolName.HeapProfiler.GetHeapObjectId)] + public class GetHeapObjectIdCommandResponse + { + /// <summary> + /// Gets or sets Id of the heap snapshot object corresponding to the passed remote object id. + /// </summary> + public string HeapSnapshotObjectId { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/HeapProfiler/GetObjectByHeapObjectIdCommand.cs b/ChromeDevTools/Protocol/HeapProfiler/GetObjectByHeapObjectIdCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..2df3dec4211b050bdb2f4e67c5943e8789877f6a --- /dev/null +++ b/ChromeDevTools/Protocol/HeapProfiler/GetObjectByHeapObjectIdCommand.cs @@ -0,0 +1,18 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.HeapProfiler +{ + [Command(ProtocolName.HeapProfiler.GetObjectByHeapObjectId)] + public class GetObjectByHeapObjectIdCommand + { + /// <summary> + /// Gets or sets ObjectId + /// </summary> + public string ObjectId { get; set; } + /// <summary> + /// Gets or sets Symbolic group name that can be used to release multiple objects. + /// </summary> + public string ObjectGroup { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/HeapProfiler/GetObjectByHeapObjectIdCommandResponse.cs b/ChromeDevTools/Protocol/HeapProfiler/GetObjectByHeapObjectIdCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..2bd64bbcc97a3905e62d212da0465f561b836c50 --- /dev/null +++ b/ChromeDevTools/Protocol/HeapProfiler/GetObjectByHeapObjectIdCommandResponse.cs @@ -0,0 +1,14 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.HeapProfiler +{ + [CommandResponse(ProtocolName.HeapProfiler.GetObjectByHeapObjectId)] + public class GetObjectByHeapObjectIdCommandResponse + { + /// <summary> + /// Gets or sets Evaluation result. + /// </summary> + public Runtime.RemoteObject Result { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/HeapProfiler/HeapStatsUpdateEvent.cs b/ChromeDevTools/Protocol/HeapProfiler/HeapStatsUpdateEvent.cs new file mode 100644 index 0000000000000000000000000000000000000000..505c8cddd17be65a119d84496f8a0301e0f74e51 --- /dev/null +++ b/ChromeDevTools/Protocol/HeapProfiler/HeapStatsUpdateEvent.cs @@ -0,0 +1,16 @@ +using ChromeDevTools; + +namespace ChromeDevTools.Protocol.HeapProfiler +{ + /// <summary> + /// If heap objects tracking has been started then backend may send update for one or more fragments + /// </summary> + [Event(ProtocolName.HeapProfiler.HeapStatsUpdate)] + public class HeapStatsUpdateEvent + { + /// <summary> + /// Gets or sets An array of triplets. Each triplet describes a fragment. The first integer is the fragment index, the second integer is a total count of objects for the fragment, the third integer is a total size of the objects for the fragment. + /// </summary> + public long[] StatsUpdate { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/HeapProfiler/LastSeenObjectIdEvent.cs b/ChromeDevTools/Protocol/HeapProfiler/LastSeenObjectIdEvent.cs new file mode 100644 index 0000000000000000000000000000000000000000..d17ccd8526be3357b882fe9315753b000878e9c0 --- /dev/null +++ b/ChromeDevTools/Protocol/HeapProfiler/LastSeenObjectIdEvent.cs @@ -0,0 +1,20 @@ +using ChromeDevTools; + +namespace ChromeDevTools.Protocol.HeapProfiler +{ + /// <summary> + /// If heap objects tracking has been started then backend regulary sends a current value for last seen object id and corresponding timestamp. If the were changes in the heap since last event then one or more heapStatsUpdate events will be sent before a new lastSeenObjectId event. + /// </summary> + [Event(ProtocolName.HeapProfiler.LastSeenObjectId)] + public class LastSeenObjectIdEvent + { + /// <summary> + /// Gets or sets LastSeenObjectId + /// </summary> + public long LastSeenObjectId { get; set; } + /// <summary> + /// Gets or sets Timestamp + /// </summary> + public double Timestamp { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/HeapProfiler/ReportHeapSnapshotProgressEvent.cs b/ChromeDevTools/Protocol/HeapProfiler/ReportHeapSnapshotProgressEvent.cs new file mode 100644 index 0000000000000000000000000000000000000000..f6e56349b99f2118a5eef8a106108ac9c7ccf81f --- /dev/null +++ b/ChromeDevTools/Protocol/HeapProfiler/ReportHeapSnapshotProgressEvent.cs @@ -0,0 +1,21 @@ +using ChromeDevTools; + +namespace ChromeDevTools.Protocol.HeapProfiler +{ + [Event(ProtocolName.HeapProfiler.ReportHeapSnapshotProgress)] + public class ReportHeapSnapshotProgressEvent + { + /// <summary> + /// Gets or sets Done + /// </summary> + public long Done { get; set; } + /// <summary> + /// Gets or sets Total + /// </summary> + public long Total { get; set; } + /// <summary> + /// Gets or sets Finished + /// </summary> + public bool Finished { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/HeapProfiler/ResetProfilesEvent.cs b/ChromeDevTools/Protocol/HeapProfiler/ResetProfilesEvent.cs new file mode 100644 index 0000000000000000000000000000000000000000..aa1b91b54303277bdc8df8079b88c44a9b2b61a5 --- /dev/null +++ b/ChromeDevTools/Protocol/HeapProfiler/ResetProfilesEvent.cs @@ -0,0 +1,9 @@ +using ChromeDevTools; + +namespace ChromeDevTools.Protocol.HeapProfiler +{ + [Event(ProtocolName.HeapProfiler.ResetProfiles)] + public class ResetProfilesEvent + { + } +} diff --git a/ChromeDevTools/Protocol/HeapProfiler/StartTrackingHeapObjectsCommand.cs b/ChromeDevTools/Protocol/HeapProfiler/StartTrackingHeapObjectsCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..5dbac4bf700924e171a877eadf25bf72d0d4654a --- /dev/null +++ b/ChromeDevTools/Protocol/HeapProfiler/StartTrackingHeapObjectsCommand.cs @@ -0,0 +1,14 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.HeapProfiler +{ + [Command(ProtocolName.HeapProfiler.StartTrackingHeapObjects)] + public class StartTrackingHeapObjectsCommand + { + /// <summary> + /// Gets or sets TrackAllocations + /// </summary> + public bool TrackAllocations { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/HeapProfiler/StartTrackingHeapObjectsCommandResponse.cs b/ChromeDevTools/Protocol/HeapProfiler/StartTrackingHeapObjectsCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..188efbef8207b0ad993d573f58ed4c6072f7ffbf --- /dev/null +++ b/ChromeDevTools/Protocol/HeapProfiler/StartTrackingHeapObjectsCommandResponse.cs @@ -0,0 +1,10 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.HeapProfiler +{ + [CommandResponse(ProtocolName.HeapProfiler.StartTrackingHeapObjects)] + public class StartTrackingHeapObjectsCommandResponse + { + } +} diff --git a/ChromeDevTools/Protocol/HeapProfiler/StopTrackingHeapObjectsCommand.cs b/ChromeDevTools/Protocol/HeapProfiler/StopTrackingHeapObjectsCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..450fec744100c69a4ea19eef1133ed6615256d52 --- /dev/null +++ b/ChromeDevTools/Protocol/HeapProfiler/StopTrackingHeapObjectsCommand.cs @@ -0,0 +1,14 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.HeapProfiler +{ + [Command(ProtocolName.HeapProfiler.StopTrackingHeapObjects)] + public class StopTrackingHeapObjectsCommand + { + /// <summary> + /// Gets or sets If true 'reportHeapSnapshotProgress' events will be generated while snapshot is being taken when the tracking is stopped. + /// </summary> + public bool ReportProgress { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/HeapProfiler/StopTrackingHeapObjectsCommandResponse.cs b/ChromeDevTools/Protocol/HeapProfiler/StopTrackingHeapObjectsCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..66ddbaa66710c953050120390d9e32fbed0c7eec --- /dev/null +++ b/ChromeDevTools/Protocol/HeapProfiler/StopTrackingHeapObjectsCommandResponse.cs @@ -0,0 +1,10 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.HeapProfiler +{ + [CommandResponse(ProtocolName.HeapProfiler.StopTrackingHeapObjects)] + public class StopTrackingHeapObjectsCommandResponse + { + } +} diff --git a/ChromeDevTools/Protocol/HeapProfiler/TakeHeapSnapshotCommand.cs b/ChromeDevTools/Protocol/HeapProfiler/TakeHeapSnapshotCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..6a61d4782d143c07d07ec043a53251a74c291149 --- /dev/null +++ b/ChromeDevTools/Protocol/HeapProfiler/TakeHeapSnapshotCommand.cs @@ -0,0 +1,14 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.HeapProfiler +{ + [Command(ProtocolName.HeapProfiler.TakeHeapSnapshot)] + public class TakeHeapSnapshotCommand + { + /// <summary> + /// Gets or sets If true 'reportHeapSnapshotProgress' events will be generated while snapshot is being taken. + /// </summary> + public bool ReportProgress { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/HeapProfiler/TakeHeapSnapshotCommandResponse.cs b/ChromeDevTools/Protocol/HeapProfiler/TakeHeapSnapshotCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..8b27c6515ed3a8e549e25083517ef8e2202c28fb --- /dev/null +++ b/ChromeDevTools/Protocol/HeapProfiler/TakeHeapSnapshotCommandResponse.cs @@ -0,0 +1,10 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.HeapProfiler +{ + [CommandResponse(ProtocolName.HeapProfiler.TakeHeapSnapshot)] + public class TakeHeapSnapshotCommandResponse + { + } +} diff --git a/ChromeDevTools/Protocol/IndexedDB/ClearObjectStoreCommand.cs b/ChromeDevTools/Protocol/IndexedDB/ClearObjectStoreCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..3c94bd6695ea4129d97beede236d90204e351484 --- /dev/null +++ b/ChromeDevTools/Protocol/IndexedDB/ClearObjectStoreCommand.cs @@ -0,0 +1,25 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.IndexedDB +{ + /// <summary> + /// Clears all entries from an object store. + /// </summary> + [Command(ProtocolName.IndexedDB.ClearObjectStore)] + public class ClearObjectStoreCommand + { + /// <summary> + /// Gets or sets Security origin. + /// </summary> + public string SecurityOrigin { get; set; } + /// <summary> + /// Gets or sets Database name. + /// </summary> + public string DatabaseName { get; set; } + /// <summary> + /// Gets or sets Object store name. + /// </summary> + public string ObjectStoreName { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/IndexedDB/ClearObjectStoreCommandResponse.cs b/ChromeDevTools/Protocol/IndexedDB/ClearObjectStoreCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..dc33b174c91915ab75a024ceccf627922c62c9dd --- /dev/null +++ b/ChromeDevTools/Protocol/IndexedDB/ClearObjectStoreCommandResponse.cs @@ -0,0 +1,13 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.IndexedDB +{ + /// <summary> + /// Clears all entries from an object store. + /// </summary> + [CommandResponse(ProtocolName.IndexedDB.ClearObjectStore)] + public class ClearObjectStoreCommandResponse + { + } +} diff --git a/ChromeDevTools/Protocol/IndexedDB/DataEntry.cs b/ChromeDevTools/Protocol/IndexedDB/DataEntry.cs new file mode 100644 index 0000000000000000000000000000000000000000..92326a4b5daf1819b4e488bd42541b4ec134facf --- /dev/null +++ b/ChromeDevTools/Protocol/IndexedDB/DataEntry.cs @@ -0,0 +1,24 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.IndexedDB +{ + /// <summary> + /// Data entry. + /// </summary> + public class DataEntry + { + /// <summary> + /// Gets or sets JSON-stringified key object. + /// </summary> + public string Key { get; set; } + /// <summary> + /// Gets or sets JSON-stringified primary key object. + /// </summary> + public string PrimaryKey { get; set; } + /// <summary> + /// Gets or sets JSON-stringified value object. + /// </summary> + public string Value { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/IndexedDB/DatabaseWithObjectStores.cs b/ChromeDevTools/Protocol/IndexedDB/DatabaseWithObjectStores.cs new file mode 100644 index 0000000000000000000000000000000000000000..570b1be4260cb1cd5d01b3ed4391778e905fe0de --- /dev/null +++ b/ChromeDevTools/Protocol/IndexedDB/DatabaseWithObjectStores.cs @@ -0,0 +1,28 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.IndexedDB +{ + /// <summary> + /// Database with an array of object stores. + /// </summary> + public class DatabaseWithObjectStores + { + /// <summary> + /// Gets or sets Database name. + /// </summary> + public string Name { get; set; } + /// <summary> + /// Gets or sets Deprecated string database version. + /// </summary> + public string Version { get; set; } + /// <summary> + /// Gets or sets Integer database version. + /// </summary> + public long IntVersion { get; set; } + /// <summary> + /// Gets or sets Object stores in this database. + /// </summary> + public ObjectStore[] ObjectStores { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/IndexedDB/DisableCommand.cs b/ChromeDevTools/Protocol/IndexedDB/DisableCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..e6506e01ef53492dfa60f6fb648562ca91470292 --- /dev/null +++ b/ChromeDevTools/Protocol/IndexedDB/DisableCommand.cs @@ -0,0 +1,13 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.IndexedDB +{ + /// <summary> + /// Disables events from backend. + /// </summary> + [Command(ProtocolName.IndexedDB.Disable)] + public class DisableCommand + { + } +} diff --git a/ChromeDevTools/Protocol/IndexedDB/DisableCommandResponse.cs b/ChromeDevTools/Protocol/IndexedDB/DisableCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..56ae92675a58869744ecc78c29b183d9b6ad03fc --- /dev/null +++ b/ChromeDevTools/Protocol/IndexedDB/DisableCommandResponse.cs @@ -0,0 +1,13 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.IndexedDB +{ + /// <summary> + /// Disables events from backend. + /// </summary> + [CommandResponse(ProtocolName.IndexedDB.Disable)] + public class DisableCommandResponse + { + } +} diff --git a/ChromeDevTools/Protocol/IndexedDB/EnableCommand.cs b/ChromeDevTools/Protocol/IndexedDB/EnableCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..c75df9ff747a661d931d0d431bc69447eff71305 --- /dev/null +++ b/ChromeDevTools/Protocol/IndexedDB/EnableCommand.cs @@ -0,0 +1,13 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.IndexedDB +{ + /// <summary> + /// Enables events from backend. + /// </summary> + [Command(ProtocolName.IndexedDB.Enable)] + public class EnableCommand + { + } +} diff --git a/ChromeDevTools/Protocol/IndexedDB/EnableCommandResponse.cs b/ChromeDevTools/Protocol/IndexedDB/EnableCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..996b4635a80fadcfac2df08d6a5bde0c7022a5bd --- /dev/null +++ b/ChromeDevTools/Protocol/IndexedDB/EnableCommandResponse.cs @@ -0,0 +1,13 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.IndexedDB +{ + /// <summary> + /// Enables events from backend. + /// </summary> + [CommandResponse(ProtocolName.IndexedDB.Enable)] + public class EnableCommandResponse + { + } +} diff --git a/ChromeDevTools/Protocol/IndexedDB/Key.cs b/ChromeDevTools/Protocol/IndexedDB/Key.cs new file mode 100644 index 0000000000000000000000000000000000000000..f1a1070706836fccd42062e3dc095a25d9e8abd3 --- /dev/null +++ b/ChromeDevTools/Protocol/IndexedDB/Key.cs @@ -0,0 +1,32 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.IndexedDB +{ + /// <summary> + /// Key. + /// </summary> + public class Key + { + /// <summary> + /// Gets or sets Key type. + /// </summary> + public string Type { get; set; } + /// <summary> + /// Gets or sets Number value. + /// </summary> + public double Number { get; set; } + /// <summary> + /// Gets or sets String value. + /// </summary> + public string String { get; set; } + /// <summary> + /// Gets or sets Date value. + /// </summary> + public double Date { get; set; } + /// <summary> + /// Gets or sets Array value. + /// </summary> + public Key[] Array { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/IndexedDB/KeyPath.cs b/ChromeDevTools/Protocol/IndexedDB/KeyPath.cs new file mode 100644 index 0000000000000000000000000000000000000000..65091bc85726379aa80104bf22daad7c280cd8c0 --- /dev/null +++ b/ChromeDevTools/Protocol/IndexedDB/KeyPath.cs @@ -0,0 +1,24 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.IndexedDB +{ + /// <summary> + /// Key path. + /// </summary> + public class KeyPath + { + /// <summary> + /// Gets or sets Key path type. + /// </summary> + public string Type { get; set; } + /// <summary> + /// Gets or sets String value. + /// </summary> + public string String { get; set; } + /// <summary> + /// Gets or sets Array value. + /// </summary> + public string[] Array { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/IndexedDB/KeyRange.cs b/ChromeDevTools/Protocol/IndexedDB/KeyRange.cs new file mode 100644 index 0000000000000000000000000000000000000000..c1c1d032bbb7d62cd2881d530ab369fcf82a7b56 --- /dev/null +++ b/ChromeDevTools/Protocol/IndexedDB/KeyRange.cs @@ -0,0 +1,28 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.IndexedDB +{ + /// <summary> + /// Key range. + /// </summary> + public class KeyRange + { + /// <summary> + /// Gets or sets Lower bound. + /// </summary> + public Key Lower { get; set; } + /// <summary> + /// Gets or sets Upper bound. + /// </summary> + public Key Upper { get; set; } + /// <summary> + /// Gets or sets If true lower bound is open. + /// </summary> + public bool LowerOpen { get; set; } + /// <summary> + /// Gets or sets If true upper bound is open. + /// </summary> + public bool UpperOpen { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/IndexedDB/ObjectStore.cs b/ChromeDevTools/Protocol/IndexedDB/ObjectStore.cs new file mode 100644 index 0000000000000000000000000000000000000000..a002ef03accf4bc88e40f15adbfa18d72aebc461 --- /dev/null +++ b/ChromeDevTools/Protocol/IndexedDB/ObjectStore.cs @@ -0,0 +1,28 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.IndexedDB +{ + /// <summary> + /// Object store. + /// </summary> + public class ObjectStore + { + /// <summary> + /// Gets or sets Object store name. + /// </summary> + public string Name { get; set; } + /// <summary> + /// Gets or sets Object store key path. + /// </summary> + public KeyPath KeyPath { get; set; } + /// <summary> + /// Gets or sets If true, object store has auto increment flag set. + /// </summary> + public bool AutoIncrement { get; set; } + /// <summary> + /// Gets or sets Indexes in this object store. + /// </summary> + public ObjectStoreIndex[] Indexes { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/IndexedDB/ObjectStoreIndex.cs b/ChromeDevTools/Protocol/IndexedDB/ObjectStoreIndex.cs new file mode 100644 index 0000000000000000000000000000000000000000..f0f9abfbf0ebb9a19bd4034b19adfc9d6b0a093a --- /dev/null +++ b/ChromeDevTools/Protocol/IndexedDB/ObjectStoreIndex.cs @@ -0,0 +1,28 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.IndexedDB +{ + /// <summary> + /// Object store index. + /// </summary> + public class ObjectStoreIndex + { + /// <summary> + /// Gets or sets Index name. + /// </summary> + public string Name { get; set; } + /// <summary> + /// Gets or sets Index key path. + /// </summary> + public KeyPath KeyPath { get; set; } + /// <summary> + /// Gets or sets If true, index is unique. + /// </summary> + public bool Unique { get; set; } + /// <summary> + /// Gets or sets If true, index allows multiple entries for a key. + /// </summary> + public bool MultiEntry { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/IndexedDB/RequestDataCommand.cs b/ChromeDevTools/Protocol/IndexedDB/RequestDataCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..f4e52bf77c1ff57fe3e5e022b0b3fc2815c4de42 --- /dev/null +++ b/ChromeDevTools/Protocol/IndexedDB/RequestDataCommand.cs @@ -0,0 +1,41 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.IndexedDB +{ + /// <summary> + /// Requests data from object store or index. + /// </summary> + [Command(ProtocolName.IndexedDB.RequestData)] + public class RequestDataCommand + { + /// <summary> + /// Gets or sets Security origin. + /// </summary> + public string SecurityOrigin { get; set; } + /// <summary> + /// Gets or sets Database name. + /// </summary> + public string DatabaseName { get; set; } + /// <summary> + /// Gets or sets Object store name. + /// </summary> + public string ObjectStoreName { get; set; } + /// <summary> + /// Gets or sets Index name, empty string for object store data requests. + /// </summary> + public string IndexName { get; set; } + /// <summary> + /// Gets or sets Number of records to skip. + /// </summary> + public long SkipCount { get; set; } + /// <summary> + /// Gets or sets Number of records to fetch. + /// </summary> + public long PageSize { get; set; } + /// <summary> + /// Gets or sets Key range. + /// </summary> + public KeyRange KeyRange { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/IndexedDB/RequestDataCommandResponse.cs b/ChromeDevTools/Protocol/IndexedDB/RequestDataCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..c202e2eb97932adc3d903b1635d8bb57435553dd --- /dev/null +++ b/ChromeDevTools/Protocol/IndexedDB/RequestDataCommandResponse.cs @@ -0,0 +1,21 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.IndexedDB +{ + /// <summary> + /// Requests data from object store or index. + /// </summary> + [CommandResponse(ProtocolName.IndexedDB.RequestData)] + public class RequestDataCommandResponse + { + /// <summary> + /// Gets or sets Array of object store data entries. + /// </summary> + public DataEntry[] ObjectStoreDataEntries { get; set; } + /// <summary> + /// Gets or sets If true, there are more entries to fetch in the given range. + /// </summary> + public bool HasMore { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/IndexedDB/RequestDatabaseCommand.cs b/ChromeDevTools/Protocol/IndexedDB/RequestDatabaseCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..c1c8c6ff7c4c39ef241e6126fc80264d3052a659 --- /dev/null +++ b/ChromeDevTools/Protocol/IndexedDB/RequestDatabaseCommand.cs @@ -0,0 +1,21 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.IndexedDB +{ + /// <summary> + /// Requests database with given name in given frame. + /// </summary> + [Command(ProtocolName.IndexedDB.RequestDatabase)] + public class RequestDatabaseCommand + { + /// <summary> + /// Gets or sets Security origin. + /// </summary> + public string SecurityOrigin { get; set; } + /// <summary> + /// Gets or sets Database name. + /// </summary> + public string DatabaseName { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/IndexedDB/RequestDatabaseCommandResponse.cs b/ChromeDevTools/Protocol/IndexedDB/RequestDatabaseCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..0f05d249ff6f0fb598531c885afc243c5f7ba9ae --- /dev/null +++ b/ChromeDevTools/Protocol/IndexedDB/RequestDatabaseCommandResponse.cs @@ -0,0 +1,17 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.IndexedDB +{ + /// <summary> + /// Requests database with given name in given frame. + /// </summary> + [CommandResponse(ProtocolName.IndexedDB.RequestDatabase)] + public class RequestDatabaseCommandResponse + { + /// <summary> + /// Gets or sets Database with an array of object stores. + /// </summary> + public DatabaseWithObjectStores DatabaseWithObjectStores { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/IndexedDB/RequestDatabaseNamesCommand.cs b/ChromeDevTools/Protocol/IndexedDB/RequestDatabaseNamesCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..fe2a1ecb11f282a97badbd824cc74f32b8797fdf --- /dev/null +++ b/ChromeDevTools/Protocol/IndexedDB/RequestDatabaseNamesCommand.cs @@ -0,0 +1,17 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.IndexedDB +{ + /// <summary> + /// Requests database names for given security origin. + /// </summary> + [Command(ProtocolName.IndexedDB.RequestDatabaseNames)] + public class RequestDatabaseNamesCommand + { + /// <summary> + /// Gets or sets Security origin. + /// </summary> + public string SecurityOrigin { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/IndexedDB/RequestDatabaseNamesCommandResponse.cs b/ChromeDevTools/Protocol/IndexedDB/RequestDatabaseNamesCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..616ac160f4db124e5531801fa8406e60404a3a2b --- /dev/null +++ b/ChromeDevTools/Protocol/IndexedDB/RequestDatabaseNamesCommandResponse.cs @@ -0,0 +1,17 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.IndexedDB +{ + /// <summary> + /// Requests database names for given security origin. + /// </summary> + [CommandResponse(ProtocolName.IndexedDB.RequestDatabaseNames)] + public class RequestDatabaseNamesCommandResponse + { + /// <summary> + /// Gets or sets Database names for origin. + /// </summary> + public string[] DatabaseNames { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/Input/DispatchKeyEventCommand.cs b/ChromeDevTools/Protocol/Input/DispatchKeyEventCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..b48827be0126702adb2e46510c15419d76a0cbd9 --- /dev/null +++ b/ChromeDevTools/Protocol/Input/DispatchKeyEventCommand.cs @@ -0,0 +1,61 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Input +{ + /// <summary> + /// Dispatches a key event to the page. + /// </summary> + [Command(ProtocolName.Input.DispatchKeyEvent)] + public class DispatchKeyEventCommand + { + /// <summary> + /// Gets or sets Type of the key event. + /// </summary> + public string Type { get; set; } + /// <summary> + /// Gets or sets Bit field representing pressed modifier keys. Alt=1, Ctrl=2, Meta/Command=4, Shift=8 (default: 0). + /// </summary> + public long Modifiers { get; set; } + /// <summary> + /// Gets or sets Time at which the event occurred. Measured in UTC time in seconds since January 1, 1970 (default: current time). + /// </summary> + public double Timestamp { get; set; } + /// <summary> + /// Gets or sets Text as generated by processing a virtual key code with a keyboard layout. Not needed for for <code>keyUp</code> and <code>rawKeyDown</code> events (default: "") + /// </summary> + public string Text { get; set; } + /// <summary> + /// Gets or sets Text that would have been generated by the keyboard if no modifiers were pressed (except for shift). Useful for shortcut (accelerator) key handling (default: ""). + /// </summary> + public string UnmodifiedText { get; set; } + /// <summary> + /// Gets or sets Unique key identifier (e.g., 'U+0041') (default: ""). + /// </summary> + public string KeyIdentifier { get; set; } + /// <summary> + /// Gets or sets Unique DOM defined string value for each physical key (e.g., 'KeyA') (default: ""). + /// </summary> + public string Code { get; set; } + /// <summary> + /// Gets or sets Windows virtual key code (default: 0). + /// </summary> + public long WindowsVirtualKeyCode { get; set; } + /// <summary> + /// Gets or sets Native virtual key code (default: 0). + /// </summary> + public long NativeVirtualKeyCode { get; set; } + /// <summary> + /// Gets or sets Whether the event was generated from auto repeat (default: false). + /// </summary> + public bool AutoRepeat { get; set; } + /// <summary> + /// Gets or sets Whether the event was generated from the keypad (default: false). + /// </summary> + public bool IsKeypad { get; set; } + /// <summary> + /// Gets or sets Whether the event was a system key event (default: false). + /// </summary> + public bool IsSystemKey { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/Input/DispatchKeyEventCommandResponse.cs b/ChromeDevTools/Protocol/Input/DispatchKeyEventCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..cf5ea8e79151254ca27cc1ca4e86784b307abc07 --- /dev/null +++ b/ChromeDevTools/Protocol/Input/DispatchKeyEventCommandResponse.cs @@ -0,0 +1,13 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Input +{ + /// <summary> + /// Dispatches a key event to the page. + /// </summary> + [CommandResponse(ProtocolName.Input.DispatchKeyEvent)] + public class DispatchKeyEventCommandResponse + { + } +} diff --git a/ChromeDevTools/Protocol/Input/DispatchMouseEventCommand.cs b/ChromeDevTools/Protocol/Input/DispatchMouseEventCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..4d31ca8cac40a539fc3e47bb057a01af8a13dc3a --- /dev/null +++ b/ChromeDevTools/Protocol/Input/DispatchMouseEventCommand.cs @@ -0,0 +1,41 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Input +{ + /// <summary> + /// Dispatches a mouse event to the page. + /// </summary> + [Command(ProtocolName.Input.DispatchMouseEvent)] + public class DispatchMouseEventCommand + { + /// <summary> + /// Gets or sets Type of the mouse event. + /// </summary> + public string Type { get; set; } + /// <summary> + /// Gets or sets X coordinate of the event relative to the main frame's viewport. + /// </summary> + public long X { get; set; } + /// <summary> + /// Gets or sets Y coordinate of the event relative to the main frame's viewport. 0 refers to the top of the viewport and Y increases as it proceeds towards the bottom of the viewport. + /// </summary> + public long Y { get; set; } + /// <summary> + /// Gets or sets Bit field representing pressed modifier keys. Alt=1, Ctrl=2, Meta/Command=4, Shift=8 (default: 0). + /// </summary> + public long Modifiers { get; set; } + /// <summary> + /// Gets or sets Time at which the event occurred. Measured in UTC time in seconds since January 1, 1970 (default: current time). + /// </summary> + public double Timestamp { get; set; } + /// <summary> + /// Gets or sets Mouse button (default: "none"). + /// </summary> + public string Button { get; set; } + /// <summary> + /// Gets or sets Number of times the mouse button was clicked (default: 0). + /// </summary> + public long ClickCount { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/Input/DispatchMouseEventCommandResponse.cs b/ChromeDevTools/Protocol/Input/DispatchMouseEventCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..7129ff4f1ed5f15eda9c4bb79e00ffac5cfda93f --- /dev/null +++ b/ChromeDevTools/Protocol/Input/DispatchMouseEventCommandResponse.cs @@ -0,0 +1,13 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Input +{ + /// <summary> + /// Dispatches a mouse event to the page. + /// </summary> + [CommandResponse(ProtocolName.Input.DispatchMouseEvent)] + public class DispatchMouseEventCommandResponse + { + } +} diff --git a/ChromeDevTools/Protocol/Input/DispatchTouchEventCommand.cs b/ChromeDevTools/Protocol/Input/DispatchTouchEventCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..14724ead12edd3f11586d24fa5f1d3f20b698a8a --- /dev/null +++ b/ChromeDevTools/Protocol/Input/DispatchTouchEventCommand.cs @@ -0,0 +1,29 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Input +{ + /// <summary> + /// Dispatches a touch event to the page. + /// </summary> + [Command(ProtocolName.Input.DispatchTouchEvent)] + public class DispatchTouchEventCommand + { + /// <summary> + /// Gets or sets Type of the touch event. + /// </summary> + public string Type { get; set; } + /// <summary> + /// Gets or sets Touch points. + /// </summary> + public TouchPoint[] TouchPoints { get; set; } + /// <summary> + /// Gets or sets Bit field representing pressed modifier keys. Alt=1, Ctrl=2, Meta/Command=4, Shift=8 (default: 0). + /// </summary> + public long Modifiers { get; set; } + /// <summary> + /// Gets or sets Time at which the event occurred. Measured in UTC time in seconds since January 1, 1970 (default: current time). + /// </summary> + public double Timestamp { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/Input/DispatchTouchEventCommandResponse.cs b/ChromeDevTools/Protocol/Input/DispatchTouchEventCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..e42f577eb2b74480baf8e3537fb4cfc806ab9280 --- /dev/null +++ b/ChromeDevTools/Protocol/Input/DispatchTouchEventCommandResponse.cs @@ -0,0 +1,13 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Input +{ + /// <summary> + /// Dispatches a touch event to the page. + /// </summary> + [CommandResponse(ProtocolName.Input.DispatchTouchEvent)] + public class DispatchTouchEventCommandResponse + { + } +} diff --git a/ChromeDevTools/Protocol/Input/EmulateTouchFromMouseEventCommand.cs b/ChromeDevTools/Protocol/Input/EmulateTouchFromMouseEventCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..08b697d03e7807e44fc461a102d655c55e124acc --- /dev/null +++ b/ChromeDevTools/Protocol/Input/EmulateTouchFromMouseEventCommand.cs @@ -0,0 +1,49 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Input +{ + /// <summary> + /// Emulates touch event from the mouse event parameters. + /// </summary> + [Command(ProtocolName.Input.EmulateTouchFromMouseEvent)] + public class EmulateTouchFromMouseEventCommand + { + /// <summary> + /// Gets or sets Type of the mouse event. + /// </summary> + public string Type { get; set; } + /// <summary> + /// Gets or sets X coordinate of the mouse pointer in DIP. + /// </summary> + public long X { get; set; } + /// <summary> + /// Gets or sets Y coordinate of the mouse pointer in DIP. + /// </summary> + public long Y { get; set; } + /// <summary> + /// Gets or sets Time at which the event occurred. Measured in UTC time in seconds since January 1, 1970. + /// </summary> + public double Timestamp { get; set; } + /// <summary> + /// Gets or sets Mouse button. + /// </summary> + public string Button { get; set; } + /// <summary> + /// Gets or sets X delta in DIP for mouse wheel event (default: 0). + /// </summary> + public double DeltaX { get; set; } + /// <summary> + /// Gets or sets Y delta in DIP for mouse wheel event (default: 0). + /// </summary> + public double DeltaY { get; set; } + /// <summary> + /// Gets or sets Bit field representing pressed modifier keys. Alt=1, Ctrl=2, Meta/Command=4, Shift=8 (default: 0). + /// </summary> + public long Modifiers { get; set; } + /// <summary> + /// Gets or sets Number of times the mouse button was clicked (default: 0). + /// </summary> + public long ClickCount { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/Input/EmulateTouchFromMouseEventCommandResponse.cs b/ChromeDevTools/Protocol/Input/EmulateTouchFromMouseEventCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..5959ac98ea28d21bd81c9fa175329f3e11a6aca9 --- /dev/null +++ b/ChromeDevTools/Protocol/Input/EmulateTouchFromMouseEventCommandResponse.cs @@ -0,0 +1,13 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Input +{ + /// <summary> + /// Emulates touch event from the mouse event parameters. + /// </summary> + [CommandResponse(ProtocolName.Input.EmulateTouchFromMouseEvent)] + public class EmulateTouchFromMouseEventCommandResponse + { + } +} diff --git a/ChromeDevTools/Protocol/Input/GestureSourceType.cs b/ChromeDevTools/Protocol/Input/GestureSourceType.cs new file mode 100644 index 0000000000000000000000000000000000000000..f12f6c710eb5d9962457df850e175a7b74153e00 --- /dev/null +++ b/ChromeDevTools/Protocol/Input/GestureSourceType.cs @@ -0,0 +1,13 @@ +using ChromeDevTools; + +namespace ChromeDevTools.Protocol.Input{ + /// <summary> + /// + /// </summary> + public enum GestureSourceType + { + Default, + Touch, + Mouse, + } +} diff --git a/ChromeDevTools/Protocol/Input/SynthesizePinchGestureCommand.cs b/ChromeDevTools/Protocol/Input/SynthesizePinchGestureCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..5e92d88e17e1750b5bebec1858d2b3530e734d3c --- /dev/null +++ b/ChromeDevTools/Protocol/Input/SynthesizePinchGestureCommand.cs @@ -0,0 +1,33 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Input +{ + /// <summary> + /// Synthesizes a pinch gesture over a time period by issuing appropriate touch events. + /// </summary> + [Command(ProtocolName.Input.SynthesizePinchGesture)] + public class SynthesizePinchGestureCommand + { + /// <summary> + /// Gets or sets X coordinate of the start of the gesture in CSS pixels. + /// </summary> + public long X { get; set; } + /// <summary> + /// Gets or sets Y coordinate of the start of the gesture in CSS pixels. + /// </summary> + public long Y { get; set; } + /// <summary> + /// Gets or sets Relative scale factor after zooming (>1.0 zooms in, <1.0 zooms out). + /// </summary> + public double ScaleFactor { get; set; } + /// <summary> + /// Gets or sets Relative pointer speed in pixels per second (default: 800). + /// </summary> + public long RelativeSpeed { get; set; } + /// <summary> + /// Gets or sets Which type of input events to be generated (default: 'default', which queries the platform for the preferred input type). + /// </summary> + public GestureSourceType GestureSourceType { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/Input/SynthesizePinchGestureCommandResponse.cs b/ChromeDevTools/Protocol/Input/SynthesizePinchGestureCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..e327e80e79c9a1adcc7fe425ff9ab5ef657a3ab8 --- /dev/null +++ b/ChromeDevTools/Protocol/Input/SynthesizePinchGestureCommandResponse.cs @@ -0,0 +1,13 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Input +{ + /// <summary> + /// Synthesizes a pinch gesture over a time period by issuing appropriate touch events. + /// </summary> + [CommandResponse(ProtocolName.Input.SynthesizePinchGesture)] + public class SynthesizePinchGestureCommandResponse + { + } +} diff --git a/ChromeDevTools/Protocol/Input/SynthesizeScrollGestureCommand.cs b/ChromeDevTools/Protocol/Input/SynthesizeScrollGestureCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..a4fcee9f80754fd53ca776e78749a3f67b297fd3 --- /dev/null +++ b/ChromeDevTools/Protocol/Input/SynthesizeScrollGestureCommand.cs @@ -0,0 +1,49 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Input +{ + /// <summary> + /// Synthesizes a scroll gesture over a time period by issuing appropriate touch events. + /// </summary> + [Command(ProtocolName.Input.SynthesizeScrollGesture)] + public class SynthesizeScrollGestureCommand + { + /// <summary> + /// Gets or sets X coordinate of the start of the gesture in CSS pixels. + /// </summary> + public long X { get; set; } + /// <summary> + /// Gets or sets Y coordinate of the start of the gesture in CSS pixels. + /// </summary> + public long Y { get; set; } + /// <summary> + /// Gets or sets The distance to scroll along the X axis (positive to scroll left). + /// </summary> + public long XDistance { get; set; } + /// <summary> + /// Gets or sets The distance to scroll along the Y axis (positive to scroll up). + /// </summary> + public long YDistance { get; set; } + /// <summary> + /// Gets or sets The number of additional pixels to scroll back along the X axis, in addition to the given distance. + /// </summary> + public long XOverscroll { get; set; } + /// <summary> + /// Gets or sets The number of additional pixels to scroll back along the Y axis, in addition to the given distance. + /// </summary> + public long YOverscroll { get; set; } + /// <summary> + /// Gets or sets Prevent fling (default: true). + /// </summary> + public bool PreventFling { get; set; } + /// <summary> + /// Gets or sets Swipe speed in pixels per second (default: 800). + /// </summary> + public long Speed { get; set; } + /// <summary> + /// Gets or sets Which type of input events to be generated (default: 'default', which queries the platform for the preferred input type). + /// </summary> + public GestureSourceType GestureSourceType { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/Input/SynthesizeScrollGestureCommandResponse.cs b/ChromeDevTools/Protocol/Input/SynthesizeScrollGestureCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..fb4d6dc23caa4776eefc3eb9d1c62c128aae95fe --- /dev/null +++ b/ChromeDevTools/Protocol/Input/SynthesizeScrollGestureCommandResponse.cs @@ -0,0 +1,13 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Input +{ + /// <summary> + /// Synthesizes a scroll gesture over a time period by issuing appropriate touch events. + /// </summary> + [CommandResponse(ProtocolName.Input.SynthesizeScrollGesture)] + public class SynthesizeScrollGestureCommandResponse + { + } +} diff --git a/ChromeDevTools/Protocol/Input/SynthesizeTapGestureCommand.cs b/ChromeDevTools/Protocol/Input/SynthesizeTapGestureCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..4c3aeca90a3fed96aadd99d7a837773f85ad3bfb --- /dev/null +++ b/ChromeDevTools/Protocol/Input/SynthesizeTapGestureCommand.cs @@ -0,0 +1,33 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Input +{ + /// <summary> + /// Synthesizes a tap gesture over a time period by issuing appropriate touch events. + /// </summary> + [Command(ProtocolName.Input.SynthesizeTapGesture)] + public class SynthesizeTapGestureCommand + { + /// <summary> + /// Gets or sets X coordinate of the start of the gesture in CSS pixels. + /// </summary> + public long X { get; set; } + /// <summary> + /// Gets or sets Y coordinate of the start of the gesture in CSS pixels. + /// </summary> + public long Y { get; set; } + /// <summary> + /// Gets or sets Duration between touchdown and touchup events in ms (default: 50). + /// </summary> + public long Duration { get; set; } + /// <summary> + /// Gets or sets Number of times to perform the tap (e.g. 2 for double tap, default: 1). + /// </summary> + public long TapCount { get; set; } + /// <summary> + /// Gets or sets Which type of input events to be generated (default: 'default', which queries the platform for the preferred input type). + /// </summary> + public GestureSourceType GestureSourceType { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/Input/SynthesizeTapGestureCommandResponse.cs b/ChromeDevTools/Protocol/Input/SynthesizeTapGestureCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..08747785404de6ad90e4780b2ed7554ac869af2c --- /dev/null +++ b/ChromeDevTools/Protocol/Input/SynthesizeTapGestureCommandResponse.cs @@ -0,0 +1,13 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Input +{ + /// <summary> + /// Synthesizes a tap gesture over a time period by issuing appropriate touch events. + /// </summary> + [CommandResponse(ProtocolName.Input.SynthesizeTapGesture)] + public class SynthesizeTapGestureCommandResponse + { + } +} diff --git a/ChromeDevTools/Protocol/Input/TouchPoint.cs b/ChromeDevTools/Protocol/Input/TouchPoint.cs new file mode 100644 index 0000000000000000000000000000000000000000..913a8730015cbe3f5d7813c1a2a583b887f5e927 --- /dev/null +++ b/ChromeDevTools/Protocol/Input/TouchPoint.cs @@ -0,0 +1,44 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Input +{ + /// <summary> + /// + /// </summary> + public class TouchPoint + { + /// <summary> + /// Gets or sets State of the touch point. + /// </summary> + public string State { get; set; } + /// <summary> + /// Gets or sets X coordinate of the event relative to the main frame's viewport. + /// </summary> + public long X { get; set; } + /// <summary> + /// Gets or sets Y coordinate of the event relative to the main frame's viewport. 0 refers to the top of the viewport and Y increases as it proceeds towards the bottom of the viewport. + /// </summary> + public long Y { get; set; } + /// <summary> + /// Gets or sets X radius of the touch area (default: 1). + /// </summary> + public long RadiusX { get; set; } + /// <summary> + /// Gets or sets Y radius of the touch area (default: 1). + /// </summary> + public long RadiusY { get; set; } + /// <summary> + /// Gets or sets Rotation angle (default: 0.0). + /// </summary> + public double RotationAngle { get; set; } + /// <summary> + /// Gets or sets Force (default: 1.0). + /// </summary> + public double Force { get; set; } + /// <summary> + /// Gets or sets Identifier used to track touch sources between events, must be unique within an event. + /// </summary> + public double Id { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/Inspector/DetachedEvent.cs b/ChromeDevTools/Protocol/Inspector/DetachedEvent.cs new file mode 100644 index 0000000000000000000000000000000000000000..a6bc3d6c9c5f1beb78c241e319a4965ec34a5d16 --- /dev/null +++ b/ChromeDevTools/Protocol/Inspector/DetachedEvent.cs @@ -0,0 +1,16 @@ +using ChromeDevTools; + +namespace ChromeDevTools.Protocol.Inspector +{ + /// <summary> + /// Fired when remote debugging connection is about to be terminated. Contains detach reason. + /// </summary> + [Event(ProtocolName.Inspector.Detached)] + public class DetachedEvent + { + /// <summary> + /// Gets or sets The reason why connection has been terminated. + /// </summary> + public string Reason { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/Inspector/DisableCommand.cs b/ChromeDevTools/Protocol/Inspector/DisableCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..9862e00d5e4448e1995c373cafbce8d3d8c4e48c --- /dev/null +++ b/ChromeDevTools/Protocol/Inspector/DisableCommand.cs @@ -0,0 +1,13 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Inspector +{ + /// <summary> + /// Disables inspector domain notifications. + /// </summary> + [Command(ProtocolName.Inspector.Disable)] + public class DisableCommand + { + } +} diff --git a/ChromeDevTools/Protocol/Inspector/DisableCommandResponse.cs b/ChromeDevTools/Protocol/Inspector/DisableCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..58a685211b967a349a6201daf368264518c240d1 --- /dev/null +++ b/ChromeDevTools/Protocol/Inspector/DisableCommandResponse.cs @@ -0,0 +1,13 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Inspector +{ + /// <summary> + /// Disables inspector domain notifications. + /// </summary> + [CommandResponse(ProtocolName.Inspector.Disable)] + public class DisableCommandResponse + { + } +} diff --git a/ChromeDevTools/Protocol/Inspector/EnableCommand.cs b/ChromeDevTools/Protocol/Inspector/EnableCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..84220f5d2c2a98dfa1aa40fb5741a879c2d500e6 --- /dev/null +++ b/ChromeDevTools/Protocol/Inspector/EnableCommand.cs @@ -0,0 +1,13 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Inspector +{ + /// <summary> + /// Enables inspector domain notifications. + /// </summary> + [Command(ProtocolName.Inspector.Enable)] + public class EnableCommand + { + } +} diff --git a/ChromeDevTools/Protocol/Inspector/EnableCommandResponse.cs b/ChromeDevTools/Protocol/Inspector/EnableCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..372e41d984284f40a884b10c5979e001ee185b50 --- /dev/null +++ b/ChromeDevTools/Protocol/Inspector/EnableCommandResponse.cs @@ -0,0 +1,13 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Inspector +{ + /// <summary> + /// Enables inspector domain notifications. + /// </summary> + [CommandResponse(ProtocolName.Inspector.Enable)] + public class EnableCommandResponse + { + } +} diff --git a/ChromeDevTools/Protocol/Inspector/EvaluateForTestInFrontendEvent.cs b/ChromeDevTools/Protocol/Inspector/EvaluateForTestInFrontendEvent.cs new file mode 100644 index 0000000000000000000000000000000000000000..4f4cf0f9fe656912cf39715689ac0235d4f2c0d3 --- /dev/null +++ b/ChromeDevTools/Protocol/Inspector/EvaluateForTestInFrontendEvent.cs @@ -0,0 +1,17 @@ +using ChromeDevTools; + +namespace ChromeDevTools.Protocol.Inspector +{ + [Event(ProtocolName.Inspector.EvaluateForTestInFrontend)] + public class EvaluateForTestInFrontendEvent + { + /// <summary> + /// Gets or sets TestCallId + /// </summary> + public long TestCallId { get; set; } + /// <summary> + /// Gets or sets Script + /// </summary> + public string Script { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/Inspector/InspectEvent.cs b/ChromeDevTools/Protocol/Inspector/InspectEvent.cs new file mode 100644 index 0000000000000000000000000000000000000000..938c81103d66eabc699c142049a566522094c494 --- /dev/null +++ b/ChromeDevTools/Protocol/Inspector/InspectEvent.cs @@ -0,0 +1,17 @@ +using ChromeDevTools; + +namespace ChromeDevTools.Protocol.Inspector +{ + [Event(ProtocolName.Inspector.Inspect)] + public class InspectEvent + { + /// <summary> + /// Gets or sets Object + /// </summary> + public Runtime.RemoteObject Object { get; set; } + /// <summary> + /// Gets or sets Hints + /// </summary> + public object Hints { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/Inspector/TargetCrashedEvent.cs b/ChromeDevTools/Protocol/Inspector/TargetCrashedEvent.cs new file mode 100644 index 0000000000000000000000000000000000000000..5f5ec373536c38788436987e3f65dd3bf82f2a4f --- /dev/null +++ b/ChromeDevTools/Protocol/Inspector/TargetCrashedEvent.cs @@ -0,0 +1,12 @@ +using ChromeDevTools; + +namespace ChromeDevTools.Protocol.Inspector +{ + /// <summary> + /// Fired when debugging target has crashed + /// </summary> + [Event(ProtocolName.Inspector.TargetCrashed)] + public class TargetCrashedEvent + { + } +} diff --git a/ChromeDevTools/Protocol/LayerTree/CompositingReasonsCommand.cs b/ChromeDevTools/Protocol/LayerTree/CompositingReasonsCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..775db801440e9b42933767abe0867f211ee29167 --- /dev/null +++ b/ChromeDevTools/Protocol/LayerTree/CompositingReasonsCommand.cs @@ -0,0 +1,17 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.LayerTree +{ + /// <summary> + /// Provides the reasons why the given layer was composited. + /// </summary> + [Command(ProtocolName.LayerTree.CompositingReasons)] + public class CompositingReasonsCommand + { + /// <summary> + /// Gets or sets The id of the layer for which we want to get the reasons it was composited. + /// </summary> + public string LayerId { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/LayerTree/CompositingReasonsCommandResponse.cs b/ChromeDevTools/Protocol/LayerTree/CompositingReasonsCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..264fcc65bce491bd6dc7775151ea78fd2c5c04fb --- /dev/null +++ b/ChromeDevTools/Protocol/LayerTree/CompositingReasonsCommandResponse.cs @@ -0,0 +1,17 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.LayerTree +{ + /// <summary> + /// Provides the reasons why the given layer was composited. + /// </summary> + [CommandResponse(ProtocolName.LayerTree.CompositingReasons)] + public class CompositingReasonsCommandResponse + { + /// <summary> + /// Gets or sets A list of strings specifying reasons for the given layer to become composited. + /// </summary> + public string[] CompositingReasons { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/LayerTree/DisableCommand.cs b/ChromeDevTools/Protocol/LayerTree/DisableCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..5022cfe0f095a6f88312e0e6e49e177a7cc26089 --- /dev/null +++ b/ChromeDevTools/Protocol/LayerTree/DisableCommand.cs @@ -0,0 +1,13 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.LayerTree +{ + /// <summary> + /// Disables compositing tree inspection. + /// </summary> + [Command(ProtocolName.LayerTree.Disable)] + public class DisableCommand + { + } +} diff --git a/ChromeDevTools/Protocol/LayerTree/DisableCommandResponse.cs b/ChromeDevTools/Protocol/LayerTree/DisableCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..a9ca6a3c5e7264b6dba220a0e26223b76141dbb8 --- /dev/null +++ b/ChromeDevTools/Protocol/LayerTree/DisableCommandResponse.cs @@ -0,0 +1,13 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.LayerTree +{ + /// <summary> + /// Disables compositing tree inspection. + /// </summary> + [CommandResponse(ProtocolName.LayerTree.Disable)] + public class DisableCommandResponse + { + } +} diff --git a/ChromeDevTools/Protocol/LayerTree/EnableCommand.cs b/ChromeDevTools/Protocol/LayerTree/EnableCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..9c697113bb4e9dfe56da3fb82af252cd19b0d4d8 --- /dev/null +++ b/ChromeDevTools/Protocol/LayerTree/EnableCommand.cs @@ -0,0 +1,13 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.LayerTree +{ + /// <summary> + /// Enables compositing tree inspection. + /// </summary> + [Command(ProtocolName.LayerTree.Enable)] + public class EnableCommand + { + } +} diff --git a/ChromeDevTools/Protocol/LayerTree/EnableCommandResponse.cs b/ChromeDevTools/Protocol/LayerTree/EnableCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..5c0e544a240e95f6eabdf9b43e97a52b4a242803 --- /dev/null +++ b/ChromeDevTools/Protocol/LayerTree/EnableCommandResponse.cs @@ -0,0 +1,13 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.LayerTree +{ + /// <summary> + /// Enables compositing tree inspection. + /// </summary> + [CommandResponse(ProtocolName.LayerTree.Enable)] + public class EnableCommandResponse + { + } +} diff --git a/ChromeDevTools/Protocol/LayerTree/Layer.cs b/ChromeDevTools/Protocol/LayerTree/Layer.cs new file mode 100644 index 0000000000000000000000000000000000000000..7fc48f59a02a25df3d76f5f3eb91101ed151c03b --- /dev/null +++ b/ChromeDevTools/Protocol/LayerTree/Layer.cs @@ -0,0 +1,72 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.LayerTree +{ + /// <summary> + /// Information about a compositing layer. + /// </summary> + public class Layer + { + /// <summary> + /// Gets or sets The unique id for this layer. + /// </summary> + public string LayerId { get; set; } + /// <summary> + /// Gets or sets The id of parent (not present for root). + /// </summary> + public string ParentLayerId { get; set; } + /// <summary> + /// Gets or sets The backend id for the node associated with this layer. + /// </summary> + public long BackendNodeId { get; set; } + /// <summary> + /// Gets or sets Offset from parent layer, X coordinate. + /// </summary> + public double OffsetX { get; set; } + /// <summary> + /// Gets or sets Offset from parent layer, Y coordinate. + /// </summary> + public double OffsetY { get; set; } + /// <summary> + /// Gets or sets Layer width. + /// </summary> + public double Width { get; set; } + /// <summary> + /// Gets or sets Layer height. + /// </summary> + public double Height { get; set; } + /// <summary> + /// Gets or sets Transformation matrix for layer, default is identity matrix + /// </summary> + public double[] Transform { get; set; } + /// <summary> + /// Gets or sets Transform anchor point X, absent if no transform specified + /// </summary> + public double AnchorX { get; set; } + /// <summary> + /// Gets or sets Transform anchor point Y, absent if no transform specified + /// </summary> + public double AnchorY { get; set; } + /// <summary> + /// Gets or sets Transform anchor point Z, absent if no transform specified + /// </summary> + public double AnchorZ { get; set; } + /// <summary> + /// Gets or sets Indicates how many time this layer has painted. + /// </summary> + public long PaintCount { get; set; } + /// <summary> + /// Gets or sets Indicates whether this layer hosts any content, rather than being used for transform/scrolling purposes only. + /// </summary> + public bool DrawsContent { get; set; } + /// <summary> + /// Gets or sets Set if layer is not visible. + /// </summary> + public bool Invisible { get; set; } + /// <summary> + /// Gets or sets Rectangles scrolling on main thread only. + /// </summary> + public ScrollRect[] ScrollRects { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/LayerTree/LayerPaintedEvent.cs b/ChromeDevTools/Protocol/LayerTree/LayerPaintedEvent.cs new file mode 100644 index 0000000000000000000000000000000000000000..39ee010ed4aea72c04263d8b3ada4af2b9457992 --- /dev/null +++ b/ChromeDevTools/Protocol/LayerTree/LayerPaintedEvent.cs @@ -0,0 +1,17 @@ +using ChromeDevTools; + +namespace ChromeDevTools.Protocol.LayerTree +{ + [Event(ProtocolName.LayerTree.LayerPainted)] + public class LayerPaintedEvent + { + /// <summary> + /// Gets or sets The id of the painted layer. + /// </summary> + public string LayerId { get; set; } + /// <summary> + /// Gets or sets Clip rectangle. + /// </summary> + public DOM.Rect Clip { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/LayerTree/LayerTreeDidChangeEvent.cs b/ChromeDevTools/Protocol/LayerTree/LayerTreeDidChangeEvent.cs new file mode 100644 index 0000000000000000000000000000000000000000..d7649da53dfb7da2ff337393065c7efc43d2062d --- /dev/null +++ b/ChromeDevTools/Protocol/LayerTree/LayerTreeDidChangeEvent.cs @@ -0,0 +1,13 @@ +using ChromeDevTools; + +namespace ChromeDevTools.Protocol.LayerTree +{ + [Event(ProtocolName.LayerTree.LayerTreeDidChange)] + public class LayerTreeDidChangeEvent + { + /// <summary> + /// Gets or sets Layer tree, absent if not in the comspositing mode. + /// </summary> + public Layer[] Layers { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/LayerTree/LoadSnapshotCommand.cs b/ChromeDevTools/Protocol/LayerTree/LoadSnapshotCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..42bc05cbd5a7d84fe8a859c3143518b9ff0c0035 --- /dev/null +++ b/ChromeDevTools/Protocol/LayerTree/LoadSnapshotCommand.cs @@ -0,0 +1,17 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.LayerTree +{ + /// <summary> + /// Returns the snapshot identifier. + /// </summary> + [Command(ProtocolName.LayerTree.LoadSnapshot)] + public class LoadSnapshotCommand + { + /// <summary> + /// Gets or sets An array of tiles composing the snapshot. + /// </summary> + public PictureTile[] Tiles { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/LayerTree/LoadSnapshotCommandResponse.cs b/ChromeDevTools/Protocol/LayerTree/LoadSnapshotCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..915150d7670a79213ed98956fbebfe07cf8bf068 --- /dev/null +++ b/ChromeDevTools/Protocol/LayerTree/LoadSnapshotCommandResponse.cs @@ -0,0 +1,17 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.LayerTree +{ + /// <summary> + /// Returns the snapshot identifier. + /// </summary> + [CommandResponse(ProtocolName.LayerTree.LoadSnapshot)] + public class LoadSnapshotCommandResponse + { + /// <summary> + /// Gets or sets The id of the snapshot. + /// </summary> + public string SnapshotId { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/LayerTree/MakeSnapshotCommand.cs b/ChromeDevTools/Protocol/LayerTree/MakeSnapshotCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..667c4134c1c9aa68038c04108b1e2dc4d20be6a6 --- /dev/null +++ b/ChromeDevTools/Protocol/LayerTree/MakeSnapshotCommand.cs @@ -0,0 +1,17 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.LayerTree +{ + /// <summary> + /// Returns the layer snapshot identifier. + /// </summary> + [Command(ProtocolName.LayerTree.MakeSnapshot)] + public class MakeSnapshotCommand + { + /// <summary> + /// Gets or sets The id of the layer. + /// </summary> + public string LayerId { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/LayerTree/MakeSnapshotCommandResponse.cs b/ChromeDevTools/Protocol/LayerTree/MakeSnapshotCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..502a000b9212221ebf07f04c7bf683782f2d6450 --- /dev/null +++ b/ChromeDevTools/Protocol/LayerTree/MakeSnapshotCommandResponse.cs @@ -0,0 +1,17 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.LayerTree +{ + /// <summary> + /// Returns the layer snapshot identifier. + /// </summary> + [CommandResponse(ProtocolName.LayerTree.MakeSnapshot)] + public class MakeSnapshotCommandResponse + { + /// <summary> + /// Gets or sets The id of the layer snapshot. + /// </summary> + public string SnapshotId { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/LayerTree/PictureTile.cs b/ChromeDevTools/Protocol/LayerTree/PictureTile.cs new file mode 100644 index 0000000000000000000000000000000000000000..6d817df118ceca44561aaa7e9270865d91c6a219 --- /dev/null +++ b/ChromeDevTools/Protocol/LayerTree/PictureTile.cs @@ -0,0 +1,24 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.LayerTree +{ + /// <summary> + /// Serialized fragment of layer picture along with its offset within the layer. + /// </summary> + public class PictureTile + { + /// <summary> + /// Gets or sets Offset from owning layer left boundary + /// </summary> + public double X { get; set; } + /// <summary> + /// Gets or sets Offset from owning layer top boundary + /// </summary> + public double Y { get; set; } + /// <summary> + /// Gets or sets Base64-encoded snapshot data. + /// </summary> + public string Picture { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/LayerTree/ProfileSnapshotCommand.cs b/ChromeDevTools/Protocol/LayerTree/ProfileSnapshotCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..1b57d92942fff246a79c27346214ea351dc20872 --- /dev/null +++ b/ChromeDevTools/Protocol/LayerTree/ProfileSnapshotCommand.cs @@ -0,0 +1,26 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.LayerTree +{ + [Command(ProtocolName.LayerTree.ProfileSnapshot)] + public class ProfileSnapshotCommand + { + /// <summary> + /// Gets or sets The id of the layer snapshot. + /// </summary> + public string SnapshotId { get; set; } + /// <summary> + /// Gets or sets The maximum number of times to replay the snapshot (1, if not specified). + /// </summary> + public long MinRepeatCount { get; set; } + /// <summary> + /// Gets or sets The minimum duration (in seconds) to replay the snapshot. + /// </summary> + public double MinDuration { get; set; } + /// <summary> + /// Gets or sets The clip rectangle to apply when replaying the snapshot. + /// </summary> + public DOM.Rect ClipRect { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/LayerTree/ProfileSnapshotCommandResponse.cs b/ChromeDevTools/Protocol/LayerTree/ProfileSnapshotCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..8d47de403b7fd092e68c54584bc9eab3b9dd7942 --- /dev/null +++ b/ChromeDevTools/Protocol/LayerTree/ProfileSnapshotCommandResponse.cs @@ -0,0 +1,14 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.LayerTree +{ + [CommandResponse(ProtocolName.LayerTree.ProfileSnapshot)] + public class ProfileSnapshotCommandResponse + { + /// <summary> + /// Gets or sets The array of paint profiles, one per run. + /// </summary> + public double[][] Timings { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/LayerTree/ReleaseSnapshotCommand.cs b/ChromeDevTools/Protocol/LayerTree/ReleaseSnapshotCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..26fea8a4d1a2b0daf29610baa4c85d7155837204 --- /dev/null +++ b/ChromeDevTools/Protocol/LayerTree/ReleaseSnapshotCommand.cs @@ -0,0 +1,17 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.LayerTree +{ + /// <summary> + /// Releases layer snapshot captured by the back-end. + /// </summary> + [Command(ProtocolName.LayerTree.ReleaseSnapshot)] + public class ReleaseSnapshotCommand + { + /// <summary> + /// Gets or sets The id of the layer snapshot. + /// </summary> + public string SnapshotId { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/LayerTree/ReleaseSnapshotCommandResponse.cs b/ChromeDevTools/Protocol/LayerTree/ReleaseSnapshotCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..243b5c09cf6d5d7e1248c372bfd1ee2d93cc3382 --- /dev/null +++ b/ChromeDevTools/Protocol/LayerTree/ReleaseSnapshotCommandResponse.cs @@ -0,0 +1,13 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.LayerTree +{ + /// <summary> + /// Releases layer snapshot captured by the back-end. + /// </summary> + [CommandResponse(ProtocolName.LayerTree.ReleaseSnapshot)] + public class ReleaseSnapshotCommandResponse + { + } +} diff --git a/ChromeDevTools/Protocol/LayerTree/ReplaySnapshotCommand.cs b/ChromeDevTools/Protocol/LayerTree/ReplaySnapshotCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..e8910c17f12133c9a28499c2a9fe04efd690460f --- /dev/null +++ b/ChromeDevTools/Protocol/LayerTree/ReplaySnapshotCommand.cs @@ -0,0 +1,29 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.LayerTree +{ + /// <summary> + /// Replays the layer snapshot and returns the resulting bitmap. + /// </summary> + [Command(ProtocolName.LayerTree.ReplaySnapshot)] + public class ReplaySnapshotCommand + { + /// <summary> + /// Gets or sets The id of the layer snapshot. + /// </summary> + public string SnapshotId { get; set; } + /// <summary> + /// Gets or sets The first step to replay from (replay from the very start if not specified). + /// </summary> + public long FromStep { get; set; } + /// <summary> + /// Gets or sets The last step to replay to (replay till the end if not specified). + /// </summary> + public long ToStep { get; set; } + /// <summary> + /// Gets or sets The scale to apply while replaying (defaults to 1). + /// </summary> + public double Scale { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/LayerTree/ReplaySnapshotCommandResponse.cs b/ChromeDevTools/Protocol/LayerTree/ReplaySnapshotCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..16ff04ccead813db38cec0ca5c5bf7736882bc97 --- /dev/null +++ b/ChromeDevTools/Protocol/LayerTree/ReplaySnapshotCommandResponse.cs @@ -0,0 +1,17 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.LayerTree +{ + /// <summary> + /// Replays the layer snapshot and returns the resulting bitmap. + /// </summary> + [CommandResponse(ProtocolName.LayerTree.ReplaySnapshot)] + public class ReplaySnapshotCommandResponse + { + /// <summary> + /// Gets or sets A data: URL for resulting image. + /// </summary> + public string DataURL { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/LayerTree/ScrollRect.cs b/ChromeDevTools/Protocol/LayerTree/ScrollRect.cs new file mode 100644 index 0000000000000000000000000000000000000000..73fd10fa469acf688260cd5360fd28e1763ca4bd --- /dev/null +++ b/ChromeDevTools/Protocol/LayerTree/ScrollRect.cs @@ -0,0 +1,20 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.LayerTree +{ + /// <summary> + /// Rectangle where scrolling happens on the main thread. + /// </summary> + public class ScrollRect + { + /// <summary> + /// Gets or sets Rectangle itself. + /// </summary> + public DOM.Rect Rect { get; set; } + /// <summary> + /// Gets or sets Reason for rectangle to force scrolling on the main thread + /// </summary> + public string Type { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/LayerTree/SnapshotCommandLogCommand.cs b/ChromeDevTools/Protocol/LayerTree/SnapshotCommandLogCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..a0f5ef70e9e8595b263c32bd0cbae22acc7ffba0 --- /dev/null +++ b/ChromeDevTools/Protocol/LayerTree/SnapshotCommandLogCommand.cs @@ -0,0 +1,17 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.LayerTree +{ + /// <summary> + /// Replays the layer snapshot and returns canvas log. + /// </summary> + [Command(ProtocolName.LayerTree.SnapshotCommandLog)] + public class SnapshotCommandLogCommand + { + /// <summary> + /// Gets or sets The id of the layer snapshot. + /// </summary> + public string SnapshotId { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/LayerTree/SnapshotCommandLogCommandResponse.cs b/ChromeDevTools/Protocol/LayerTree/SnapshotCommandLogCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..e000b522504dbd42c463e1bb83be629f018cb8bb --- /dev/null +++ b/ChromeDevTools/Protocol/LayerTree/SnapshotCommandLogCommandResponse.cs @@ -0,0 +1,21 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.LayerTree +{ + /// <summary> + /// Replays the layer snapshot and returns canvas log. + /// </summary> + [CommandResponse(ProtocolName.LayerTree.SnapshotCommandLog)] + public class SnapshotCommandLogCommandResponse + { + public class CommandLogArray + { + } + + /// <summary> + /// Gets or sets The array of canvas function calls. + /// </summary> + public CommandLogArray[] CommandLog { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/Memory/GetDOMCountersCommand.cs b/ChromeDevTools/Protocol/Memory/GetDOMCountersCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..ba1c6848d18d8ff4f43ecabc194a807ee71a57a7 --- /dev/null +++ b/ChromeDevTools/Protocol/Memory/GetDOMCountersCommand.cs @@ -0,0 +1,10 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Memory +{ + [Command(ProtocolName.Memory.GetDOMCounters)] + public class GetDOMCountersCommand + { + } +} diff --git a/ChromeDevTools/Protocol/Memory/GetDOMCountersCommandResponse.cs b/ChromeDevTools/Protocol/Memory/GetDOMCountersCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..854fd6c8a0f35e7c843faefa946773cfcaab6877 --- /dev/null +++ b/ChromeDevTools/Protocol/Memory/GetDOMCountersCommandResponse.cs @@ -0,0 +1,22 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Memory +{ + [CommandResponse(ProtocolName.Memory.GetDOMCounters)] + public class GetDOMCountersCommandResponse + { + /// <summary> + /// Gets or sets Documents + /// </summary> + public long Documents { get; set; } + /// <summary> + /// Gets or sets Nodes + /// </summary> + public long Nodes { get; set; } + /// <summary> + /// Gets or sets JsEventListeners + /// </summary> + public long JsEventListeners { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/Network/CachedResource.cs b/ChromeDevTools/Protocol/Network/CachedResource.cs new file mode 100644 index 0000000000000000000000000000000000000000..2485401c308c1f1160a1da99b81d9a5ff4382598 --- /dev/null +++ b/ChromeDevTools/Protocol/Network/CachedResource.cs @@ -0,0 +1,28 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Network +{ + /// <summary> + /// Information about the cached resource. + /// </summary> + public class CachedResource + { + /// <summary> + /// Gets or sets Resource URL. This is the url of the original network request. + /// </summary> + public string Url { get; set; } + /// <summary> + /// Gets or sets Type of this resource. + /// </summary> + public Page.ResourceType Type { get; set; } + /// <summary> + /// Gets or sets Cached response data. + /// </summary> + public Response Response { get; set; } + /// <summary> + /// Gets or sets Cached response body size. + /// </summary> + public double BodySize { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/Network/CanClearBrowserCacheCommand.cs b/ChromeDevTools/Protocol/Network/CanClearBrowserCacheCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..d7893ad60008b3c69ab37a5de4a42c990df6c862 --- /dev/null +++ b/ChromeDevTools/Protocol/Network/CanClearBrowserCacheCommand.cs @@ -0,0 +1,13 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Network +{ + /// <summary> + /// Tells whether clearing browser cache is supported. + /// </summary> + [Command(ProtocolName.Network.CanClearBrowserCache)] + public class CanClearBrowserCacheCommand + { + } +} diff --git a/ChromeDevTools/Protocol/Network/CanClearBrowserCacheCommandResponse.cs b/ChromeDevTools/Protocol/Network/CanClearBrowserCacheCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..99853f9f8a59d0b4938f4da670b3a857da23ec16 --- /dev/null +++ b/ChromeDevTools/Protocol/Network/CanClearBrowserCacheCommandResponse.cs @@ -0,0 +1,17 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Network +{ + /// <summary> + /// Tells whether clearing browser cache is supported. + /// </summary> + [CommandResponse(ProtocolName.Network.CanClearBrowserCache)] + public class CanClearBrowserCacheCommandResponse + { + /// <summary> + /// Gets or sets True if browser cache can be cleared. + /// </summary> + public bool Result { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/Network/CanClearBrowserCookiesCommand.cs b/ChromeDevTools/Protocol/Network/CanClearBrowserCookiesCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..ff848068b73143ddba2a84c5e5d9abcae34abaf7 --- /dev/null +++ b/ChromeDevTools/Protocol/Network/CanClearBrowserCookiesCommand.cs @@ -0,0 +1,13 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Network +{ + /// <summary> + /// Tells whether clearing browser cookies is supported. + /// </summary> + [Command(ProtocolName.Network.CanClearBrowserCookies)] + public class CanClearBrowserCookiesCommand + { + } +} diff --git a/ChromeDevTools/Protocol/Network/CanClearBrowserCookiesCommandResponse.cs b/ChromeDevTools/Protocol/Network/CanClearBrowserCookiesCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..86324646e0d2349285ca7798a2547a18e070ff44 --- /dev/null +++ b/ChromeDevTools/Protocol/Network/CanClearBrowserCookiesCommandResponse.cs @@ -0,0 +1,17 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Network +{ + /// <summary> + /// Tells whether clearing browser cookies is supported. + /// </summary> + [CommandResponse(ProtocolName.Network.CanClearBrowserCookies)] + public class CanClearBrowserCookiesCommandResponse + { + /// <summary> + /// Gets or sets True if browser cookies can be cleared. + /// </summary> + public bool Result { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/Network/CanEmulateNetworkConditionsCommand.cs b/ChromeDevTools/Protocol/Network/CanEmulateNetworkConditionsCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..33abddbbaf1949cd89a00fdfdf5eb88af063ab9c --- /dev/null +++ b/ChromeDevTools/Protocol/Network/CanEmulateNetworkConditionsCommand.cs @@ -0,0 +1,13 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Network +{ + /// <summary> + /// Tells whether emulation of network conditions is supported. + /// </summary> + [Command(ProtocolName.Network.CanEmulateNetworkConditions)] + public class CanEmulateNetworkConditionsCommand + { + } +} diff --git a/ChromeDevTools/Protocol/Network/CanEmulateNetworkConditionsCommandResponse.cs b/ChromeDevTools/Protocol/Network/CanEmulateNetworkConditionsCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..99f0ba5bad3764726c9cd2f5e8d3aca0289a8f70 --- /dev/null +++ b/ChromeDevTools/Protocol/Network/CanEmulateNetworkConditionsCommandResponse.cs @@ -0,0 +1,17 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Network +{ + /// <summary> + /// Tells whether emulation of network conditions is supported. + /// </summary> + [CommandResponse(ProtocolName.Network.CanEmulateNetworkConditions)] + public class CanEmulateNetworkConditionsCommandResponse + { + /// <summary> + /// Gets or sets True if emulation of network conditions is supported. + /// </summary> + public bool Result { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/Network/ClearBrowserCacheCommand.cs b/ChromeDevTools/Protocol/Network/ClearBrowserCacheCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..417bfb106abe25b2bfa95a9959db8baa654f554b --- /dev/null +++ b/ChromeDevTools/Protocol/Network/ClearBrowserCacheCommand.cs @@ -0,0 +1,13 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Network +{ + /// <summary> + /// Clears browser cache. + /// </summary> + [Command(ProtocolName.Network.ClearBrowserCache)] + public class ClearBrowserCacheCommand + { + } +} diff --git a/ChromeDevTools/Protocol/Network/ClearBrowserCacheCommandResponse.cs b/ChromeDevTools/Protocol/Network/ClearBrowserCacheCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..06133993aa356538f32194bf5aef0232190fc6e1 --- /dev/null +++ b/ChromeDevTools/Protocol/Network/ClearBrowserCacheCommandResponse.cs @@ -0,0 +1,13 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Network +{ + /// <summary> + /// Clears browser cache. + /// </summary> + [CommandResponse(ProtocolName.Network.ClearBrowserCache)] + public class ClearBrowserCacheCommandResponse + { + } +} diff --git a/ChromeDevTools/Protocol/Network/ClearBrowserCookiesCommand.cs b/ChromeDevTools/Protocol/Network/ClearBrowserCookiesCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..82c83a70fbfc35306a002f95601b36e7aaafce25 --- /dev/null +++ b/ChromeDevTools/Protocol/Network/ClearBrowserCookiesCommand.cs @@ -0,0 +1,13 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Network +{ + /// <summary> + /// Clears browser cookies. + /// </summary> + [Command(ProtocolName.Network.ClearBrowserCookies)] + public class ClearBrowserCookiesCommand + { + } +} diff --git a/ChromeDevTools/Protocol/Network/ClearBrowserCookiesCommandResponse.cs b/ChromeDevTools/Protocol/Network/ClearBrowserCookiesCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..5396d35bd4aeb414f9c073f881ffa42612433d85 --- /dev/null +++ b/ChromeDevTools/Protocol/Network/ClearBrowserCookiesCommandResponse.cs @@ -0,0 +1,13 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Network +{ + /// <summary> + /// Clears browser cookies. + /// </summary> + [CommandResponse(ProtocolName.Network.ClearBrowserCookies)] + public class ClearBrowserCookiesCommandResponse + { + } +} diff --git a/ChromeDevTools/Protocol/Network/Cookie.cs b/ChromeDevTools/Protocol/Network/Cookie.cs new file mode 100644 index 0000000000000000000000000000000000000000..de5e718c6e977071f74de83d5d88cbc5503d7577 --- /dev/null +++ b/ChromeDevTools/Protocol/Network/Cookie.cs @@ -0,0 +1,48 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Network +{ + /// <summary> + /// Cookie object + /// </summary> + public class Cookie + { + /// <summary> + /// Gets or sets Cookie name. + /// </summary> + public string Name { get; set; } + /// <summary> + /// Gets or sets Cookie value. + /// </summary> + public string Value { get; set; } + /// <summary> + /// Gets or sets Cookie domain. + /// </summary> + public string Domain { get; set; } + /// <summary> + /// Gets or sets Cookie path. + /// </summary> + public string Path { get; set; } + /// <summary> + /// Gets or sets Cookie expires. + /// </summary> + public double Expires { get; set; } + /// <summary> + /// Gets or sets Cookie size. + /// </summary> + public long Size { get; set; } + /// <summary> + /// Gets or sets True if cookie is http-only. + /// </summary> + public bool HttpOnly { get; set; } + /// <summary> + /// Gets or sets True if cookie is secure. + /// </summary> + public bool Secure { get; set; } + /// <summary> + /// Gets or sets True in case of session cookie. + /// </summary> + public bool Session { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/Network/DataReceivedEvent.cs b/ChromeDevTools/Protocol/Network/DataReceivedEvent.cs new file mode 100644 index 0000000000000000000000000000000000000000..92bd64e68cb178d327c69f50714df634c7e5812f --- /dev/null +++ b/ChromeDevTools/Protocol/Network/DataReceivedEvent.cs @@ -0,0 +1,28 @@ +using ChromeDevTools; + +namespace ChromeDevTools.Protocol.Network +{ + /// <summary> + /// Fired when data chunk was received over the network. + /// </summary> + [Event(ProtocolName.Network.DataReceived)] + public class DataReceivedEvent + { + /// <summary> + /// Gets or sets Request identifier. + /// </summary> + public string RequestId { get; set; } + /// <summary> + /// Gets or sets Timestamp. + /// </summary> + public double Timestamp { get; set; } + /// <summary> + /// Gets or sets Data chunk length. + /// </summary> + public long DataLength { get; set; } + /// <summary> + /// Gets or sets Actual bytes received (might be less than dataLength for compressed encodings). + /// </summary> + public long EncodedDataLength { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/Network/DeleteCookieCommand.cs b/ChromeDevTools/Protocol/Network/DeleteCookieCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..cbf2cdcc421c70c08dc21e716cf6a7ca81b2c192 --- /dev/null +++ b/ChromeDevTools/Protocol/Network/DeleteCookieCommand.cs @@ -0,0 +1,21 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Network +{ + /// <summary> + /// Deletes browser cookie with given name, domain and path. + /// </summary> + [Command(ProtocolName.Network.DeleteCookie)] + public class DeleteCookieCommand + { + /// <summary> + /// Gets or sets Name of the cookie to remove. + /// </summary> + public string CookieName { get; set; } + /// <summary> + /// Gets or sets URL to match cooke domain and path. + /// </summary> + public string Url { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/Network/DeleteCookieCommandResponse.cs b/ChromeDevTools/Protocol/Network/DeleteCookieCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..47ed7630429c396f7af677ee2cae2147a077c9f7 --- /dev/null +++ b/ChromeDevTools/Protocol/Network/DeleteCookieCommandResponse.cs @@ -0,0 +1,13 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Network +{ + /// <summary> + /// Deletes browser cookie with given name, domain and path. + /// </summary> + [CommandResponse(ProtocolName.Network.DeleteCookie)] + public class DeleteCookieCommandResponse + { + } +} diff --git a/ChromeDevTools/Protocol/Network/DisableCommand.cs b/ChromeDevTools/Protocol/Network/DisableCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..f2c64e11604e32d3b31c241865711dd237d9bad1 --- /dev/null +++ b/ChromeDevTools/Protocol/Network/DisableCommand.cs @@ -0,0 +1,13 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Network +{ + /// <summary> + /// Disables network tracking, prevents network events from being sent to the client. + /// </summary> + [Command(ProtocolName.Network.Disable)] + public class DisableCommand + { + } +} diff --git a/ChromeDevTools/Protocol/Network/DisableCommandResponse.cs b/ChromeDevTools/Protocol/Network/DisableCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..0ee92f2eb4867793b27537d4bc8c7bb003f5d081 --- /dev/null +++ b/ChromeDevTools/Protocol/Network/DisableCommandResponse.cs @@ -0,0 +1,13 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Network +{ + /// <summary> + /// Disables network tracking, prevents network events from being sent to the client. + /// </summary> + [CommandResponse(ProtocolName.Network.Disable)] + public class DisableCommandResponse + { + } +} diff --git a/ChromeDevTools/Protocol/Network/EmulateNetworkConditionsCommand.cs b/ChromeDevTools/Protocol/Network/EmulateNetworkConditionsCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..e0818081d510f58aeb9e7f888e998c916f355df1 --- /dev/null +++ b/ChromeDevTools/Protocol/Network/EmulateNetworkConditionsCommand.cs @@ -0,0 +1,29 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Network +{ + /// <summary> + /// Activates emulation of network conditions. + /// </summary> + [Command(ProtocolName.Network.EmulateNetworkConditions)] + public class EmulateNetworkConditionsCommand + { + /// <summary> + /// Gets or sets True to emulate internet disconnection. + /// </summary> + public bool Offline { get; set; } + /// <summary> + /// Gets or sets Additional latency (ms). + /// </summary> + public double Latency { get; set; } + /// <summary> + /// Gets or sets Maximal aggregated download throughput. + /// </summary> + public double DownloadThroughput { get; set; } + /// <summary> + /// Gets or sets Maximal aggregated upload throughput. + /// </summary> + public double UploadThroughput { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/Network/EmulateNetworkConditionsCommandResponse.cs b/ChromeDevTools/Protocol/Network/EmulateNetworkConditionsCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..f612b0bf71ec5c6fa20f5553ebb721a72f4c370c --- /dev/null +++ b/ChromeDevTools/Protocol/Network/EmulateNetworkConditionsCommandResponse.cs @@ -0,0 +1,13 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Network +{ + /// <summary> + /// Activates emulation of network conditions. + /// </summary> + [CommandResponse(ProtocolName.Network.EmulateNetworkConditions)] + public class EmulateNetworkConditionsCommandResponse + { + } +} diff --git a/ChromeDevTools/Protocol/Network/EnableCommand.cs b/ChromeDevTools/Protocol/Network/EnableCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..16ab1aa1f1dfc58ae2b73f31f1252b36306ef498 --- /dev/null +++ b/ChromeDevTools/Protocol/Network/EnableCommand.cs @@ -0,0 +1,13 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Network +{ + /// <summary> + /// Enables network tracking, network events will now be delivered to the client. + /// </summary> + [Command(ProtocolName.Network.Enable)] + public class EnableCommand + { + } +} diff --git a/ChromeDevTools/Protocol/Network/EnableCommandResponse.cs b/ChromeDevTools/Protocol/Network/EnableCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..214bb44f05153f9603a8036c6aff693cd5ec47dd --- /dev/null +++ b/ChromeDevTools/Protocol/Network/EnableCommandResponse.cs @@ -0,0 +1,13 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Network +{ + /// <summary> + /// Enables network tracking, network events will now be delivered to the client. + /// </summary> + [CommandResponse(ProtocolName.Network.Enable)] + public class EnableCommandResponse + { + } +} diff --git a/ChromeDevTools/Protocol/Network/EventSourceMessageReceivedEvent.cs b/ChromeDevTools/Protocol/Network/EventSourceMessageReceivedEvent.cs new file mode 100644 index 0000000000000000000000000000000000000000..ca19085e7e8ad86fc6f0819ccb18a9a03ac1a96c --- /dev/null +++ b/ChromeDevTools/Protocol/Network/EventSourceMessageReceivedEvent.cs @@ -0,0 +1,32 @@ +using ChromeDevTools; + +namespace ChromeDevTools.Protocol.Network +{ + /// <summary> + /// Fired when EventSource message is received. + /// </summary> + [Event(ProtocolName.Network.EventSourceMessageReceived)] + public class EventSourceMessageReceivedEvent + { + /// <summary> + /// Gets or sets Request identifier. + /// </summary> + public string RequestId { get; set; } + /// <summary> + /// Gets or sets Timestamp. + /// </summary> + public double Timestamp { get; set; } + /// <summary> + /// Gets or sets Message type. + /// </summary> + public string EventName { get; set; } + /// <summary> + /// Gets or sets Message identifier. + /// </summary> + public string EventId { get; set; } + /// <summary> + /// Gets or sets Message content. + /// </summary> + public string Data { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/Network/GetCookiesCommand.cs b/ChromeDevTools/Protocol/Network/GetCookiesCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..6c2d6126a3541733672a746ee4c7d6d74e50b0b7 --- /dev/null +++ b/ChromeDevTools/Protocol/Network/GetCookiesCommand.cs @@ -0,0 +1,13 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Network +{ + /// <summary> + /// Returns all browser cookies. Depending on the backend support, will return detailed cookie information in the <code>cookies</code> field. + /// </summary> + [Command(ProtocolName.Network.GetCookies)] + public class GetCookiesCommand + { + } +} diff --git a/ChromeDevTools/Protocol/Network/GetCookiesCommandResponse.cs b/ChromeDevTools/Protocol/Network/GetCookiesCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..b056dfe385e92a7979ad9d52957eca6a96462547 --- /dev/null +++ b/ChromeDevTools/Protocol/Network/GetCookiesCommandResponse.cs @@ -0,0 +1,17 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Network +{ + /// <summary> + /// Returns all browser cookies. Depending on the backend support, will return detailed cookie information in the <code>cookies</code> field. + /// </summary> + [CommandResponse(ProtocolName.Network.GetCookies)] + public class GetCookiesCommandResponse + { + /// <summary> + /// Gets or sets Array of cookie objects. + /// </summary> + public Cookie[] Cookies { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/Network/GetResponseBodyCommand.cs b/ChromeDevTools/Protocol/Network/GetResponseBodyCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..ad395c2632042d4cdcfa891aab4703ea8e0de5ad --- /dev/null +++ b/ChromeDevTools/Protocol/Network/GetResponseBodyCommand.cs @@ -0,0 +1,17 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Network +{ + /// <summary> + /// Returns content served for the given request. + /// </summary> + [Command(ProtocolName.Network.GetResponseBody)] + public class GetResponseBodyCommand + { + /// <summary> + /// Gets or sets Identifier of the network request to get content for. + /// </summary> + public string RequestId { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/Network/GetResponseBodyCommandResponse.cs b/ChromeDevTools/Protocol/Network/GetResponseBodyCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..db9b0057d7f82b6b55f35dcac45c0678bde2aa31 --- /dev/null +++ b/ChromeDevTools/Protocol/Network/GetResponseBodyCommandResponse.cs @@ -0,0 +1,21 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Network +{ + /// <summary> + /// Returns content served for the given request. + /// </summary> + [CommandResponse(ProtocolName.Network.GetResponseBody)] + public class GetResponseBodyCommandResponse + { + /// <summary> + /// Gets or sets Response body. + /// </summary> + public string Body { get; set; } + /// <summary> + /// Gets or sets True, if content was sent as base64. + /// </summary> + public bool Base64Encoded { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/Network/Initiator.cs b/ChromeDevTools/Protocol/Network/Initiator.cs new file mode 100644 index 0000000000000000000000000000000000000000..ad57ef5d39bc1e332573fcec985c7e2fa6dec8f1 --- /dev/null +++ b/ChromeDevTools/Protocol/Network/Initiator.cs @@ -0,0 +1,32 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Network +{ + /// <summary> + /// Information about the request initiator. + /// </summary> + public class Initiator + { + /// <summary> + /// Gets or sets Type of this initiator. + /// </summary> + public string Type { get; set; } + /// <summary> + /// Gets or sets Initiator JavaScript stack trace, set for Script only. + /// </summary> + public Console.CallFrame[] StackTrace { get; set; } + /// <summary> + /// Gets or sets Initiator URL, set for Parser type only. + /// </summary> + public string Url { get; set; } + /// <summary> + /// Gets or sets Initiator line number, set for Parser type only. + /// </summary> + public double LineNumber { get; set; } + /// <summary> + /// Gets or sets Initiator asynchronous JavaScript stack trace, if available. + /// </summary> + public Console.AsyncStackTrace AsyncStackTrace { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/Network/LoadingFailedEvent.cs b/ChromeDevTools/Protocol/Network/LoadingFailedEvent.cs new file mode 100644 index 0000000000000000000000000000000000000000..f8cf6e6d1d9429a72dad8cd750eb9070f8af4fac --- /dev/null +++ b/ChromeDevTools/Protocol/Network/LoadingFailedEvent.cs @@ -0,0 +1,32 @@ +using ChromeDevTools; + +namespace ChromeDevTools.Protocol.Network +{ + /// <summary> + /// Fired when HTTP request has failed to load. + /// </summary> + [Event(ProtocolName.Network.LoadingFailed)] + public class LoadingFailedEvent + { + /// <summary> + /// Gets or sets Request identifier. + /// </summary> + public string RequestId { get; set; } + /// <summary> + /// Gets or sets Timestamp. + /// </summary> + public double Timestamp { get; set; } + /// <summary> + /// Gets or sets Resource type. + /// </summary> + public Page.ResourceType Type { get; set; } + /// <summary> + /// Gets or sets User friendly error message. + /// </summary> + public string ErrorText { get; set; } + /// <summary> + /// Gets or sets True if loading was canceled. + /// </summary> + public bool Canceled { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/Network/LoadingFinishedEvent.cs b/ChromeDevTools/Protocol/Network/LoadingFinishedEvent.cs new file mode 100644 index 0000000000000000000000000000000000000000..cc4bc445ef53c9af0b64befb5cbfedda44da8ece --- /dev/null +++ b/ChromeDevTools/Protocol/Network/LoadingFinishedEvent.cs @@ -0,0 +1,24 @@ +using ChromeDevTools; + +namespace ChromeDevTools.Protocol.Network +{ + /// <summary> + /// Fired when HTTP request has finished loading. + /// </summary> + [Event(ProtocolName.Network.LoadingFinished)] + public class LoadingFinishedEvent + { + /// <summary> + /// Gets or sets Request identifier. + /// </summary> + public string RequestId { get; set; } + /// <summary> + /// Gets or sets Timestamp. + /// </summary> + public double Timestamp { get; set; } + /// <summary> + /// Gets or sets Total number of bytes received for this request. + /// </summary> + public double EncodedDataLength { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/Network/ReplayXHRCommand.cs b/ChromeDevTools/Protocol/Network/ReplayXHRCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..50b0d8c0ccc7482456148c57cfc8f971626aa7d4 --- /dev/null +++ b/ChromeDevTools/Protocol/Network/ReplayXHRCommand.cs @@ -0,0 +1,17 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Network +{ + /// <summary> + /// This method sends a new XMLHttpRequest which is identical to the original one. The following parameters should be identical: method, url, async, request body, extra headers, withCredentials attribute, user, password. + /// </summary> + [Command(ProtocolName.Network.ReplayXHR)] + public class ReplayXHRCommand + { + /// <summary> + /// Gets or sets Identifier of XHR to replay. + /// </summary> + public string RequestId { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/Network/ReplayXHRCommandResponse.cs b/ChromeDevTools/Protocol/Network/ReplayXHRCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..90c4b1b7ca9e656ccaca726a8ab2663fa7b720ec --- /dev/null +++ b/ChromeDevTools/Protocol/Network/ReplayXHRCommandResponse.cs @@ -0,0 +1,13 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Network +{ + /// <summary> + /// This method sends a new XMLHttpRequest which is identical to the original one. The following parameters should be identical: method, url, async, request body, extra headers, withCredentials attribute, user, password. + /// </summary> + [CommandResponse(ProtocolName.Network.ReplayXHR)] + public class ReplayXHRCommandResponse + { + } +} diff --git a/ChromeDevTools/Protocol/Network/Request.cs b/ChromeDevTools/Protocol/Network/Request.cs new file mode 100644 index 0000000000000000000000000000000000000000..e7d49aa47ae754831550917706a4aa4a36502639 --- /dev/null +++ b/ChromeDevTools/Protocol/Network/Request.cs @@ -0,0 +1,28 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Network +{ + /// <summary> + /// HTTP request data. + /// </summary> + public class Request + { + /// <summary> + /// Gets or sets Request URL. + /// </summary> + public string Url { get; set; } + /// <summary> + /// Gets or sets HTTP request method. + /// </summary> + public string Method { get; set; } + /// <summary> + /// Gets or sets HTTP request headers. + /// </summary> + public Dictionary<string, string> Headers { get; set; } + /// <summary> + /// Gets or sets HTTP POST request data. + /// </summary> + public string PostData { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/Network/RequestServedFromCacheEvent.cs b/ChromeDevTools/Protocol/Network/RequestServedFromCacheEvent.cs new file mode 100644 index 0000000000000000000000000000000000000000..d18b715b00b3118e20a328aff6af12d759f2e57f --- /dev/null +++ b/ChromeDevTools/Protocol/Network/RequestServedFromCacheEvent.cs @@ -0,0 +1,16 @@ +using ChromeDevTools; + +namespace ChromeDevTools.Protocol.Network +{ + /// <summary> + /// Fired if request ended up loading from cache. + /// </summary> + [Event(ProtocolName.Network.RequestServedFromCache)] + public class RequestServedFromCacheEvent + { + /// <summary> + /// Gets or sets Request identifier. + /// </summary> + public string RequestId { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/Network/RequestWillBeSentEvent.cs b/ChromeDevTools/Protocol/Network/RequestWillBeSentEvent.cs new file mode 100644 index 0000000000000000000000000000000000000000..8dad68978d5a0dffee03d4c4380c7677dae388bb --- /dev/null +++ b/ChromeDevTools/Protocol/Network/RequestWillBeSentEvent.cs @@ -0,0 +1,52 @@ +using ChromeDevTools; + +namespace ChromeDevTools.Protocol.Network +{ + /// <summary> + /// Fired when page is about to send HTTP request. + /// </summary> + [Event(ProtocolName.Network.RequestWillBeSent)] + public class RequestWillBeSentEvent + { + /// <summary> + /// Gets or sets Request identifier. + /// </summary> + public string RequestId { get; set; } + /// <summary> + /// Gets or sets Frame identifier. + /// </summary> + public string FrameId { get; set; } + /// <summary> + /// Gets or sets Loader identifier. + /// </summary> + public string LoaderId { get; set; } + /// <summary> + /// Gets or sets URL of the document this request is loaded for. + /// </summary> + public string DocumentURL { get; set; } + /// <summary> + /// Gets or sets Request data. + /// </summary> + public Request Request { get; set; } + /// <summary> + /// Gets or sets Timestamp. + /// </summary> + public double Timestamp { get; set; } + /// <summary> + /// Gets or sets UTC Timestamp. + /// </summary> + public double WallTime { get; set; } + /// <summary> + /// Gets or sets Request initiator. + /// </summary> + public Initiator Initiator { get; set; } + /// <summary> + /// Gets or sets Redirect response data. + /// </summary> + public Response RedirectResponse { get; set; } + /// <summary> + /// Gets or sets Type of this resource. + /// </summary> + public Page.ResourceType Type { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/Network/ResourceTiming.cs b/ChromeDevTools/Protocol/Network/ResourceTiming.cs new file mode 100644 index 0000000000000000000000000000000000000000..2ab24f9a4fa0446a61f3f4274fdc328591837132 --- /dev/null +++ b/ChromeDevTools/Protocol/Network/ResourceTiming.cs @@ -0,0 +1,72 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Network +{ + /// <summary> + /// Timing information for the request. + /// </summary> + public class ResourceTiming + { + /// <summary> + /// Gets or sets Timing's requestTime is a baseline in seconds, while the other numbers are ticks in milliseconds relatively to this requestTime. + /// </summary> + public double RequestTime { get; set; } + /// <summary> + /// Gets or sets Started resolving proxy. + /// </summary> + public double ProxyStart { get; set; } + /// <summary> + /// Gets or sets Finished resolving proxy. + /// </summary> + public double ProxyEnd { get; set; } + /// <summary> + /// Gets or sets Started DNS address resolve. + /// </summary> + public double DnsStart { get; set; } + /// <summary> + /// Gets or sets Finished DNS address resolve. + /// </summary> + public double DnsEnd { get; set; } + /// <summary> + /// Gets or sets Started connecting to the remote host. + /// </summary> + public double ConnectStart { get; set; } + /// <summary> + /// Gets or sets Connected to the remote host. + /// </summary> + public double ConnectEnd { get; set; } + /// <summary> + /// Gets or sets Started SSL handshake. + /// </summary> + public double SslStart { get; set; } + /// <summary> + /// Gets or sets Finished SSL handshake. + /// </summary> + public double SslEnd { get; set; } + /// <summary> + /// Gets or sets Started fetching via ServiceWorker. + /// </summary> + public double ServiceWorkerFetchStart { get; set; } + /// <summary> + /// Gets or sets Prepared a ServiceWorker. + /// </summary> + public double ServiceWorkerFetchReady { get; set; } + /// <summary> + /// Gets or sets Finished fetching via ServiceWorker. + /// </summary> + public double ServiceWorkerFetchEnd { get; set; } + /// <summary> + /// Gets or sets Started sending request. + /// </summary> + public double SendStart { get; set; } + /// <summary> + /// Gets or sets Finished sending request. + /// </summary> + public double SendEnd { get; set; } + /// <summary> + /// Gets or sets Finished receiving response headers. + /// </summary> + public double ReceiveHeadersEnd { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/Network/Response.cs b/ChromeDevTools/Protocol/Network/Response.cs new file mode 100644 index 0000000000000000000000000000000000000000..65eb2574a26f7ad3a76a7e8ddcef85c5879af9d5 --- /dev/null +++ b/ChromeDevTools/Protocol/Network/Response.cs @@ -0,0 +1,80 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Network +{ + /// <summary> + /// HTTP response data. + /// </summary> + public class Response + { + /// <summary> + /// Gets or sets Response URL. This URL can be different from CachedResource.url in case of redirect. + /// </summary> + public string Url { get; set; } + /// <summary> + /// Gets or sets HTTP response status code. + /// </summary> + public double Status { get; set; } + /// <summary> + /// Gets or sets HTTP response status text. + /// </summary> + public string StatusText { get; set; } + /// <summary> + /// Gets or sets HTTP response headers. + /// </summary> + public Dictionary<string, string> Headers { get; set; } + /// <summary> + /// Gets or sets HTTP response headers text. + /// </summary> + public string HeadersText { get; set; } + /// <summary> + /// Gets or sets Resource mimeType as determined by the browser. + /// </summary> + public string MimeType { get; set; } + /// <summary> + /// Gets or sets Refined HTTP request headers that were actually transmitted over the network. + /// </summary> + public Dictionary<string, string> RequestHeaders { get; set; } + /// <summary> + /// Gets or sets HTTP request headers text. + /// </summary> + public string RequestHeadersText { get; set; } + /// <summary> + /// Gets or sets Specifies whether physical connection was actually reused for this request. + /// </summary> + public bool ConnectionReused { get; set; } + /// <summary> + /// Gets or sets Physical connection id that was actually used for this request. + /// </summary> + public double ConnectionId { get; set; } + /// <summary> + /// Gets or sets Remote IP address. + /// </summary> + public string RemoteIPAddress { get; set; } + /// <summary> + /// Gets or sets Remote port. + /// </summary> + public long RemotePort { get; set; } + /// <summary> + /// Gets or sets Specifies that the request was served from the disk cache. + /// </summary> + public bool FromDiskCache { get; set; } + /// <summary> + /// Gets or sets Specifies that the request was served from the ServiceWorker. + /// </summary> + public bool FromServiceWorker { get; set; } + /// <summary> + /// Gets or sets Total number of bytes received for this request so far. + /// </summary> + public double EncodedDataLength { get; set; } + /// <summary> + /// Gets or sets Timing information for the given request. + /// </summary> + public ResourceTiming Timing { get; set; } + /// <summary> + /// Gets or sets Protocol used to fetch this resquest. + /// </summary> + public string Protocol { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/Network/ResponseReceivedEvent.cs b/ChromeDevTools/Protocol/Network/ResponseReceivedEvent.cs new file mode 100644 index 0000000000000000000000000000000000000000..d58efd474e42380d61968dd95a44ba33a5d1310a --- /dev/null +++ b/ChromeDevTools/Protocol/Network/ResponseReceivedEvent.cs @@ -0,0 +1,36 @@ +using ChromeDevTools; + +namespace ChromeDevTools.Protocol.Network +{ + /// <summary> + /// Fired when HTTP response is available. + /// </summary> + [Event(ProtocolName.Network.ResponseReceived)] + public class ResponseReceivedEvent + { + /// <summary> + /// Gets or sets Request identifier. + /// </summary> + public string RequestId { get; set; } + /// <summary> + /// Gets or sets Frame identifier. + /// </summary> + public string FrameId { get; set; } + /// <summary> + /// Gets or sets Loader identifier. + /// </summary> + public string LoaderId { get; set; } + /// <summary> + /// Gets or sets Timestamp. + /// </summary> + public double Timestamp { get; set; } + /// <summary> + /// Gets or sets Resource type. + /// </summary> + public Page.ResourceType Type { get; set; } + /// <summary> + /// Gets or sets Response data. + /// </summary> + public Response Response { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/Network/SetCacheDisabledCommand.cs b/ChromeDevTools/Protocol/Network/SetCacheDisabledCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..72095d0882767e5b9ad763bb17ac3e2fc71f72f9 --- /dev/null +++ b/ChromeDevTools/Protocol/Network/SetCacheDisabledCommand.cs @@ -0,0 +1,17 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Network +{ + /// <summary> + /// Toggles ignoring cache for each request. If <code>true</code>, cache will not be used. + /// </summary> + [Command(ProtocolName.Network.SetCacheDisabled)] + public class SetCacheDisabledCommand + { + /// <summary> + /// Gets or sets Cache disabled state. + /// </summary> + public bool CacheDisabled { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/Network/SetCacheDisabledCommandResponse.cs b/ChromeDevTools/Protocol/Network/SetCacheDisabledCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..26eb8306aa792137ca249f01f0249e6ea697db70 --- /dev/null +++ b/ChromeDevTools/Protocol/Network/SetCacheDisabledCommandResponse.cs @@ -0,0 +1,13 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Network +{ + /// <summary> + /// Toggles ignoring cache for each request. If <code>true</code>, cache will not be used. + /// </summary> + [CommandResponse(ProtocolName.Network.SetCacheDisabled)] + public class SetCacheDisabledCommandResponse + { + } +} diff --git a/ChromeDevTools/Protocol/Network/SetDataSizeLimitsForTestCommand.cs b/ChromeDevTools/Protocol/Network/SetDataSizeLimitsForTestCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..d931b0037a2848d90d7904d8d5f25a3de4bc5fe2 --- /dev/null +++ b/ChromeDevTools/Protocol/Network/SetDataSizeLimitsForTestCommand.cs @@ -0,0 +1,21 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Network +{ + /// <summary> + /// For testing. + /// </summary> + [Command(ProtocolName.Network.SetDataSizeLimitsForTest)] + public class SetDataSizeLimitsForTestCommand + { + /// <summary> + /// Gets or sets Maximum total buffer size. + /// </summary> + public long MaxTotalSize { get; set; } + /// <summary> + /// Gets or sets Maximum per-resource size. + /// </summary> + public long MaxResourceSize { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/Network/SetDataSizeLimitsForTestCommandResponse.cs b/ChromeDevTools/Protocol/Network/SetDataSizeLimitsForTestCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..dc0cc4ecf85611e26cc8f37a3dda9c5d27626ab7 --- /dev/null +++ b/ChromeDevTools/Protocol/Network/SetDataSizeLimitsForTestCommandResponse.cs @@ -0,0 +1,13 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Network +{ + /// <summary> + /// For testing. + /// </summary> + [CommandResponse(ProtocolName.Network.SetDataSizeLimitsForTest)] + public class SetDataSizeLimitsForTestCommandResponse + { + } +} diff --git a/ChromeDevTools/Protocol/Network/SetExtraHTTPHeadersCommand.cs b/ChromeDevTools/Protocol/Network/SetExtraHTTPHeadersCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..9b27bb2de46840fe9ba921f79d316f8dfa3f1ba8 --- /dev/null +++ b/ChromeDevTools/Protocol/Network/SetExtraHTTPHeadersCommand.cs @@ -0,0 +1,17 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Network +{ + /// <summary> + /// Specifies whether to always send extra HTTP headers with the requests from this page. + /// </summary> + [Command(ProtocolName.Network.SetExtraHTTPHeaders)] + public class SetExtraHTTPHeadersCommand + { + /// <summary> + /// Gets or sets Map with extra HTTP headers. + /// </summary> + public Dictionary<string, string> Headers { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/Network/SetExtraHTTPHeadersCommandResponse.cs b/ChromeDevTools/Protocol/Network/SetExtraHTTPHeadersCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..ab53f4d487f376cc399fdaac4e13016db4ce4161 --- /dev/null +++ b/ChromeDevTools/Protocol/Network/SetExtraHTTPHeadersCommandResponse.cs @@ -0,0 +1,13 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Network +{ + /// <summary> + /// Specifies whether to always send extra HTTP headers with the requests from this page. + /// </summary> + [CommandResponse(ProtocolName.Network.SetExtraHTTPHeaders)] + public class SetExtraHTTPHeadersCommandResponse + { + } +} diff --git a/ChromeDevTools/Protocol/Network/SetMonitoringXHREnabledCommand.cs b/ChromeDevTools/Protocol/Network/SetMonitoringXHREnabledCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..654aefc54d6251feb95e0bd764e422afba662d71 --- /dev/null +++ b/ChromeDevTools/Protocol/Network/SetMonitoringXHREnabledCommand.cs @@ -0,0 +1,17 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Network +{ + /// <summary> + /// Toggles monitoring of XMLHttpRequest. If <code>true</code>, console will receive messages upon each XHR issued. + /// </summary> + [Command(ProtocolName.Network.SetMonitoringXHREnabled)] + public class SetMonitoringXHREnabledCommand + { + /// <summary> + /// Gets or sets Monitoring enabled state. + /// </summary> + public bool Enabled { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/Network/SetMonitoringXHREnabledCommandResponse.cs b/ChromeDevTools/Protocol/Network/SetMonitoringXHREnabledCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..e5da5f67df2304d980f5a4719f45fc99bb156539 --- /dev/null +++ b/ChromeDevTools/Protocol/Network/SetMonitoringXHREnabledCommandResponse.cs @@ -0,0 +1,13 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Network +{ + /// <summary> + /// Toggles monitoring of XMLHttpRequest. If <code>true</code>, console will receive messages upon each XHR issued. + /// </summary> + [CommandResponse(ProtocolName.Network.SetMonitoringXHREnabled)] + public class SetMonitoringXHREnabledCommandResponse + { + } +} diff --git a/ChromeDevTools/Protocol/Network/SetUserAgentOverrideCommand.cs b/ChromeDevTools/Protocol/Network/SetUserAgentOverrideCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..3ca521edbf43ee3dde43f7d0f15e36d9491fbfbe --- /dev/null +++ b/ChromeDevTools/Protocol/Network/SetUserAgentOverrideCommand.cs @@ -0,0 +1,17 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Network +{ + /// <summary> + /// Allows overriding user agent with the given string. + /// </summary> + [Command(ProtocolName.Network.SetUserAgentOverride)] + public class SetUserAgentOverrideCommand + { + /// <summary> + /// Gets or sets User agent to use. + /// </summary> + public string UserAgent { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/Network/SetUserAgentOverrideCommandResponse.cs b/ChromeDevTools/Protocol/Network/SetUserAgentOverrideCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..fadc1c878bd0eb6cecfb424448949ed76d01a86c --- /dev/null +++ b/ChromeDevTools/Protocol/Network/SetUserAgentOverrideCommandResponse.cs @@ -0,0 +1,13 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Network +{ + /// <summary> + /// Allows overriding user agent with the given string. + /// </summary> + [CommandResponse(ProtocolName.Network.SetUserAgentOverride)] + public class SetUserAgentOverrideCommandResponse + { + } +} diff --git a/ChromeDevTools/Protocol/Network/WebSocketClosedEvent.cs b/ChromeDevTools/Protocol/Network/WebSocketClosedEvent.cs new file mode 100644 index 0000000000000000000000000000000000000000..3738501b2670f08265c67109441045c8ac068013 --- /dev/null +++ b/ChromeDevTools/Protocol/Network/WebSocketClosedEvent.cs @@ -0,0 +1,20 @@ +using ChromeDevTools; + +namespace ChromeDevTools.Protocol.Network +{ + /// <summary> + /// Fired when WebSocket is closed. + /// </summary> + [Event(ProtocolName.Network.WebSocketClosed)] + public class WebSocketClosedEvent + { + /// <summary> + /// Gets or sets Request identifier. + /// </summary> + public string RequestId { get; set; } + /// <summary> + /// Gets or sets Timestamp. + /// </summary> + public double Timestamp { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/Network/WebSocketCreatedEvent.cs b/ChromeDevTools/Protocol/Network/WebSocketCreatedEvent.cs new file mode 100644 index 0000000000000000000000000000000000000000..b611f952a527f2c4b4bb06c572ffc7a95f10e39b --- /dev/null +++ b/ChromeDevTools/Protocol/Network/WebSocketCreatedEvent.cs @@ -0,0 +1,20 @@ +using ChromeDevTools; + +namespace ChromeDevTools.Protocol.Network +{ + /// <summary> + /// Fired upon WebSocket creation. + /// </summary> + [Event(ProtocolName.Network.WebSocketCreated)] + public class WebSocketCreatedEvent + { + /// <summary> + /// Gets or sets Request identifier. + /// </summary> + public string RequestId { get; set; } + /// <summary> + /// Gets or sets WebSocket request URL. + /// </summary> + public string Url { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/Network/WebSocketFrame.cs b/ChromeDevTools/Protocol/Network/WebSocketFrame.cs new file mode 100644 index 0000000000000000000000000000000000000000..c6260f231bb722e39e1411c48ddce2800aba7f72 --- /dev/null +++ b/ChromeDevTools/Protocol/Network/WebSocketFrame.cs @@ -0,0 +1,24 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Network +{ + /// <summary> + /// WebSocket frame data. + /// </summary> + public class WebSocketFrame + { + /// <summary> + /// Gets or sets WebSocket frame opcode. + /// </summary> + public double Opcode { get; set; } + /// <summary> + /// Gets or sets WebSocke frame mask. + /// </summary> + public bool Mask { get; set; } + /// <summary> + /// Gets or sets WebSocke frame payload data. + /// </summary> + public string PayloadData { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/Network/WebSocketFrameErrorEvent.cs b/ChromeDevTools/Protocol/Network/WebSocketFrameErrorEvent.cs new file mode 100644 index 0000000000000000000000000000000000000000..16e486428a5d9193e0bf0470706815616414b2bf --- /dev/null +++ b/ChromeDevTools/Protocol/Network/WebSocketFrameErrorEvent.cs @@ -0,0 +1,24 @@ +using ChromeDevTools; + +namespace ChromeDevTools.Protocol.Network +{ + /// <summary> + /// Fired when WebSocket frame error occurs. + /// </summary> + [Event(ProtocolName.Network.WebSocketFrameError)] + public class WebSocketFrameErrorEvent + { + /// <summary> + /// Gets or sets Request identifier. + /// </summary> + public string RequestId { get; set; } + /// <summary> + /// Gets or sets Timestamp. + /// </summary> + public double Timestamp { get; set; } + /// <summary> + /// Gets or sets WebSocket frame error message. + /// </summary> + public string ErrorMessage { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/Network/WebSocketFrameReceivedEvent.cs b/ChromeDevTools/Protocol/Network/WebSocketFrameReceivedEvent.cs new file mode 100644 index 0000000000000000000000000000000000000000..6a931bdff000bd9d89683a7648d8118af71a131a --- /dev/null +++ b/ChromeDevTools/Protocol/Network/WebSocketFrameReceivedEvent.cs @@ -0,0 +1,24 @@ +using ChromeDevTools; + +namespace ChromeDevTools.Protocol.Network +{ + /// <summary> + /// Fired when WebSocket frame is received. + /// </summary> + [Event(ProtocolName.Network.WebSocketFrameReceived)] + public class WebSocketFrameReceivedEvent + { + /// <summary> + /// Gets or sets Request identifier. + /// </summary> + public string RequestId { get; set; } + /// <summary> + /// Gets or sets Timestamp. + /// </summary> + public double Timestamp { get; set; } + /// <summary> + /// Gets or sets WebSocket response data. + /// </summary> + public WebSocketFrame Response { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/Network/WebSocketFrameSentEvent.cs b/ChromeDevTools/Protocol/Network/WebSocketFrameSentEvent.cs new file mode 100644 index 0000000000000000000000000000000000000000..8dab548126cc241a86c57e69c89cf49ca72a5705 --- /dev/null +++ b/ChromeDevTools/Protocol/Network/WebSocketFrameSentEvent.cs @@ -0,0 +1,24 @@ +using ChromeDevTools; + +namespace ChromeDevTools.Protocol.Network +{ + /// <summary> + /// Fired when WebSocket frame is sent. + /// </summary> + [Event(ProtocolName.Network.WebSocketFrameSent)] + public class WebSocketFrameSentEvent + { + /// <summary> + /// Gets or sets Request identifier. + /// </summary> + public string RequestId { get; set; } + /// <summary> + /// Gets or sets Timestamp. + /// </summary> + public double Timestamp { get; set; } + /// <summary> + /// Gets or sets WebSocket response data. + /// </summary> + public WebSocketFrame Response { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/Network/WebSocketHandshakeResponseReceivedEvent.cs b/ChromeDevTools/Protocol/Network/WebSocketHandshakeResponseReceivedEvent.cs new file mode 100644 index 0000000000000000000000000000000000000000..03efe8dd18e31094ff8ab6be75263bf088125096 --- /dev/null +++ b/ChromeDevTools/Protocol/Network/WebSocketHandshakeResponseReceivedEvent.cs @@ -0,0 +1,24 @@ +using ChromeDevTools; + +namespace ChromeDevTools.Protocol.Network +{ + /// <summary> + /// Fired when WebSocket handshake response becomes available. + /// </summary> + [Event(ProtocolName.Network.WebSocketHandshakeResponseReceived)] + public class WebSocketHandshakeResponseReceivedEvent + { + /// <summary> + /// Gets or sets Request identifier. + /// </summary> + public string RequestId { get; set; } + /// <summary> + /// Gets or sets Timestamp. + /// </summary> + public double Timestamp { get; set; } + /// <summary> + /// Gets or sets WebSocket response data. + /// </summary> + public WebSocketResponse Response { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/Network/WebSocketRequest.cs b/ChromeDevTools/Protocol/Network/WebSocketRequest.cs new file mode 100644 index 0000000000000000000000000000000000000000..76f4619671a10d5b75fe8dfa71cc33a7e8232ce7 --- /dev/null +++ b/ChromeDevTools/Protocol/Network/WebSocketRequest.cs @@ -0,0 +1,16 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Network +{ + /// <summary> + /// WebSocket request data. + /// </summary> + public class WebSocketRequest + { + /// <summary> + /// Gets or sets HTTP request headers. + /// </summary> + public Dictionary<string, string> Headers { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/Network/WebSocketResponse.cs b/ChromeDevTools/Protocol/Network/WebSocketResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..c7a45d47fdd48f65987ed4b4163b1a2adb0fa39f --- /dev/null +++ b/ChromeDevTools/Protocol/Network/WebSocketResponse.cs @@ -0,0 +1,36 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Network +{ + /// <summary> + /// WebSocket response data. + /// </summary> + public class WebSocketResponse + { + /// <summary> + /// Gets or sets HTTP response status code. + /// </summary> + public double Status { get; set; } + /// <summary> + /// Gets or sets HTTP response status text. + /// </summary> + public string StatusText { get; set; } + /// <summary> + /// Gets or sets HTTP response headers. + /// </summary> + public Dictionary<string, string> Headers { get; set; } + /// <summary> + /// Gets or sets HTTP response headers text. + /// </summary> + public string HeadersText { get; set; } + /// <summary> + /// Gets or sets HTTP request headers. + /// </summary> + public Dictionary<string, string> RequestHeaders { get; set; } + /// <summary> + /// Gets or sets HTTP request headers text. + /// </summary> + public string RequestHeadersText { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/Network/WebSocketWillSendHandshakeRequestEvent.cs b/ChromeDevTools/Protocol/Network/WebSocketWillSendHandshakeRequestEvent.cs new file mode 100644 index 0000000000000000000000000000000000000000..bc20a9184cd1bd30e485f877c6d6f5a95603a3a9 --- /dev/null +++ b/ChromeDevTools/Protocol/Network/WebSocketWillSendHandshakeRequestEvent.cs @@ -0,0 +1,28 @@ +using ChromeDevTools; + +namespace ChromeDevTools.Protocol.Network +{ + /// <summary> + /// Fired when WebSocket is about to initiate handshake. + /// </summary> + [Event(ProtocolName.Network.WebSocketWillSendHandshakeRequest)] + public class WebSocketWillSendHandshakeRequestEvent + { + /// <summary> + /// Gets or sets Request identifier. + /// </summary> + public string RequestId { get; set; } + /// <summary> + /// Gets or sets Timestamp. + /// </summary> + public double Timestamp { get; set; } + /// <summary> + /// Gets or sets UTC Timestamp. + /// </summary> + public double WallTime { get; set; } + /// <summary> + /// Gets or sets WebSocket request data. + /// </summary> + public WebSocketRequest Request { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/Page/AddScriptToEvaluateOnLoadCommand.cs b/ChromeDevTools/Protocol/Page/AddScriptToEvaluateOnLoadCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..2c69dc8fff2e397ca3ae1f95ba0b96db343b9a29 --- /dev/null +++ b/ChromeDevTools/Protocol/Page/AddScriptToEvaluateOnLoadCommand.cs @@ -0,0 +1,14 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Page +{ + [Command(ProtocolName.Page.AddScriptToEvaluateOnLoad)] + public class AddScriptToEvaluateOnLoadCommand + { + /// <summary> + /// Gets or sets ScriptSource + /// </summary> + public string ScriptSource { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/Page/AddScriptToEvaluateOnLoadCommandResponse.cs b/ChromeDevTools/Protocol/Page/AddScriptToEvaluateOnLoadCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..351b6a80775c5aed14c6b6ec938d0011dcbf9129 --- /dev/null +++ b/ChromeDevTools/Protocol/Page/AddScriptToEvaluateOnLoadCommandResponse.cs @@ -0,0 +1,14 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Page +{ + [CommandResponse(ProtocolName.Page.AddScriptToEvaluateOnLoad)] + public class AddScriptToEvaluateOnLoadCommandResponse + { + /// <summary> + /// Gets or sets Identifier of the added script. + /// </summary> + public string Identifier { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/Page/CanScreencastCommand.cs b/ChromeDevTools/Protocol/Page/CanScreencastCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..58ce113b80e694e8499ff8e0016ee350422c1343 --- /dev/null +++ b/ChromeDevTools/Protocol/Page/CanScreencastCommand.cs @@ -0,0 +1,13 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Page +{ + /// <summary> + /// Tells whether screencast is supported. + /// </summary> + [Command(ProtocolName.Page.CanScreencast)] + public class CanScreencastCommand + { + } +} diff --git a/ChromeDevTools/Protocol/Page/CanScreencastCommandResponse.cs b/ChromeDevTools/Protocol/Page/CanScreencastCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..6809d47ee7ddccc12f3400d3a910f9bc0d0f08a5 --- /dev/null +++ b/ChromeDevTools/Protocol/Page/CanScreencastCommandResponse.cs @@ -0,0 +1,17 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Page +{ + /// <summary> + /// Tells whether screencast is supported. + /// </summary> + [CommandResponse(ProtocolName.Page.CanScreencast)] + public class CanScreencastCommandResponse + { + /// <summary> + /// Gets or sets True if screencast is supported. + /// </summary> + public bool Result { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/Page/CaptureScreenshotCommand.cs b/ChromeDevTools/Protocol/Page/CaptureScreenshotCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..f8ba498bf710b526bc216dcf02b009af81b78929 --- /dev/null +++ b/ChromeDevTools/Protocol/Page/CaptureScreenshotCommand.cs @@ -0,0 +1,13 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Page +{ + /// <summary> + /// Capture page screenshot. + /// </summary> + [Command(ProtocolName.Page.CaptureScreenshot)] + public class CaptureScreenshotCommand + { + } +} diff --git a/ChromeDevTools/Protocol/Page/CaptureScreenshotCommandResponse.cs b/ChromeDevTools/Protocol/Page/CaptureScreenshotCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..76f7de3b90000afee3674c3e034a1aefa057dbbd --- /dev/null +++ b/ChromeDevTools/Protocol/Page/CaptureScreenshotCommandResponse.cs @@ -0,0 +1,17 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Page +{ + /// <summary> + /// Capture page screenshot. + /// </summary> + [CommandResponse(ProtocolName.Page.CaptureScreenshot)] + public class CaptureScreenshotCommandResponse + { + /// <summary> + /// Gets or sets Base64-encoded image data (PNG). + /// </summary> + public string Data { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/Page/ClearDeviceMetricsOverrideCommand.cs b/ChromeDevTools/Protocol/Page/ClearDeviceMetricsOverrideCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..d3f29b146800a51f4d3c01bb5c877ac3ca1151e3 --- /dev/null +++ b/ChromeDevTools/Protocol/Page/ClearDeviceMetricsOverrideCommand.cs @@ -0,0 +1,13 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Page +{ + /// <summary> + /// Clears the overriden device metrics. + /// </summary> + [Command(ProtocolName.Page.ClearDeviceMetricsOverride)] + public class ClearDeviceMetricsOverrideCommand + { + } +} diff --git a/ChromeDevTools/Protocol/Page/ClearDeviceMetricsOverrideCommandResponse.cs b/ChromeDevTools/Protocol/Page/ClearDeviceMetricsOverrideCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..bca76371e9a9e5d43303335a8276c54a8f51bf98 --- /dev/null +++ b/ChromeDevTools/Protocol/Page/ClearDeviceMetricsOverrideCommandResponse.cs @@ -0,0 +1,13 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Page +{ + /// <summary> + /// Clears the overriden device metrics. + /// </summary> + [CommandResponse(ProtocolName.Page.ClearDeviceMetricsOverride)] + public class ClearDeviceMetricsOverrideCommandResponse + { + } +} diff --git a/ChromeDevTools/Protocol/Page/ClearDeviceOrientationOverrideCommand.cs b/ChromeDevTools/Protocol/Page/ClearDeviceOrientationOverrideCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..393e81eed025b345c4232ea723ff9c96e32053e4 --- /dev/null +++ b/ChromeDevTools/Protocol/Page/ClearDeviceOrientationOverrideCommand.cs @@ -0,0 +1,13 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Page +{ + /// <summary> + /// Clears the overridden Device Orientation. + /// </summary> + [Command(ProtocolName.Page.ClearDeviceOrientationOverride)] + public class ClearDeviceOrientationOverrideCommand + { + } +} diff --git a/ChromeDevTools/Protocol/Page/ClearDeviceOrientationOverrideCommandResponse.cs b/ChromeDevTools/Protocol/Page/ClearDeviceOrientationOverrideCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..2129e9fef19cdd8f1c5b24b3b3f429fbe3ca06c5 --- /dev/null +++ b/ChromeDevTools/Protocol/Page/ClearDeviceOrientationOverrideCommandResponse.cs @@ -0,0 +1,13 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Page +{ + /// <summary> + /// Clears the overridden Device Orientation. + /// </summary> + [CommandResponse(ProtocolName.Page.ClearDeviceOrientationOverride)] + public class ClearDeviceOrientationOverrideCommandResponse + { + } +} diff --git a/ChromeDevTools/Protocol/Page/ClearGeolocationOverrideCommand.cs b/ChromeDevTools/Protocol/Page/ClearGeolocationOverrideCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..3f2c9d48d3b564e776af1d1e5f1681b18d8b3d76 --- /dev/null +++ b/ChromeDevTools/Protocol/Page/ClearGeolocationOverrideCommand.cs @@ -0,0 +1,13 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Page +{ + /// <summary> + /// Clears the overriden Geolocation Position and Error. + /// </summary> + [Command(ProtocolName.Page.ClearGeolocationOverride)] + public class ClearGeolocationOverrideCommand + { + } +} diff --git a/ChromeDevTools/Protocol/Page/ClearGeolocationOverrideCommandResponse.cs b/ChromeDevTools/Protocol/Page/ClearGeolocationOverrideCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..dcf9f0011ae99936cf8cac0dc06976f0801477a7 --- /dev/null +++ b/ChromeDevTools/Protocol/Page/ClearGeolocationOverrideCommandResponse.cs @@ -0,0 +1,13 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Page +{ + /// <summary> + /// Clears the overriden Geolocation Position and Error. + /// </summary> + [CommandResponse(ProtocolName.Page.ClearGeolocationOverride)] + public class ClearGeolocationOverrideCommandResponse + { + } +} diff --git a/ChromeDevTools/Protocol/Page/ColorPickedEvent.cs b/ChromeDevTools/Protocol/Page/ColorPickedEvent.cs new file mode 100644 index 0000000000000000000000000000000000000000..77c1e04a72a6e89a0322217cab644c8192d8110f --- /dev/null +++ b/ChromeDevTools/Protocol/Page/ColorPickedEvent.cs @@ -0,0 +1,16 @@ +using ChromeDevTools; + +namespace ChromeDevTools.Protocol.Page +{ + /// <summary> + /// Fired when a color has been picked. + /// </summary> + [Event(ProtocolName.Page.ColorPicked)] + public class ColorPickedEvent + { + /// <summary> + /// Gets or sets RGBA of the picked color. + /// </summary> + public DOM.RGBA Color { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/Page/DeleteCookieCommand.cs b/ChromeDevTools/Protocol/Page/DeleteCookieCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..02da38be75da2704305448be43ebd834d118a5b3 --- /dev/null +++ b/ChromeDevTools/Protocol/Page/DeleteCookieCommand.cs @@ -0,0 +1,21 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Page +{ + /// <summary> + /// Deletes browser cookie with given name, domain and path. + /// </summary> + [Command(ProtocolName.Page.DeleteCookie)] + public class DeleteCookieCommand + { + /// <summary> + /// Gets or sets Name of the cookie to remove. + /// </summary> + public string CookieName { get; set; } + /// <summary> + /// Gets or sets URL to match cooke domain and path. + /// </summary> + public string Url { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/Page/DeleteCookieCommandResponse.cs b/ChromeDevTools/Protocol/Page/DeleteCookieCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..e54406b8459b25217c26a6020291b01997719e55 --- /dev/null +++ b/ChromeDevTools/Protocol/Page/DeleteCookieCommandResponse.cs @@ -0,0 +1,13 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Page +{ + /// <summary> + /// Deletes browser cookie with given name, domain and path. + /// </summary> + [CommandResponse(ProtocolName.Page.DeleteCookie)] + public class DeleteCookieCommandResponse + { + } +} diff --git a/ChromeDevTools/Protocol/Page/DisableCommand.cs b/ChromeDevTools/Protocol/Page/DisableCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..94f3a49c1b588bdcd4b6be5c22402cedb2014f6c --- /dev/null +++ b/ChromeDevTools/Protocol/Page/DisableCommand.cs @@ -0,0 +1,13 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Page +{ + /// <summary> + /// Disables page domain notifications. + /// </summary> + [Command(ProtocolName.Page.Disable)] + public class DisableCommand + { + } +} diff --git a/ChromeDevTools/Protocol/Page/DisableCommandResponse.cs b/ChromeDevTools/Protocol/Page/DisableCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..cd81e3d309e882cb880213375b42c185ccfdf567 --- /dev/null +++ b/ChromeDevTools/Protocol/Page/DisableCommandResponse.cs @@ -0,0 +1,13 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Page +{ + /// <summary> + /// Disables page domain notifications. + /// </summary> + [CommandResponse(ProtocolName.Page.Disable)] + public class DisableCommandResponse + { + } +} diff --git a/ChromeDevTools/Protocol/Page/DomContentEventFiredEvent.cs b/ChromeDevTools/Protocol/Page/DomContentEventFiredEvent.cs new file mode 100644 index 0000000000000000000000000000000000000000..da8dad868d0fae2b6135d3350d1603f5f2b37d8a --- /dev/null +++ b/ChromeDevTools/Protocol/Page/DomContentEventFiredEvent.cs @@ -0,0 +1,13 @@ +using ChromeDevTools; + +namespace ChromeDevTools.Protocol.Page +{ + [Event(ProtocolName.Page.DomContentEventFired)] + public class DomContentEventFiredEvent + { + /// <summary> + /// Gets or sets Timestamp + /// </summary> + public double Timestamp { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/Page/EnableCommand.cs b/ChromeDevTools/Protocol/Page/EnableCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..8ee23268e13edb4d8831d14b1d2654118907ea2c --- /dev/null +++ b/ChromeDevTools/Protocol/Page/EnableCommand.cs @@ -0,0 +1,13 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Page +{ + /// <summary> + /// Enables page domain notifications. + /// </summary> + [Command(ProtocolName.Page.Enable)] + public class EnableCommand + { + } +} diff --git a/ChromeDevTools/Protocol/Page/EnableCommandResponse.cs b/ChromeDevTools/Protocol/Page/EnableCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..989bbf736ce141c4939cf586ffaf5cfe0a47c2f6 --- /dev/null +++ b/ChromeDevTools/Protocol/Page/EnableCommandResponse.cs @@ -0,0 +1,13 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Page +{ + /// <summary> + /// Enables page domain notifications. + /// </summary> + [CommandResponse(ProtocolName.Page.Enable)] + public class EnableCommandResponse + { + } +} diff --git a/ChromeDevTools/Protocol/Page/Frame.cs b/ChromeDevTools/Protocol/Page/Frame.cs new file mode 100644 index 0000000000000000000000000000000000000000..1c0935a9a88bbb61bb8bdf3063beea53ff6db4de --- /dev/null +++ b/ChromeDevTools/Protocol/Page/Frame.cs @@ -0,0 +1,40 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Page +{ + /// <summary> + /// Information about the Frame on the page. + /// </summary> + public class Frame + { + /// <summary> + /// Gets or sets Frame unique identifier. + /// </summary> + public string Id { get; set; } + /// <summary> + /// Gets or sets Parent frame identifier. + /// </summary> + public string ParentId { get; set; } + /// <summary> + /// Gets or sets Identifier of the loader associated with this frame. + /// </summary> + public string LoaderId { get; set; } + /// <summary> + /// Gets or sets Frame's name as specified in the tag. + /// </summary> + public string Name { get; set; } + /// <summary> + /// Gets or sets Frame document's URL. + /// </summary> + public string Url { get; set; } + /// <summary> + /// Gets or sets Frame document's security origin. + /// </summary> + public string SecurityOrigin { get; set; } + /// <summary> + /// Gets or sets Frame document's mimeType as determined by the browser. + /// </summary> + public string MimeType { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/Page/FrameAttachedEvent.cs b/ChromeDevTools/Protocol/Page/FrameAttachedEvent.cs new file mode 100644 index 0000000000000000000000000000000000000000..f23c878ac38e1804b1190a620159f4ea402ca530 --- /dev/null +++ b/ChromeDevTools/Protocol/Page/FrameAttachedEvent.cs @@ -0,0 +1,20 @@ +using ChromeDevTools; + +namespace ChromeDevTools.Protocol.Page +{ + /// <summary> + /// Fired when frame has been attached to its parent. + /// </summary> + [Event(ProtocolName.Page.FrameAttached)] + public class FrameAttachedEvent + { + /// <summary> + /// Gets or sets Id of the frame that has been attached. + /// </summary> + public string FrameId { get; set; } + /// <summary> + /// Gets or sets Parent frame identifier. + /// </summary> + public string ParentFrameId { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/Page/FrameClearedScheduledNavigationEvent.cs b/ChromeDevTools/Protocol/Page/FrameClearedScheduledNavigationEvent.cs new file mode 100644 index 0000000000000000000000000000000000000000..7f0ac55f7fbd371796e35e96cfd802f0253ff4c5 --- /dev/null +++ b/ChromeDevTools/Protocol/Page/FrameClearedScheduledNavigationEvent.cs @@ -0,0 +1,16 @@ +using ChromeDevTools; + +namespace ChromeDevTools.Protocol.Page +{ + /// <summary> + /// Fired when frame no longer has a scheduled navigation. + /// </summary> + [Event(ProtocolName.Page.FrameClearedScheduledNavigation)] + public class FrameClearedScheduledNavigationEvent + { + /// <summary> + /// Gets or sets Id of the frame that has cleared its scheduled navigation. + /// </summary> + public string FrameId { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/Page/FrameDetachedEvent.cs b/ChromeDevTools/Protocol/Page/FrameDetachedEvent.cs new file mode 100644 index 0000000000000000000000000000000000000000..111c51078bf50cfa3ccf1ff6e34654c60b3abe3a --- /dev/null +++ b/ChromeDevTools/Protocol/Page/FrameDetachedEvent.cs @@ -0,0 +1,16 @@ +using ChromeDevTools; + +namespace ChromeDevTools.Protocol.Page +{ + /// <summary> + /// Fired when frame has been detached from its parent. + /// </summary> + [Event(ProtocolName.Page.FrameDetached)] + public class FrameDetachedEvent + { + /// <summary> + /// Gets or sets Id of the frame that has been detached. + /// </summary> + public string FrameId { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/Page/FrameNavigatedEvent.cs b/ChromeDevTools/Protocol/Page/FrameNavigatedEvent.cs new file mode 100644 index 0000000000000000000000000000000000000000..f2f0d6432e131591e00b3c1fae2e107147ab31d8 --- /dev/null +++ b/ChromeDevTools/Protocol/Page/FrameNavigatedEvent.cs @@ -0,0 +1,16 @@ +using ChromeDevTools; + +namespace ChromeDevTools.Protocol.Page +{ + /// <summary> + /// Fired once navigation of the frame has completed. Frame is now associated with the new loader. + /// </summary> + [Event(ProtocolName.Page.FrameNavigated)] + public class FrameNavigatedEvent + { + /// <summary> + /// Gets or sets Frame object. + /// </summary> + public Frame Frame { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/Page/FrameResizedEvent.cs b/ChromeDevTools/Protocol/Page/FrameResizedEvent.cs new file mode 100644 index 0000000000000000000000000000000000000000..3285a2e8c0d923696c10b1c6e285e39427c96e58 --- /dev/null +++ b/ChromeDevTools/Protocol/Page/FrameResizedEvent.cs @@ -0,0 +1,9 @@ +using ChromeDevTools; + +namespace ChromeDevTools.Protocol.Page +{ + [Event(ProtocolName.Page.FrameResized)] + public class FrameResizedEvent + { + } +} diff --git a/ChromeDevTools/Protocol/Page/FrameResourceTree.cs b/ChromeDevTools/Protocol/Page/FrameResourceTree.cs new file mode 100644 index 0000000000000000000000000000000000000000..19b10a5bcf393c3246d6a1a63265dbc8cefdab6f --- /dev/null +++ b/ChromeDevTools/Protocol/Page/FrameResourceTree.cs @@ -0,0 +1,48 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Page +{ + /// <summary> + /// Information about the Frame hierarchy along with their cached resources. + /// </summary> + public class FrameResourceTree + { + /// <summary> + /// Gets or sets Frame information for this tree item. + /// </summary> + public Frame Frame { get; set; } + /// <summary> + /// Gets or sets Child frames. + /// </summary> + public FrameResourceTree[] ChildFrames { get; set; } + public class ResourcesArray + { + /// <summary> + /// Gets or sets Resource URL. + /// </summary> + public string Url { get; set; } + /// <summary> + /// Gets or sets Type of this resource. + /// </summary> + public ResourceType Type { get; set; } + /// <summary> + /// Gets or sets Resource mimeType as determined by the browser. + /// </summary> + public string MimeType { get; set; } + /// <summary> + /// Gets or sets True if the resource failed to load. + /// </summary> + public bool Failed { get; set; } + /// <summary> + /// Gets or sets True if the resource was canceled during loading. + /// </summary> + public bool Canceled { get; set; } + } + + /// <summary> + /// Gets or sets Information about frame resources. + /// </summary> + public ResourcesArray[] Resources { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/Page/FrameScheduledNavigationEvent.cs b/ChromeDevTools/Protocol/Page/FrameScheduledNavigationEvent.cs new file mode 100644 index 0000000000000000000000000000000000000000..904e98c2cf7aeb3f972ebdf79bfcbcc3950a9cff --- /dev/null +++ b/ChromeDevTools/Protocol/Page/FrameScheduledNavigationEvent.cs @@ -0,0 +1,20 @@ +using ChromeDevTools; + +namespace ChromeDevTools.Protocol.Page +{ + /// <summary> + /// Fired when frame schedules a potential navigation. + /// </summary> + [Event(ProtocolName.Page.FrameScheduledNavigation)] + public class FrameScheduledNavigationEvent + { + /// <summary> + /// Gets or sets Id of the frame that has scheduled a navigation. + /// </summary> + public string FrameId { get; set; } + /// <summary> + /// Gets or sets Delay (in seconds) until the navigation is scheduled to begin. The navigation is not guaranteed to start. + /// </summary> + public double Delay { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/Page/FrameStartedLoadingEvent.cs b/ChromeDevTools/Protocol/Page/FrameStartedLoadingEvent.cs new file mode 100644 index 0000000000000000000000000000000000000000..cb5c09a20cb4060b8e0ddfe074a5a9ee8847a1ba --- /dev/null +++ b/ChromeDevTools/Protocol/Page/FrameStartedLoadingEvent.cs @@ -0,0 +1,16 @@ +using ChromeDevTools; + +namespace ChromeDevTools.Protocol.Page +{ + /// <summary> + /// Fired when frame has started loading. + /// </summary> + [Event(ProtocolName.Page.FrameStartedLoading)] + public class FrameStartedLoadingEvent + { + /// <summary> + /// Gets or sets Id of the frame that has started loading. + /// </summary> + public string FrameId { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/Page/FrameStoppedLoadingEvent.cs b/ChromeDevTools/Protocol/Page/FrameStoppedLoadingEvent.cs new file mode 100644 index 0000000000000000000000000000000000000000..a9c3f8a39784d8c44c94e4ac6b414c7e43e91317 --- /dev/null +++ b/ChromeDevTools/Protocol/Page/FrameStoppedLoadingEvent.cs @@ -0,0 +1,16 @@ +using ChromeDevTools; + +namespace ChromeDevTools.Protocol.Page +{ + /// <summary> + /// Fired when frame has stopped loading. + /// </summary> + [Event(ProtocolName.Page.FrameStoppedLoading)] + public class FrameStoppedLoadingEvent + { + /// <summary> + /// Gets or sets Id of the frame that has stopped loading. + /// </summary> + public string FrameId { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/Page/GetCookiesCommand.cs b/ChromeDevTools/Protocol/Page/GetCookiesCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..00e27d23bd0294cf4ecabb83ef014ebf441a28ec --- /dev/null +++ b/ChromeDevTools/Protocol/Page/GetCookiesCommand.cs @@ -0,0 +1,13 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Page +{ + /// <summary> + /// Returns all browser cookies. Depending on the backend support, will return detailed cookie information in the <code>cookies</code> field. + /// </summary> + [Command(ProtocolName.Page.GetCookies)] + public class GetCookiesCommand + { + } +} diff --git a/ChromeDevTools/Protocol/Page/GetCookiesCommandResponse.cs b/ChromeDevTools/Protocol/Page/GetCookiesCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..09dfbfb76bb43c55310d6731a3f93c1585d84168 --- /dev/null +++ b/ChromeDevTools/Protocol/Page/GetCookiesCommandResponse.cs @@ -0,0 +1,17 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Page +{ + /// <summary> + /// Returns all browser cookies. Depending on the backend support, will return detailed cookie information in the <code>cookies</code> field. + /// </summary> + [CommandResponse(ProtocolName.Page.GetCookies)] + public class GetCookiesCommandResponse + { + /// <summary> + /// Gets or sets Array of cookie objects. + /// </summary> + public Network.Cookie[] Cookies { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/Page/GetNavigationHistoryCommand.cs b/ChromeDevTools/Protocol/Page/GetNavigationHistoryCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..e9e5ae8d9a5edf18f334f08d90f13d5748c96a9d --- /dev/null +++ b/ChromeDevTools/Protocol/Page/GetNavigationHistoryCommand.cs @@ -0,0 +1,13 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Page +{ + /// <summary> + /// Returns navigation history for the current page. + /// </summary> + [Command(ProtocolName.Page.GetNavigationHistory)] + public class GetNavigationHistoryCommand + { + } +} diff --git a/ChromeDevTools/Protocol/Page/GetNavigationHistoryCommandResponse.cs b/ChromeDevTools/Protocol/Page/GetNavigationHistoryCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..63ff02056df719783fe8ef6c7ee1a24f01a341d1 --- /dev/null +++ b/ChromeDevTools/Protocol/Page/GetNavigationHistoryCommandResponse.cs @@ -0,0 +1,21 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Page +{ + /// <summary> + /// Returns navigation history for the current page. + /// </summary> + [CommandResponse(ProtocolName.Page.GetNavigationHistory)] + public class GetNavigationHistoryCommandResponse + { + /// <summary> + /// Gets or sets Index of the current navigation history entry. + /// </summary> + public long CurrentIndex { get; set; } + /// <summary> + /// Gets or sets Array of navigation history entries. + /// </summary> + public NavigationEntry[] Entries { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/Page/GetResourceContentCommand.cs b/ChromeDevTools/Protocol/Page/GetResourceContentCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..b8574a78fec439a8aeeb6d84b9c125181c7c6ed2 --- /dev/null +++ b/ChromeDevTools/Protocol/Page/GetResourceContentCommand.cs @@ -0,0 +1,21 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Page +{ + /// <summary> + /// Returns content of the given resource. + /// </summary> + [Command(ProtocolName.Page.GetResourceContent)] + public class GetResourceContentCommand + { + /// <summary> + /// Gets or sets Frame id to get resource for. + /// </summary> + public string FrameId { get; set; } + /// <summary> + /// Gets or sets URL of the resource to get content for. + /// </summary> + public string Url { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/Page/GetResourceContentCommandResponse.cs b/ChromeDevTools/Protocol/Page/GetResourceContentCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..e8ffce5f5d0726dc272e1ef84a3e36e439f3b0a6 --- /dev/null +++ b/ChromeDevTools/Protocol/Page/GetResourceContentCommandResponse.cs @@ -0,0 +1,21 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Page +{ + /// <summary> + /// Returns content of the given resource. + /// </summary> + [CommandResponse(ProtocolName.Page.GetResourceContent)] + public class GetResourceContentCommandResponse + { + /// <summary> + /// Gets or sets Resource content. + /// </summary> + public string Content { get; set; } + /// <summary> + /// Gets or sets True, if content was served as base64. + /// </summary> + public bool Base64Encoded { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/Page/GetResourceTreeCommand.cs b/ChromeDevTools/Protocol/Page/GetResourceTreeCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..a4a1251b6204f7adda9effd25e078667103a77c0 --- /dev/null +++ b/ChromeDevTools/Protocol/Page/GetResourceTreeCommand.cs @@ -0,0 +1,13 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Page +{ + /// <summary> + /// Returns present frame / resource tree structure. + /// </summary> + [Command(ProtocolName.Page.GetResourceTree)] + public class GetResourceTreeCommand + { + } +} diff --git a/ChromeDevTools/Protocol/Page/GetResourceTreeCommandResponse.cs b/ChromeDevTools/Protocol/Page/GetResourceTreeCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..3b0d921f1f2e741feb0ba5c961086fd46b17b981 --- /dev/null +++ b/ChromeDevTools/Protocol/Page/GetResourceTreeCommandResponse.cs @@ -0,0 +1,17 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Page +{ + /// <summary> + /// Returns present frame / resource tree structure. + /// </summary> + [CommandResponse(ProtocolName.Page.GetResourceTree)] + public class GetResourceTreeCommandResponse + { + /// <summary> + /// Gets or sets Present frame / resource tree structure. + /// </summary> + public FrameResourceTree FrameTree { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/Page/HandleJavaScriptDialogCommand.cs b/ChromeDevTools/Protocol/Page/HandleJavaScriptDialogCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..7d4a2a93c89be859ec3a193e2544165e286b4ab9 --- /dev/null +++ b/ChromeDevTools/Protocol/Page/HandleJavaScriptDialogCommand.cs @@ -0,0 +1,21 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Page +{ + /// <summary> + /// Accepts or dismisses a JavaScript initiated dialog (alert, confirm, prompt, or onbeforeunload). + /// </summary> + [Command(ProtocolName.Page.HandleJavaScriptDialog)] + public class HandleJavaScriptDialogCommand + { + /// <summary> + /// Gets or sets Whether to accept or dismiss the dialog. + /// </summary> + public bool Accept { get; set; } + /// <summary> + /// Gets or sets The text to enter into the dialog prompt before accepting. Used only if this is a prompt dialog. + /// </summary> + public string PromptText { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/Page/HandleJavaScriptDialogCommandResponse.cs b/ChromeDevTools/Protocol/Page/HandleJavaScriptDialogCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..19156fbda24fb746781a6bd1c55dc25b60390be5 --- /dev/null +++ b/ChromeDevTools/Protocol/Page/HandleJavaScriptDialogCommandResponse.cs @@ -0,0 +1,13 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Page +{ + /// <summary> + /// Accepts or dismisses a JavaScript initiated dialog (alert, confirm, prompt, or onbeforeunload). + /// </summary> + [CommandResponse(ProtocolName.Page.HandleJavaScriptDialog)] + public class HandleJavaScriptDialogCommandResponse + { + } +} diff --git a/ChromeDevTools/Protocol/Page/InterstitialHiddenEvent.cs b/ChromeDevTools/Protocol/Page/InterstitialHiddenEvent.cs new file mode 100644 index 0000000000000000000000000000000000000000..254962e8881b9c8c7f53dcb1023e6d0538ab79b9 --- /dev/null +++ b/ChromeDevTools/Protocol/Page/InterstitialHiddenEvent.cs @@ -0,0 +1,12 @@ +using ChromeDevTools; + +namespace ChromeDevTools.Protocol.Page +{ + /// <summary> + /// Fired when interstitial page was hidden + /// </summary> + [Event(ProtocolName.Page.InterstitialHidden)] + public class InterstitialHiddenEvent + { + } +} diff --git a/ChromeDevTools/Protocol/Page/InterstitialShownEvent.cs b/ChromeDevTools/Protocol/Page/InterstitialShownEvent.cs new file mode 100644 index 0000000000000000000000000000000000000000..f0b53854828a4df01a9ec345964e284b95ed5325 --- /dev/null +++ b/ChromeDevTools/Protocol/Page/InterstitialShownEvent.cs @@ -0,0 +1,12 @@ +using ChromeDevTools; + +namespace ChromeDevTools.Protocol.Page +{ + /// <summary> + /// Fired when interstitial page was shown + /// </summary> + [Event(ProtocolName.Page.InterstitialShown)] + public class InterstitialShownEvent + { + } +} diff --git a/ChromeDevTools/Protocol/Page/JavascriptDialogClosedEvent.cs b/ChromeDevTools/Protocol/Page/JavascriptDialogClosedEvent.cs new file mode 100644 index 0000000000000000000000000000000000000000..72498e02cd910e8518fc299029f4d5ed7681858c --- /dev/null +++ b/ChromeDevTools/Protocol/Page/JavascriptDialogClosedEvent.cs @@ -0,0 +1,12 @@ +using ChromeDevTools; + +namespace ChromeDevTools.Protocol.Page +{ + /// <summary> + /// Fired when a JavaScript initiated dialog (alert, confirm, prompt, or onbeforeunload) has been closed. + /// </summary> + [Event(ProtocolName.Page.JavascriptDialogClosed)] + public class JavascriptDialogClosedEvent + { + } +} diff --git a/ChromeDevTools/Protocol/Page/JavascriptDialogOpeningEvent.cs b/ChromeDevTools/Protocol/Page/JavascriptDialogOpeningEvent.cs new file mode 100644 index 0000000000000000000000000000000000000000..a22bab192eefa3d9f018ca3145b88a4a42cac19d --- /dev/null +++ b/ChromeDevTools/Protocol/Page/JavascriptDialogOpeningEvent.cs @@ -0,0 +1,16 @@ +using ChromeDevTools; + +namespace ChromeDevTools.Protocol.Page +{ + /// <summary> + /// Fired when a JavaScript initiated dialog (alert, confirm, prompt, or onbeforeunload) is about to open. + /// </summary> + [Event(ProtocolName.Page.JavascriptDialogOpening)] + public class JavascriptDialogOpeningEvent + { + /// <summary> + /// Gets or sets Message that will be displayed by the dialog. + /// </summary> + public string Message { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/Page/LoadEventFiredEvent.cs b/ChromeDevTools/Protocol/Page/LoadEventFiredEvent.cs new file mode 100644 index 0000000000000000000000000000000000000000..0e74b8d17a95fec300d8db4569fac2b8c38c0094 --- /dev/null +++ b/ChromeDevTools/Protocol/Page/LoadEventFiredEvent.cs @@ -0,0 +1,13 @@ +using ChromeDevTools; + +namespace ChromeDevTools.Protocol.Page +{ + [Event(ProtocolName.Page.LoadEventFired)] + public class LoadEventFiredEvent + { + /// <summary> + /// Gets or sets Timestamp + /// </summary> + public double Timestamp { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/Page/NavigateCommand.cs b/ChromeDevTools/Protocol/Page/NavigateCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..3cb57d5427d622f8ee9ac6aa20adf8e7f20ecd07 --- /dev/null +++ b/ChromeDevTools/Protocol/Page/NavigateCommand.cs @@ -0,0 +1,17 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Page +{ + /// <summary> + /// Navigates current page to the given URL. + /// </summary> + [Command(ProtocolName.Page.Navigate)] + public class NavigateCommand + { + /// <summary> + /// Gets or sets URL to navigate the page to. + /// </summary> + public string Url { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/Page/NavigateCommandResponse.cs b/ChromeDevTools/Protocol/Page/NavigateCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..d925fbff630de2291f2b2bb5282b8a8f0a2a1355 --- /dev/null +++ b/ChromeDevTools/Protocol/Page/NavigateCommandResponse.cs @@ -0,0 +1,17 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Page +{ + /// <summary> + /// Navigates current page to the given URL. + /// </summary> + [CommandResponse(ProtocolName.Page.Navigate)] + public class NavigateCommandResponse + { + /// <summary> + /// Gets or sets Frame id that will be navigated. + /// </summary> + public string FrameId { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/Page/NavigateToHistoryEntryCommand.cs b/ChromeDevTools/Protocol/Page/NavigateToHistoryEntryCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..6654451ae9b772a2a90ed91ed7f45bd2b887a9cf --- /dev/null +++ b/ChromeDevTools/Protocol/Page/NavigateToHistoryEntryCommand.cs @@ -0,0 +1,17 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Page +{ + /// <summary> + /// Navigates current page to the given history entry. + /// </summary> + [Command(ProtocolName.Page.NavigateToHistoryEntry)] + public class NavigateToHistoryEntryCommand + { + /// <summary> + /// Gets or sets Unique id of the entry to navigate to. + /// </summary> + public long EntryId { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/Page/NavigateToHistoryEntryCommandResponse.cs b/ChromeDevTools/Protocol/Page/NavigateToHistoryEntryCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..f1727b032b2a5e25f0b5f26481ffad6b6255749d --- /dev/null +++ b/ChromeDevTools/Protocol/Page/NavigateToHistoryEntryCommandResponse.cs @@ -0,0 +1,13 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Page +{ + /// <summary> + /// Navigates current page to the given history entry. + /// </summary> + [CommandResponse(ProtocolName.Page.NavigateToHistoryEntry)] + public class NavigateToHistoryEntryCommandResponse + { + } +} diff --git a/ChromeDevTools/Protocol/Page/NavigationEntry.cs b/ChromeDevTools/Protocol/Page/NavigationEntry.cs new file mode 100644 index 0000000000000000000000000000000000000000..51f4acd162f8fd3422f2cbcf59dbefb3d20a2a20 --- /dev/null +++ b/ChromeDevTools/Protocol/Page/NavigationEntry.cs @@ -0,0 +1,24 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Page +{ + /// <summary> + /// Navigation history entry. + /// </summary> + public class NavigationEntry + { + /// <summary> + /// Gets or sets Unique id of the navigation history entry. + /// </summary> + public long Id { get; set; } + /// <summary> + /// Gets or sets URL of the navigation history entry. + /// </summary> + public string Url { get; set; } + /// <summary> + /// Gets or sets Title of the navigation history entry. + /// </summary> + public string Title { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/Page/ReloadCommand.cs b/ChromeDevTools/Protocol/Page/ReloadCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..8ada3232a2ab8a7cd5349905fea6db40fd3936e7 --- /dev/null +++ b/ChromeDevTools/Protocol/Page/ReloadCommand.cs @@ -0,0 +1,21 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Page +{ + /// <summary> + /// Reloads given page optionally ignoring the cache. + /// </summary> + [Command(ProtocolName.Page.Reload)] + public class ReloadCommand + { + /// <summary> + /// Gets or sets If true, browser cache is ignored (as if the user pressed Shift+refresh). + /// </summary> + public bool IgnoreCache { get; set; } + /// <summary> + /// Gets or sets If set, the script will be injected into all frames of the inspected page after reload. + /// </summary> + public string ScriptToEvaluateOnLoad { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/Page/ReloadCommandResponse.cs b/ChromeDevTools/Protocol/Page/ReloadCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..a548429d17e0d556cb127b31291ace6111a7c4d4 --- /dev/null +++ b/ChromeDevTools/Protocol/Page/ReloadCommandResponse.cs @@ -0,0 +1,13 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Page +{ + /// <summary> + /// Reloads given page optionally ignoring the cache. + /// </summary> + [CommandResponse(ProtocolName.Page.Reload)] + public class ReloadCommandResponse + { + } +} diff --git a/ChromeDevTools/Protocol/Page/RemoveScriptToEvaluateOnLoadCommand.cs b/ChromeDevTools/Protocol/Page/RemoveScriptToEvaluateOnLoadCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..1de863b29b14d49159123ee09b62577791e36180 --- /dev/null +++ b/ChromeDevTools/Protocol/Page/RemoveScriptToEvaluateOnLoadCommand.cs @@ -0,0 +1,14 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Page +{ + [Command(ProtocolName.Page.RemoveScriptToEvaluateOnLoad)] + public class RemoveScriptToEvaluateOnLoadCommand + { + /// <summary> + /// Gets or sets Identifier + /// </summary> + public string Identifier { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/Page/RemoveScriptToEvaluateOnLoadCommandResponse.cs b/ChromeDevTools/Protocol/Page/RemoveScriptToEvaluateOnLoadCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..919496e32285fc4d83c41bd64733b7b224b380a2 --- /dev/null +++ b/ChromeDevTools/Protocol/Page/RemoveScriptToEvaluateOnLoadCommandResponse.cs @@ -0,0 +1,10 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Page +{ + [CommandResponse(ProtocolName.Page.RemoveScriptToEvaluateOnLoad)] + public class RemoveScriptToEvaluateOnLoadCommandResponse + { + } +} diff --git a/ChromeDevTools/Protocol/Page/ResourceType.cs b/ChromeDevTools/Protocol/Page/ResourceType.cs new file mode 100644 index 0000000000000000000000000000000000000000..cb4b2e1cc2a3be5bf2af288f89d47da02e920a3c --- /dev/null +++ b/ChromeDevTools/Protocol/Page/ResourceType.cs @@ -0,0 +1,20 @@ +using ChromeDevTools; + +namespace ChromeDevTools.Protocol.Page{ + /// <summary> + /// Resource type as it was perceived by the rendering engine. + /// </summary> + public enum ResourceType + { + Document, + Stylesheet, + Image, + Media, + Font, + Script, + TextTrack, + XHR, + WebSocket, + Other, + } +} diff --git a/ChromeDevTools/Protocol/Page/ScreencastFrameAckCommand.cs b/ChromeDevTools/Protocol/Page/ScreencastFrameAckCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..e10b192215b7755b63d2554dd15335390585985f --- /dev/null +++ b/ChromeDevTools/Protocol/Page/ScreencastFrameAckCommand.cs @@ -0,0 +1,17 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Page +{ + /// <summary> + /// Acknowledges that a screencast frame has been received by the frontend. + /// </summary> + [Command(ProtocolName.Page.ScreencastFrameAck)] + public class ScreencastFrameAckCommand + { + /// <summary> + /// Gets or sets Frame number. + /// </summary> + public long FrameNumber { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/Page/ScreencastFrameAckCommandResponse.cs b/ChromeDevTools/Protocol/Page/ScreencastFrameAckCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..d40cff121a344fbc35e1ea7b8e521ee290921fd8 --- /dev/null +++ b/ChromeDevTools/Protocol/Page/ScreencastFrameAckCommandResponse.cs @@ -0,0 +1,13 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Page +{ + /// <summary> + /// Acknowledges that a screencast frame has been received by the frontend. + /// </summary> + [CommandResponse(ProtocolName.Page.ScreencastFrameAck)] + public class ScreencastFrameAckCommandResponse + { + } +} diff --git a/ChromeDevTools/Protocol/Page/ScreencastFrameEvent.cs b/ChromeDevTools/Protocol/Page/ScreencastFrameEvent.cs new file mode 100644 index 0000000000000000000000000000000000000000..d4b7f8b4cd2e37c5326c5e841f0b8911fdd00c62 --- /dev/null +++ b/ChromeDevTools/Protocol/Page/ScreencastFrameEvent.cs @@ -0,0 +1,24 @@ +using ChromeDevTools; + +namespace ChromeDevTools.Protocol.Page +{ + /// <summary> + /// Compressed image data requested by the <code>startScreencast</code>. + /// </summary> + [Event(ProtocolName.Page.ScreencastFrame)] + public class ScreencastFrameEvent + { + /// <summary> + /// Gets or sets Base64-encoded compressed image. + /// </summary> + public string Data { get; set; } + /// <summary> + /// Gets or sets Screencast frame metadata. + /// </summary> + public ScreencastFrameMetadata Metadata { get; set; } + /// <summary> + /// Gets or sets Frame number. + /// </summary> + public long FrameNumber { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/Page/ScreencastFrameMetadata.cs b/ChromeDevTools/Protocol/Page/ScreencastFrameMetadata.cs new file mode 100644 index 0000000000000000000000000000000000000000..ebc8abd50f30efeb09248792eea16104c3a740c1 --- /dev/null +++ b/ChromeDevTools/Protocol/Page/ScreencastFrameMetadata.cs @@ -0,0 +1,40 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Page +{ + /// <summary> + /// Screencast frame metadata + /// </summary> + public class ScreencastFrameMetadata + { + /// <summary> + /// Gets or sets Top offset in DIP. + /// </summary> + public double OffsetTop { get; set; } + /// <summary> + /// Gets or sets Page scale factor. + /// </summary> + public double PageScaleFactor { get; set; } + /// <summary> + /// Gets or sets Device screen width in DIP. + /// </summary> + public double DeviceWidth { get; set; } + /// <summary> + /// Gets or sets Device screen height in DIP. + /// </summary> + public double DeviceHeight { get; set; } + /// <summary> + /// Gets or sets Position of horizontal scroll in CSS pixels. + /// </summary> + public double ScrollOffsetX { get; set; } + /// <summary> + /// Gets or sets Position of vertical scroll in CSS pixels. + /// </summary> + public double ScrollOffsetY { get; set; } + /// <summary> + /// Gets or sets Frame swap timestamp. + /// </summary> + public double Timestamp { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/Page/ScreencastVisibilityChangedEvent.cs b/ChromeDevTools/Protocol/Page/ScreencastVisibilityChangedEvent.cs new file mode 100644 index 0000000000000000000000000000000000000000..913097390e0eb46f7bac5244e82fafbe24926e45 --- /dev/null +++ b/ChromeDevTools/Protocol/Page/ScreencastVisibilityChangedEvent.cs @@ -0,0 +1,16 @@ +using ChromeDevTools; + +namespace ChromeDevTools.Protocol.Page +{ + /// <summary> + /// Fired when the page with currently enabled screencast was shown or hidden </code>. + /// </summary> + [Event(ProtocolName.Page.ScreencastVisibilityChanged)] + public class ScreencastVisibilityChangedEvent + { + /// <summary> + /// Gets or sets True if the page is visible. + /// </summary> + public bool Visible { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/Page/SearchInResourceCommand.cs b/ChromeDevTools/Protocol/Page/SearchInResourceCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..d74f4e97ed860b23413eed08b1515b882c33eafb --- /dev/null +++ b/ChromeDevTools/Protocol/Page/SearchInResourceCommand.cs @@ -0,0 +1,33 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Page +{ + /// <summary> + /// Searches for given string in resource content. + /// </summary> + [Command(ProtocolName.Page.SearchInResource)] + public class SearchInResourceCommand + { + /// <summary> + /// Gets or sets Frame id for resource to search in. + /// </summary> + public string FrameId { get; set; } + /// <summary> + /// Gets or sets URL of the resource to search in. + /// </summary> + public string Url { get; set; } + /// <summary> + /// Gets or sets String to search for. + /// </summary> + public string Query { get; set; } + /// <summary> + /// Gets or sets If true, search is case sensitive. + /// </summary> + public bool CaseSensitive { get; set; } + /// <summary> + /// Gets or sets If true, treats string parameter as regex. + /// </summary> + public bool IsRegex { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/Page/SearchInResourceCommandResponse.cs b/ChromeDevTools/Protocol/Page/SearchInResourceCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..47ed86eb5aa69fa49857e83d12c84a6e42e01153 --- /dev/null +++ b/ChromeDevTools/Protocol/Page/SearchInResourceCommandResponse.cs @@ -0,0 +1,17 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Page +{ + /// <summary> + /// Searches for given string in resource content. + /// </summary> + [CommandResponse(ProtocolName.Page.SearchInResource)] + public class SearchInResourceCommandResponse + { + /// <summary> + /// Gets or sets List of search matches. + /// </summary> + public Debugger.SearchMatch[] Result { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/Page/SetColorPickerEnabledCommand.cs b/ChromeDevTools/Protocol/Page/SetColorPickerEnabledCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..48ae953604cce54a21650a578dbb067147809a91 --- /dev/null +++ b/ChromeDevTools/Protocol/Page/SetColorPickerEnabledCommand.cs @@ -0,0 +1,17 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Page +{ + /// <summary> + /// Shows / hides color picker + /// </summary> + [Command(ProtocolName.Page.SetColorPickerEnabled)] + public class SetColorPickerEnabledCommand + { + /// <summary> + /// Gets or sets Shows / hides color picker + /// </summary> + public bool Enabled { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/Page/SetColorPickerEnabledCommandResponse.cs b/ChromeDevTools/Protocol/Page/SetColorPickerEnabledCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..1387a822cee86b03d0d45700731e70f4bc611135 --- /dev/null +++ b/ChromeDevTools/Protocol/Page/SetColorPickerEnabledCommandResponse.cs @@ -0,0 +1,13 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Page +{ + /// <summary> + /// Shows / hides color picker + /// </summary> + [CommandResponse(ProtocolName.Page.SetColorPickerEnabled)] + public class SetColorPickerEnabledCommandResponse + { + } +} diff --git a/ChromeDevTools/Protocol/Page/SetDeviceMetricsOverrideCommand.cs b/ChromeDevTools/Protocol/Page/SetDeviceMetricsOverrideCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..a1a293c10cacf5b6461e4d2a1246c61482f67338 --- /dev/null +++ b/ChromeDevTools/Protocol/Page/SetDeviceMetricsOverrideCommand.cs @@ -0,0 +1,45 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Page +{ + /// <summary> + /// Overrides the values of device screen dimensions (window.screen.width, window.screen.height, window.innerWidth, window.innerHeight, and "device-width"/"device-height"-related CSS media query results). + /// </summary> + [Command(ProtocolName.Page.SetDeviceMetricsOverride)] + public class SetDeviceMetricsOverrideCommand + { + /// <summary> + /// Gets or sets Overriding width value in pixels (minimum 0, maximum 10000000). 0 disables the override. + /// </summary> + public long Width { get; set; } + /// <summary> + /// Gets or sets Overriding height value in pixels (minimum 0, maximum 10000000). 0 disables the override. + /// </summary> + public long Height { get; set; } + /// <summary> + /// Gets or sets Overriding device scale factor value. 0 disables the override. + /// </summary> + public double DeviceScaleFactor { get; set; } + /// <summary> + /// Gets or sets Whether to emulate mobile device. This includes viewport meta tag, overlay scrollbars, text autosizing and more. + /// </summary> + public bool Mobile { get; set; } + /// <summary> + /// Gets or sets Whether a view that exceeds the available browser window area should be scaled down to fit. + /// </summary> + public bool FitWindow { get; set; } + /// <summary> + /// Gets or sets Scale to apply to resulting view image. Ignored in |fitWindow| mode. + /// </summary> + public double Scale { get; set; } + /// <summary> + /// Gets or sets X offset to shift resulting view image by. Ignored in |fitWindow| mode. + /// </summary> + public double OffsetX { get; set; } + /// <summary> + /// Gets or sets Y offset to shift resulting view image by. Ignored in |fitWindow| mode. + /// </summary> + public double OffsetY { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/Page/SetDeviceMetricsOverrideCommandResponse.cs b/ChromeDevTools/Protocol/Page/SetDeviceMetricsOverrideCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..081edab4a3756a7d663d453a22bb2824c780465a --- /dev/null +++ b/ChromeDevTools/Protocol/Page/SetDeviceMetricsOverrideCommandResponse.cs @@ -0,0 +1,13 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Page +{ + /// <summary> + /// Overrides the values of device screen dimensions (window.screen.width, window.screen.height, window.innerWidth, window.innerHeight, and "device-width"/"device-height"-related CSS media query results). + /// </summary> + [CommandResponse(ProtocolName.Page.SetDeviceMetricsOverride)] + public class SetDeviceMetricsOverrideCommandResponse + { + } +} diff --git a/ChromeDevTools/Protocol/Page/SetDeviceOrientationOverrideCommand.cs b/ChromeDevTools/Protocol/Page/SetDeviceOrientationOverrideCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..936bf386ea220530c1f350c23c26c532dc1a2200 --- /dev/null +++ b/ChromeDevTools/Protocol/Page/SetDeviceOrientationOverrideCommand.cs @@ -0,0 +1,25 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Page +{ + /// <summary> + /// Overrides the Device Orientation. + /// </summary> + [Command(ProtocolName.Page.SetDeviceOrientationOverride)] + public class SetDeviceOrientationOverrideCommand + { + /// <summary> + /// Gets or sets Mock alpha + /// </summary> + public double Alpha { get; set; } + /// <summary> + /// Gets or sets Mock beta + /// </summary> + public double Beta { get; set; } + /// <summary> + /// Gets or sets Mock gamma + /// </summary> + public double Gamma { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/Page/SetDeviceOrientationOverrideCommandResponse.cs b/ChromeDevTools/Protocol/Page/SetDeviceOrientationOverrideCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..1084180c75213535852622aee79893e33dbf08fe --- /dev/null +++ b/ChromeDevTools/Protocol/Page/SetDeviceOrientationOverrideCommandResponse.cs @@ -0,0 +1,13 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Page +{ + /// <summary> + /// Overrides the Device Orientation. + /// </summary> + [CommandResponse(ProtocolName.Page.SetDeviceOrientationOverride)] + public class SetDeviceOrientationOverrideCommandResponse + { + } +} diff --git a/ChromeDevTools/Protocol/Page/SetDocumentContentCommand.cs b/ChromeDevTools/Protocol/Page/SetDocumentContentCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..5f3fdbb648f6399c4c42e7070f82f3bbde28c19d --- /dev/null +++ b/ChromeDevTools/Protocol/Page/SetDocumentContentCommand.cs @@ -0,0 +1,21 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Page +{ + /// <summary> + /// Sets given markup as the document's HTML. + /// </summary> + [Command(ProtocolName.Page.SetDocumentContent)] + public class SetDocumentContentCommand + { + /// <summary> + /// Gets or sets Frame id to set HTML for. + /// </summary> + public string FrameId { get; set; } + /// <summary> + /// Gets or sets HTML content to set. + /// </summary> + public string Html { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/Page/SetDocumentContentCommandResponse.cs b/ChromeDevTools/Protocol/Page/SetDocumentContentCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..8a83d788044343e94196694b7b8e5edf2498ed6c --- /dev/null +++ b/ChromeDevTools/Protocol/Page/SetDocumentContentCommandResponse.cs @@ -0,0 +1,13 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Page +{ + /// <summary> + /// Sets given markup as the document's HTML. + /// </summary> + [CommandResponse(ProtocolName.Page.SetDocumentContent)] + public class SetDocumentContentCommandResponse + { + } +} diff --git a/ChromeDevTools/Protocol/Page/SetGeolocationOverrideCommand.cs b/ChromeDevTools/Protocol/Page/SetGeolocationOverrideCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..ccbe43f970efd185b71e86fadfd7748d2de78fee --- /dev/null +++ b/ChromeDevTools/Protocol/Page/SetGeolocationOverrideCommand.cs @@ -0,0 +1,25 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Page +{ + /// <summary> + /// Overrides the Geolocation Position or Error. Omitting any of the parameters emulates position unavailable. + /// </summary> + [Command(ProtocolName.Page.SetGeolocationOverride)] + public class SetGeolocationOverrideCommand + { + /// <summary> + /// Gets or sets Mock latitude + /// </summary> + public double Latitude { get; set; } + /// <summary> + /// Gets or sets Mock longitude + /// </summary> + public double Longitude { get; set; } + /// <summary> + /// Gets or sets Mock accuracy + /// </summary> + public double Accuracy { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/Page/SetGeolocationOverrideCommandResponse.cs b/ChromeDevTools/Protocol/Page/SetGeolocationOverrideCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..e3f5ed2f6780128a83b8baccd47d3ae7ed1212d1 --- /dev/null +++ b/ChromeDevTools/Protocol/Page/SetGeolocationOverrideCommandResponse.cs @@ -0,0 +1,13 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Page +{ + /// <summary> + /// Overrides the Geolocation Position or Error. Omitting any of the parameters emulates position unavailable. + /// </summary> + [CommandResponse(ProtocolName.Page.SetGeolocationOverride)] + public class SetGeolocationOverrideCommandResponse + { + } +} diff --git a/ChromeDevTools/Protocol/Page/SetOverlayMessageCommand.cs b/ChromeDevTools/Protocol/Page/SetOverlayMessageCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..c188adce58fbb94032a0173b20a1376c8ad4f823 --- /dev/null +++ b/ChromeDevTools/Protocol/Page/SetOverlayMessageCommand.cs @@ -0,0 +1,17 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Page +{ + /// <summary> + /// Sets overlay message. + /// </summary> + [Command(ProtocolName.Page.SetOverlayMessage)] + public class SetOverlayMessageCommand + { + /// <summary> + /// Gets or sets Overlay message to display when paused in debugger. + /// </summary> + public string Message { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/Page/SetOverlayMessageCommandResponse.cs b/ChromeDevTools/Protocol/Page/SetOverlayMessageCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..215707aa920956aa40a5272bf16eedd6575f28a1 --- /dev/null +++ b/ChromeDevTools/Protocol/Page/SetOverlayMessageCommandResponse.cs @@ -0,0 +1,13 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Page +{ + /// <summary> + /// Sets overlay message. + /// </summary> + [CommandResponse(ProtocolName.Page.SetOverlayMessage)] + public class SetOverlayMessageCommandResponse + { + } +} diff --git a/ChromeDevTools/Protocol/Page/SetShowViewportSizeOnResizeCommand.cs b/ChromeDevTools/Protocol/Page/SetShowViewportSizeOnResizeCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..3d0578787f8ca0b081eb49f9a2fc856bb0c855ee --- /dev/null +++ b/ChromeDevTools/Protocol/Page/SetShowViewportSizeOnResizeCommand.cs @@ -0,0 +1,21 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Page +{ + /// <summary> + /// Paints viewport size upon main frame resize. + /// </summary> + [Command(ProtocolName.Page.SetShowViewportSizeOnResize)] + public class SetShowViewportSizeOnResizeCommand + { + /// <summary> + /// Gets or sets Whether to paint size or not. + /// </summary> + public bool Show { get; set; } + /// <summary> + /// Gets or sets Whether to paint grid as well. + /// </summary> + public bool ShowGrid { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/Page/SetShowViewportSizeOnResizeCommandResponse.cs b/ChromeDevTools/Protocol/Page/SetShowViewportSizeOnResizeCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..81af57f3cb565b2f6b71d63e3fa0b32053bdf440 --- /dev/null +++ b/ChromeDevTools/Protocol/Page/SetShowViewportSizeOnResizeCommandResponse.cs @@ -0,0 +1,13 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Page +{ + /// <summary> + /// Paints viewport size upon main frame resize. + /// </summary> + [CommandResponse(ProtocolName.Page.SetShowViewportSizeOnResize)] + public class SetShowViewportSizeOnResizeCommandResponse + { + } +} diff --git a/ChromeDevTools/Protocol/Page/SetTouchEmulationEnabledCommand.cs b/ChromeDevTools/Protocol/Page/SetTouchEmulationEnabledCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..8fc0b4a51631eae5b0f1ba1a5aef5d150b107784 --- /dev/null +++ b/ChromeDevTools/Protocol/Page/SetTouchEmulationEnabledCommand.cs @@ -0,0 +1,21 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Page +{ + /// <summary> + /// Toggles mouse event-based touch event emulation. + /// </summary> + [Command(ProtocolName.Page.SetTouchEmulationEnabled)] + public class SetTouchEmulationEnabledCommand + { + /// <summary> + /// Gets or sets Whether the touch event emulation should be enabled. + /// </summary> + public bool Enabled { get; set; } + /// <summary> + /// Gets or sets Touch/gesture events configuration. Default: current platform. + /// </summary> + public string Configuration { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/Page/SetTouchEmulationEnabledCommandResponse.cs b/ChromeDevTools/Protocol/Page/SetTouchEmulationEnabledCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..0c84b26e4f16cf5862ac4500f01991ed8754649d --- /dev/null +++ b/ChromeDevTools/Protocol/Page/SetTouchEmulationEnabledCommandResponse.cs @@ -0,0 +1,13 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Page +{ + /// <summary> + /// Toggles mouse event-based touch event emulation. + /// </summary> + [CommandResponse(ProtocolName.Page.SetTouchEmulationEnabled)] + public class SetTouchEmulationEnabledCommandResponse + { + } +} diff --git a/ChromeDevTools/Protocol/Page/StartScreencastCommand.cs b/ChromeDevTools/Protocol/Page/StartScreencastCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..9e41d3afbba55c4aafb3ccd43daee93a0dbfb599 --- /dev/null +++ b/ChromeDevTools/Protocol/Page/StartScreencastCommand.cs @@ -0,0 +1,29 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Page +{ + /// <summary> + /// Starts sending each frame using the <code>screencastFrame</code> event. + /// </summary> + [Command(ProtocolName.Page.StartScreencast)] + public class StartScreencastCommand + { + /// <summary> + /// Gets or sets Image compression format. + /// </summary> + public string Format { get; set; } + /// <summary> + /// Gets or sets Compression quality from range [0..100]. + /// </summary> + public long Quality { get; set; } + /// <summary> + /// Gets or sets Maximum screenshot width. + /// </summary> + public long MaxWidth { get; set; } + /// <summary> + /// Gets or sets Maximum screenshot height. + /// </summary> + public long MaxHeight { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/Page/StartScreencastCommandResponse.cs b/ChromeDevTools/Protocol/Page/StartScreencastCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..68f6cc401f76cd79ef127886818776bed22e367e --- /dev/null +++ b/ChromeDevTools/Protocol/Page/StartScreencastCommandResponse.cs @@ -0,0 +1,13 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Page +{ + /// <summary> + /// Starts sending each frame using the <code>screencastFrame</code> event. + /// </summary> + [CommandResponse(ProtocolName.Page.StartScreencast)] + public class StartScreencastCommandResponse + { + } +} diff --git a/ChromeDevTools/Protocol/Page/StopScreencastCommand.cs b/ChromeDevTools/Protocol/Page/StopScreencastCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..7b66eea3433e18b8f12b9449fd2f78812bf1e993 --- /dev/null +++ b/ChromeDevTools/Protocol/Page/StopScreencastCommand.cs @@ -0,0 +1,13 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Page +{ + /// <summary> + /// Stops sending each frame in the <code>screencastFrame</code>. + /// </summary> + [Command(ProtocolName.Page.StopScreencast)] + public class StopScreencastCommand + { + } +} diff --git a/ChromeDevTools/Protocol/Page/StopScreencastCommandResponse.cs b/ChromeDevTools/Protocol/Page/StopScreencastCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..a3db658bb42780e70011acde0b20402e30fd2e4b --- /dev/null +++ b/ChromeDevTools/Protocol/Page/StopScreencastCommandResponse.cs @@ -0,0 +1,13 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Page +{ + /// <summary> + /// Stops sending each frame in the <code>screencastFrame</code>. + /// </summary> + [CommandResponse(ProtocolName.Page.StopScreencast)] + public class StopScreencastCommandResponse + { + } +} diff --git a/ChromeDevTools/Protocol/Power/CanProfilePowerCommand.cs b/ChromeDevTools/Protocol/Power/CanProfilePowerCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..8d162a76343641e10fc40fec64565adc5a3c0bb8 --- /dev/null +++ b/ChromeDevTools/Protocol/Power/CanProfilePowerCommand.cs @@ -0,0 +1,13 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Power +{ + /// <summary> + /// Tells whether power profiling is supported. + /// </summary> + [Command(ProtocolName.Power.CanProfilePower)] + public class CanProfilePowerCommand + { + } +} diff --git a/ChromeDevTools/Protocol/Power/CanProfilePowerCommandResponse.cs b/ChromeDevTools/Protocol/Power/CanProfilePowerCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..4701bcdb7cc4ca0e5a6e0f4fed098fca4a8ae207 --- /dev/null +++ b/ChromeDevTools/Protocol/Power/CanProfilePowerCommandResponse.cs @@ -0,0 +1,17 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Power +{ + /// <summary> + /// Tells whether power profiling is supported. + /// </summary> + [CommandResponse(ProtocolName.Power.CanProfilePower)] + public class CanProfilePowerCommandResponse + { + /// <summary> + /// Gets or sets True if power profiling is supported. + /// </summary> + public bool Result { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/Power/DataAvailableEvent.cs b/ChromeDevTools/Protocol/Power/DataAvailableEvent.cs new file mode 100644 index 0000000000000000000000000000000000000000..f874e4eb1e86037e8b5607fa58a4d9c834065d09 --- /dev/null +++ b/ChromeDevTools/Protocol/Power/DataAvailableEvent.cs @@ -0,0 +1,13 @@ +using ChromeDevTools; + +namespace ChromeDevTools.Protocol.Power +{ + [Event(ProtocolName.Power.DataAvailable)] + public class DataAvailableEvent + { + /// <summary> + /// Gets or sets List of power events. + /// </summary> + public PowerEvent[] Value { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/Power/EndCommand.cs b/ChromeDevTools/Protocol/Power/EndCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..554497901d77f89538dc8f38b8cebc5d4d534cec --- /dev/null +++ b/ChromeDevTools/Protocol/Power/EndCommand.cs @@ -0,0 +1,13 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Power +{ + /// <summary> + /// Stop power events collection. + /// </summary> + [Command(ProtocolName.Power.End)] + public class EndCommand + { + } +} diff --git a/ChromeDevTools/Protocol/Power/EndCommandResponse.cs b/ChromeDevTools/Protocol/Power/EndCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..44b01e78845f962f163d61a6e9e95ed90b759681 --- /dev/null +++ b/ChromeDevTools/Protocol/Power/EndCommandResponse.cs @@ -0,0 +1,13 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Power +{ + /// <summary> + /// Stop power events collection. + /// </summary> + [CommandResponse(ProtocolName.Power.End)] + public class EndCommandResponse + { + } +} diff --git a/ChromeDevTools/Protocol/Power/GetAccuracyLevelCommand.cs b/ChromeDevTools/Protocol/Power/GetAccuracyLevelCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..9c8b9992c199561ba6c81795b30cc306cc766c9f --- /dev/null +++ b/ChromeDevTools/Protocol/Power/GetAccuracyLevelCommand.cs @@ -0,0 +1,13 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Power +{ + /// <summary> + /// Describes the accuracy level of the data provider. + /// </summary> + [Command(ProtocolName.Power.GetAccuracyLevel)] + public class GetAccuracyLevelCommand + { + } +} diff --git a/ChromeDevTools/Protocol/Power/GetAccuracyLevelCommandResponse.cs b/ChromeDevTools/Protocol/Power/GetAccuracyLevelCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..0f8c5db1aea98ed1a4b19e1226e566b6f8ac1b5e --- /dev/null +++ b/ChromeDevTools/Protocol/Power/GetAccuracyLevelCommandResponse.cs @@ -0,0 +1,17 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Power +{ + /// <summary> + /// Describes the accuracy level of the data provider. + /// </summary> + [CommandResponse(ProtocolName.Power.GetAccuracyLevel)] + public class GetAccuracyLevelCommandResponse + { + /// <summary> + /// Gets or sets Result + /// </summary> + public string Result { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/Power/PowerEvent.cs b/ChromeDevTools/Protocol/Power/PowerEvent.cs new file mode 100644 index 0000000000000000000000000000000000000000..bc3a5d13979324cba962ec8657432327a2a078ee --- /dev/null +++ b/ChromeDevTools/Protocol/Power/PowerEvent.cs @@ -0,0 +1,24 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Power +{ + /// <summary> + /// PowerEvent item + /// </summary> + public class PowerEvent + { + /// <summary> + /// Gets or sets Power Event Type. + /// </summary> + public string Type { get; set; } + /// <summary> + /// Gets or sets Power Event Time, in milliseconds. + /// </summary> + public double Timestamp { get; set; } + /// <summary> + /// Gets or sets Power Event Value. + /// </summary> + public double Value { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/Power/StartCommand.cs b/ChromeDevTools/Protocol/Power/StartCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..080bc8346a09b34077ee8e940ffab5eec0617aef --- /dev/null +++ b/ChromeDevTools/Protocol/Power/StartCommand.cs @@ -0,0 +1,13 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Power +{ + /// <summary> + /// Start power events collection. + /// </summary> + [Command(ProtocolName.Power.Start)] + public class StartCommand + { + } +} diff --git a/ChromeDevTools/Protocol/Power/StartCommandResponse.cs b/ChromeDevTools/Protocol/Power/StartCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..d96e54c2cdcca086d499175e732157171dd9aff1 --- /dev/null +++ b/ChromeDevTools/Protocol/Power/StartCommandResponse.cs @@ -0,0 +1,13 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Power +{ + /// <summary> + /// Start power events collection. + /// </summary> + [CommandResponse(ProtocolName.Power.Start)] + public class StartCommandResponse + { + } +} diff --git a/ChromeDevTools/Protocol/Profiler/CPUProfile.cs b/ChromeDevTools/Protocol/Profiler/CPUProfile.cs new file mode 100644 index 0000000000000000000000000000000000000000..937441291e60214ba4c1a7f5585a1a1d17aa689a --- /dev/null +++ b/ChromeDevTools/Protocol/Profiler/CPUProfile.cs @@ -0,0 +1,32 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Profiler +{ + /// <summary> + /// Profile. + /// </summary> + public class CPUProfile + { + /// <summary> + /// Gets or sets Head + /// </summary> + public CPUProfileNode Head { get; set; } + /// <summary> + /// Gets or sets Profiling start time in seconds. + /// </summary> + public double StartTime { get; set; } + /// <summary> + /// Gets or sets Profiling end time in seconds. + /// </summary> + public double EndTime { get; set; } + /// <summary> + /// Gets or sets Ids of samples top nodes. + /// </summary> + public long[] Samples { get; set; } + /// <summary> + /// Gets or sets Timestamps of the samples in microseconds. + /// </summary> + public double[] Timestamps { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/Profiler/CPUProfileNode.cs b/ChromeDevTools/Protocol/Profiler/CPUProfileNode.cs new file mode 100644 index 0000000000000000000000000000000000000000..d44a64c9aef6a55f7fd6ccf81b898b2cdb803bb9 --- /dev/null +++ b/ChromeDevTools/Protocol/Profiler/CPUProfileNode.cs @@ -0,0 +1,56 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Profiler +{ + /// <summary> + /// CPU Profile node. Holds callsite information, execution statistics and child nodes. + /// </summary> + public class CPUProfileNode + { + /// <summary> + /// Gets or sets Function name. + /// </summary> + public string FunctionName { get; set; } + /// <summary> + /// Gets or sets Script identifier. + /// </summary> + public string ScriptId { get; set; } + /// <summary> + /// Gets or sets URL. + /// </summary> + public string Url { get; set; } + /// <summary> + /// Gets or sets 1-based line number of the function start position. + /// </summary> + public long LineNumber { get; set; } + /// <summary> + /// Gets or sets 1-based column number of the function start position. + /// </summary> + public long ColumnNumber { get; set; } + /// <summary> + /// Gets or sets Number of samples where this node was on top of the call stack. + /// </summary> + public long HitCount { get; set; } + /// <summary> + /// Gets or sets Call UID. + /// </summary> + public double CallUID { get; set; } + /// <summary> + /// Gets or sets Child nodes. + /// </summary> + public CPUProfileNode[] Children { get; set; } + /// <summary> + /// Gets or sets The reason of being not optimized. The function may be deoptimized or marked as don't optimize. + /// </summary> + public string DeoptReason { get; set; } + /// <summary> + /// Gets or sets Unique id of the node. + /// </summary> + public long Id { get; set; } + /// <summary> + /// Gets or sets An array of source position ticks. + /// </summary> + public PositionTickInfo[] PositionTicks { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/Profiler/ConsoleProfileFinishedEvent.cs b/ChromeDevTools/Protocol/Profiler/ConsoleProfileFinishedEvent.cs new file mode 100644 index 0000000000000000000000000000000000000000..761ae446cb919b39b08c322889e5bb4fb87f0a61 --- /dev/null +++ b/ChromeDevTools/Protocol/Profiler/ConsoleProfileFinishedEvent.cs @@ -0,0 +1,25 @@ +using ChromeDevTools; + +namespace ChromeDevTools.Protocol.Profiler +{ + [Event(ProtocolName.Profiler.ConsoleProfileFinished)] + public class ConsoleProfileFinishedEvent + { + /// <summary> + /// Gets or sets Id + /// </summary> + public string Id { get; set; } + /// <summary> + /// Gets or sets Location of console.profileEnd(). + /// </summary> + public Debugger.Location Location { get; set; } + /// <summary> + /// Gets or sets Profile + /// </summary> + public CPUProfile Profile { get; set; } + /// <summary> + /// Gets or sets Profile title passed as argunet to console.profile(). + /// </summary> + public string Title { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/Profiler/ConsoleProfileStartedEvent.cs b/ChromeDevTools/Protocol/Profiler/ConsoleProfileStartedEvent.cs new file mode 100644 index 0000000000000000000000000000000000000000..805affdbdd5d77f0eba79a4e76f65b8ff20a9471 --- /dev/null +++ b/ChromeDevTools/Protocol/Profiler/ConsoleProfileStartedEvent.cs @@ -0,0 +1,24 @@ +using ChromeDevTools; + +namespace ChromeDevTools.Protocol.Profiler +{ + /// <summary> + /// Sent when new profile recodring is started using console.profile() call. + /// </summary> + [Event(ProtocolName.Profiler.ConsoleProfileStarted)] + public class ConsoleProfileStartedEvent + { + /// <summary> + /// Gets or sets Id + /// </summary> + public string Id { get; set; } + /// <summary> + /// Gets or sets Location of console.profile(). + /// </summary> + public Debugger.Location Location { get; set; } + /// <summary> + /// Gets or sets Profile title passed as argument to console.profile(). + /// </summary> + public string Title { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/Profiler/DisableCommand.cs b/ChromeDevTools/Protocol/Profiler/DisableCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..30c63fcb0a7142ed465904cabc5ffac181e77ef2 --- /dev/null +++ b/ChromeDevTools/Protocol/Profiler/DisableCommand.cs @@ -0,0 +1,10 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Profiler +{ + [Command(ProtocolName.Profiler.Disable)] + public class DisableCommand + { + } +} diff --git a/ChromeDevTools/Protocol/Profiler/DisableCommandResponse.cs b/ChromeDevTools/Protocol/Profiler/DisableCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..1c6832290b5c86256e569514c8a9cfe6c9a252de --- /dev/null +++ b/ChromeDevTools/Protocol/Profiler/DisableCommandResponse.cs @@ -0,0 +1,10 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Profiler +{ + [CommandResponse(ProtocolName.Profiler.Disable)] + public class DisableCommandResponse + { + } +} diff --git a/ChromeDevTools/Protocol/Profiler/EnableCommand.cs b/ChromeDevTools/Protocol/Profiler/EnableCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..954ec2519497fb8cf20f560d0117c14cd71df3d5 --- /dev/null +++ b/ChromeDevTools/Protocol/Profiler/EnableCommand.cs @@ -0,0 +1,10 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Profiler +{ + [Command(ProtocolName.Profiler.Enable)] + public class EnableCommand + { + } +} diff --git a/ChromeDevTools/Protocol/Profiler/EnableCommandResponse.cs b/ChromeDevTools/Protocol/Profiler/EnableCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..698c4956adcdd78fa23462779660d15f99b59a49 --- /dev/null +++ b/ChromeDevTools/Protocol/Profiler/EnableCommandResponse.cs @@ -0,0 +1,10 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Profiler +{ + [CommandResponse(ProtocolName.Profiler.Enable)] + public class EnableCommandResponse + { + } +} diff --git a/ChromeDevTools/Protocol/Profiler/PositionTickInfo.cs b/ChromeDevTools/Protocol/Profiler/PositionTickInfo.cs new file mode 100644 index 0000000000000000000000000000000000000000..65dfa78b0ea766f059ab16c76249ae83bfcbe266 --- /dev/null +++ b/ChromeDevTools/Protocol/Profiler/PositionTickInfo.cs @@ -0,0 +1,20 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Profiler +{ + /// <summary> + /// Specifies a number of samples attributed to a certain source position. + /// </summary> + public class PositionTickInfo + { + /// <summary> + /// Gets or sets Source line number (1-based). + /// </summary> + public long Line { get; set; } + /// <summary> + /// Gets or sets Number of samples attributed to the source line. + /// </summary> + public long Ticks { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/Profiler/SetSamplingIntervalCommand.cs b/ChromeDevTools/Protocol/Profiler/SetSamplingIntervalCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..3a3d755171dfb0e8ceb22b9110b77a6e71d79fe6 --- /dev/null +++ b/ChromeDevTools/Protocol/Profiler/SetSamplingIntervalCommand.cs @@ -0,0 +1,17 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Profiler +{ + /// <summary> + /// Changes CPU profiler sampling interval. Must be called before CPU profiles recording started. + /// </summary> + [Command(ProtocolName.Profiler.SetSamplingInterval)] + public class SetSamplingIntervalCommand + { + /// <summary> + /// Gets or sets New sampling interval in microseconds. + /// </summary> + public long Interval { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/Profiler/SetSamplingIntervalCommandResponse.cs b/ChromeDevTools/Protocol/Profiler/SetSamplingIntervalCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..8795e1f66af5767821f2308d4441ef703023961b --- /dev/null +++ b/ChromeDevTools/Protocol/Profiler/SetSamplingIntervalCommandResponse.cs @@ -0,0 +1,13 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Profiler +{ + /// <summary> + /// Changes CPU profiler sampling interval. Must be called before CPU profiles recording started. + /// </summary> + [CommandResponse(ProtocolName.Profiler.SetSamplingInterval)] + public class SetSamplingIntervalCommandResponse + { + } +} diff --git a/ChromeDevTools/Protocol/Profiler/StartCommand.cs b/ChromeDevTools/Protocol/Profiler/StartCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..08cbd63fb20f1c8316ea1afa4d2b3a014c2094f1 --- /dev/null +++ b/ChromeDevTools/Protocol/Profiler/StartCommand.cs @@ -0,0 +1,10 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Profiler +{ + [Command(ProtocolName.Profiler.Start)] + public class StartCommand + { + } +} diff --git a/ChromeDevTools/Protocol/Profiler/StartCommandResponse.cs b/ChromeDevTools/Protocol/Profiler/StartCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..46cfa042a4aa871d498b2f12c9380e46e86b067f --- /dev/null +++ b/ChromeDevTools/Protocol/Profiler/StartCommandResponse.cs @@ -0,0 +1,10 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Profiler +{ + [CommandResponse(ProtocolName.Profiler.Start)] + public class StartCommandResponse + { + } +} diff --git a/ChromeDevTools/Protocol/Profiler/StopCommand.cs b/ChromeDevTools/Protocol/Profiler/StopCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..65c3aa5e9b4fd5769afe89ea5b97abb72d723c43 --- /dev/null +++ b/ChromeDevTools/Protocol/Profiler/StopCommand.cs @@ -0,0 +1,10 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Profiler +{ + [Command(ProtocolName.Profiler.Stop)] + public class StopCommand + { + } +} diff --git a/ChromeDevTools/Protocol/Profiler/StopCommandResponse.cs b/ChromeDevTools/Protocol/Profiler/StopCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..0828197a9b83eeaa9582ef16f4dceae119c9910c --- /dev/null +++ b/ChromeDevTools/Protocol/Profiler/StopCommandResponse.cs @@ -0,0 +1,14 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Profiler +{ + [CommandResponse(ProtocolName.Profiler.Stop)] + public class StopCommandResponse + { + /// <summary> + /// Gets or sets Recorded profile. + /// </summary> + public CPUProfile Profile { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/ProtocolName.cs b/ChromeDevTools/Protocol/ProtocolName.cs new file mode 100644 index 0000000000000000000000000000000000000000..920af98c00ce47833c93ac570a612929760fa591 --- /dev/null +++ b/ChromeDevTools/Protocol/ProtocolName.cs @@ -0,0 +1,525 @@ +using ChromeDevTools; + +namespace ChromeDevTools.Protocol +{ + public static class ProtocolName + { + public static class Inspector + { + public const string Enable = "Inspector.enable"; + public const string Disable = "Inspector.disable"; + public const string EvaluateForTestInFrontend = "Inspector.evaluateForTestInFrontend"; + public const string Inspect = "Inspector.inspect"; + public const string Detached = "Inspector.detached"; + public const string TargetCrashed = "Inspector.targetCrashed"; + } + + public static class Memory + { + public const string GetDOMCounters = "Memory.getDOMCounters"; + } + + public static class Page + { + public const string Enable = "Page.enable"; + public const string Disable = "Page.disable"; + public const string AddScriptToEvaluateOnLoad = "Page.addScriptToEvaluateOnLoad"; + public const string RemoveScriptToEvaluateOnLoad = "Page.removeScriptToEvaluateOnLoad"; + public const string Reload = "Page.reload"; + public const string Navigate = "Page.navigate"; + public const string GetNavigationHistory = "Page.getNavigationHistory"; + public const string NavigateToHistoryEntry = "Page.navigateToHistoryEntry"; + public const string GetCookies = "Page.getCookies"; + public const string DeleteCookie = "Page.deleteCookie"; + public const string GetResourceTree = "Page.getResourceTree"; + public const string GetResourceContent = "Page.getResourceContent"; + public const string SearchInResource = "Page.searchInResource"; + public const string SetDocumentContent = "Page.setDocumentContent"; + public const string SetDeviceMetricsOverride = "Page.setDeviceMetricsOverride"; + public const string ClearDeviceMetricsOverride = "Page.clearDeviceMetricsOverride"; + public const string SetGeolocationOverride = "Page.setGeolocationOverride"; + public const string ClearGeolocationOverride = "Page.clearGeolocationOverride"; + public const string SetDeviceOrientationOverride = "Page.setDeviceOrientationOverride"; + public const string ClearDeviceOrientationOverride = "Page.clearDeviceOrientationOverride"; + public const string SetTouchEmulationEnabled = "Page.setTouchEmulationEnabled"; + public const string CaptureScreenshot = "Page.captureScreenshot"; + public const string CanScreencast = "Page.canScreencast"; + public const string StartScreencast = "Page.startScreencast"; + public const string StopScreencast = "Page.stopScreencast"; + public const string ScreencastFrameAck = "Page.screencastFrameAck"; + public const string HandleJavaScriptDialog = "Page.handleJavaScriptDialog"; + public const string SetShowViewportSizeOnResize = "Page.setShowViewportSizeOnResize"; + public const string SetColorPickerEnabled = "Page.setColorPickerEnabled"; + public const string SetOverlayMessage = "Page.setOverlayMessage"; + public const string DomContentEventFired = "Page.domContentEventFired"; + public const string LoadEventFired = "Page.loadEventFired"; + public const string FrameAttached = "Page.frameAttached"; + public const string FrameNavigated = "Page.frameNavigated"; + public const string FrameDetached = "Page.frameDetached"; + public const string FrameStartedLoading = "Page.frameStartedLoading"; + public const string FrameStoppedLoading = "Page.frameStoppedLoading"; + public const string FrameScheduledNavigation = "Page.frameScheduledNavigation"; + public const string FrameClearedScheduledNavigation = "Page.frameClearedScheduledNavigation"; + public const string FrameResized = "Page.frameResized"; + public const string JavascriptDialogOpening = "Page.javascriptDialogOpening"; + public const string JavascriptDialogClosed = "Page.javascriptDialogClosed"; + public const string ScreencastFrame = "Page.screencastFrame"; + public const string ScreencastVisibilityChanged = "Page.screencastVisibilityChanged"; + public const string ColorPicked = "Page.colorPicked"; + public const string InterstitialShown = "Page.interstitialShown"; + public const string InterstitialHidden = "Page.interstitialHidden"; + } + + public static class Rendering + { + public const string SetShowPaintRects = "Rendering.setShowPaintRects"; + public const string SetShowDebugBorders = "Rendering.setShowDebugBorders"; + public const string SetShowFPSCounter = "Rendering.setShowFPSCounter"; + public const string SetContinuousPaintingEnabled = "Rendering.setContinuousPaintingEnabled"; + public const string SetShowScrollBottleneckRects = "Rendering.setShowScrollBottleneckRects"; + } + + public static class Emulation + { + public const string SetDeviceMetricsOverride = "Emulation.setDeviceMetricsOverride"; + public const string ClearDeviceMetricsOverride = "Emulation.clearDeviceMetricsOverride"; + public const string ResetScrollAndPageScaleFactor = "Emulation.resetScrollAndPageScaleFactor"; + public const string SetPageScaleFactor = "Emulation.setPageScaleFactor"; + public const string SetScriptExecutionDisabled = "Emulation.setScriptExecutionDisabled"; + public const string SetGeolocationOverride = "Emulation.setGeolocationOverride"; + public const string ClearGeolocationOverride = "Emulation.clearGeolocationOverride"; + public const string SetTouchEmulationEnabled = "Emulation.setTouchEmulationEnabled"; + public const string SetEmulatedMedia = "Emulation.setEmulatedMedia"; + public const string CanEmulate = "Emulation.canEmulate"; + public const string ViewportChanged = "Emulation.viewportChanged"; + } + + public static class Runtime + { + public const string Evaluate = "Runtime.evaluate"; + public const string CallFunctionOn = "Runtime.callFunctionOn"; + public const string GetProperties = "Runtime.getProperties"; + public const string GetEventListeners = "Runtime.getEventListeners"; + public const string ReleaseObject = "Runtime.releaseObject"; + public const string ReleaseObjectGroup = "Runtime.releaseObjectGroup"; + public const string Run = "Runtime.run"; + public const string Enable = "Runtime.enable"; + public const string Disable = "Runtime.disable"; + public const string IsRunRequired = "Runtime.isRunRequired"; + public const string SetCustomObjectFormatterEnabled = "Runtime.setCustomObjectFormatterEnabled"; + public const string ExecutionContextCreated = "Runtime.executionContextCreated"; + public const string ExecutionContextDestroyed = "Runtime.executionContextDestroyed"; + public const string ExecutionContextsCleared = "Runtime.executionContextsCleared"; + } + + public static class Console + { + public const string Enable = "Console.enable"; + public const string Disable = "Console.disable"; + public const string ClearMessages = "Console.clearMessages"; + public const string MessageAdded = "Console.messageAdded"; + public const string MessageRepeatCountUpdated = "Console.messageRepeatCountUpdated"; + public const string MessagesCleared = "Console.messagesCleared"; + } + + public static class Network + { + public const string Enable = "Network.enable"; + public const string Disable = "Network.disable"; + public const string SetUserAgentOverride = "Network.setUserAgentOverride"; + public const string SetExtraHTTPHeaders = "Network.setExtraHTTPHeaders"; + public const string GetResponseBody = "Network.getResponseBody"; + public const string ReplayXHR = "Network.replayXHR"; + public const string SetMonitoringXHREnabled = "Network.setMonitoringXHREnabled"; + public const string CanClearBrowserCache = "Network.canClearBrowserCache"; + public const string ClearBrowserCache = "Network.clearBrowserCache"; + public const string CanClearBrowserCookies = "Network.canClearBrowserCookies"; + public const string ClearBrowserCookies = "Network.clearBrowserCookies"; + public const string GetCookies = "Network.getCookies"; + public const string DeleteCookie = "Network.deleteCookie"; + public const string CanEmulateNetworkConditions = "Network.canEmulateNetworkConditions"; + public const string EmulateNetworkConditions = "Network.emulateNetworkConditions"; + public const string SetCacheDisabled = "Network.setCacheDisabled"; + public const string SetDataSizeLimitsForTest = "Network.setDataSizeLimitsForTest"; + public const string RequestWillBeSent = "Network.requestWillBeSent"; + public const string RequestServedFromCache = "Network.requestServedFromCache"; + public const string ResponseReceived = "Network.responseReceived"; + public const string DataReceived = "Network.dataReceived"; + public const string LoadingFinished = "Network.loadingFinished"; + public const string LoadingFailed = "Network.loadingFailed"; + public const string WebSocketWillSendHandshakeRequest = "Network.webSocketWillSendHandshakeRequest"; + public const string WebSocketHandshakeResponseReceived = "Network.webSocketHandshakeResponseReceived"; + public const string WebSocketCreated = "Network.webSocketCreated"; + public const string WebSocketClosed = "Network.webSocketClosed"; + public const string WebSocketFrameReceived = "Network.webSocketFrameReceived"; + public const string WebSocketFrameError = "Network.webSocketFrameError"; + public const string WebSocketFrameSent = "Network.webSocketFrameSent"; + public const string EventSourceMessageReceived = "Network.eventSourceMessageReceived"; + } + + public static class Database + { + public const string Enable = "Database.enable"; + public const string Disable = "Database.disable"; + public const string GetDatabaseTableNames = "Database.getDatabaseTableNames"; + public const string ExecuteSQL = "Database.executeSQL"; + public const string AddDatabase = "Database.addDatabase"; + } + + public static class IndexedDB + { + public const string Enable = "IndexedDB.enable"; + public const string Disable = "IndexedDB.disable"; + public const string RequestDatabaseNames = "IndexedDB.requestDatabaseNames"; + public const string RequestDatabase = "IndexedDB.requestDatabase"; + public const string RequestData = "IndexedDB.requestData"; + public const string ClearObjectStore = "IndexedDB.clearObjectStore"; + } + + public static class CacheStorage + { + public const string RequestCacheNames = "CacheStorage.requestCacheNames"; + public const string RequestEntries = "CacheStorage.requestEntries"; + public const string DeleteCache = "CacheStorage.deleteCache"; + } + + public static class DOMStorage + { + public const string Enable = "DOMStorage.enable"; + public const string Disable = "DOMStorage.disable"; + public const string GetDOMStorageItems = "DOMStorage.getDOMStorageItems"; + public const string SetDOMStorageItem = "DOMStorage.setDOMStorageItem"; + public const string RemoveDOMStorageItem = "DOMStorage.removeDOMStorageItem"; + public const string DomStorageItemsCleared = "DOMStorage.domStorageItemsCleared"; + public const string DomStorageItemRemoved = "DOMStorage.domStorageItemRemoved"; + public const string DomStorageItemAdded = "DOMStorage.domStorageItemAdded"; + public const string DomStorageItemUpdated = "DOMStorage.domStorageItemUpdated"; + } + + public static class ApplicationCache + { + public const string GetFramesWithManifests = "ApplicationCache.getFramesWithManifests"; + public const string Enable = "ApplicationCache.enable"; + public const string GetManifestForFrame = "ApplicationCache.getManifestForFrame"; + public const string GetApplicationCacheForFrame = "ApplicationCache.getApplicationCacheForFrame"; + public const string ApplicationCacheStatusUpdated = "ApplicationCache.applicationCacheStatusUpdated"; + public const string NetworkStateUpdated = "ApplicationCache.networkStateUpdated"; + } + + public static class FileSystem + { + public const string Enable = "FileSystem.enable"; + public const string Disable = "FileSystem.disable"; + public const string RequestFileSystemRoot = "FileSystem.requestFileSystemRoot"; + public const string RequestDirectoryContent = "FileSystem.requestDirectoryContent"; + public const string RequestMetadata = "FileSystem.requestMetadata"; + public const string RequestFileContent = "FileSystem.requestFileContent"; + public const string DeleteEntry = "FileSystem.deleteEntry"; + } + + public static class DOM + { + public const string Enable = "DOM.enable"; + public const string Disable = "DOM.disable"; + public const string GetDocument = "DOM.getDocument"; + public const string RequestChildNodes = "DOM.requestChildNodes"; + public const string QuerySelector = "DOM.querySelector"; + public const string QuerySelectorAll = "DOM.querySelectorAll"; + public const string SetNodeName = "DOM.setNodeName"; + public const string SetNodeValue = "DOM.setNodeValue"; + public const string RemoveNode = "DOM.removeNode"; + public const string SetAttributeValue = "DOM.setAttributeValue"; + public const string SetAttributesAsText = "DOM.setAttributesAsText"; + public const string RemoveAttribute = "DOM.removeAttribute"; + public const string GetEventListenersForNode = "DOM.getEventListenersForNode"; + public const string GetOuterHTML = "DOM.getOuterHTML"; + public const string SetOuterHTML = "DOM.setOuterHTML"; + public const string PerformSearch = "DOM.performSearch"; + public const string GetSearchResults = "DOM.getSearchResults"; + public const string DiscardSearchResults = "DOM.discardSearchResults"; + public const string RequestNode = "DOM.requestNode"; + public const string SetInspectModeEnabled = "DOM.setInspectModeEnabled"; + public const string HighlightRect = "DOM.highlightRect"; + public const string HighlightQuad = "DOM.highlightQuad"; + public const string HighlightNode = "DOM.highlightNode"; + public const string HideHighlight = "DOM.hideHighlight"; + public const string HighlightFrame = "DOM.highlightFrame"; + public const string PushNodeByPathToFrontend = "DOM.pushNodeByPathToFrontend"; + public const string PushNodesByBackendIdsToFrontend = "DOM.pushNodesByBackendIdsToFrontend"; + public const string SetInspectedNode = "DOM.setInspectedNode"; + public const string ResolveNode = "DOM.resolveNode"; + public const string GetAttributes = "DOM.getAttributes"; + public const string CopyTo = "DOM.copyTo"; + public const string MoveTo = "DOM.moveTo"; + public const string Undo = "DOM.undo"; + public const string Redo = "DOM.redo"; + public const string MarkUndoableState = "DOM.markUndoableState"; + public const string Focus = "DOM.focus"; + public const string SetFileInputFiles = "DOM.setFileInputFiles"; + public const string GetBoxModel = "DOM.getBoxModel"; + public const string GetNodeForLocation = "DOM.getNodeForLocation"; + public const string GetRelayoutBoundary = "DOM.getRelayoutBoundary"; + public const string GetHighlightObjectForTest = "DOM.getHighlightObjectForTest"; + public const string DocumentUpdated = "DOM.documentUpdated"; + public const string InspectNodeRequested = "DOM.inspectNodeRequested"; + public const string SetChildNodes = "DOM.setChildNodes"; + public const string AttributeModified = "DOM.attributeModified"; + public const string AttributeRemoved = "DOM.attributeRemoved"; + public const string InlineStyleInvalidated = "DOM.inlineStyleInvalidated"; + public const string CharacterDataModified = "DOM.characterDataModified"; + public const string ChildNodeCountUpdated = "DOM.childNodeCountUpdated"; + public const string ChildNodeInserted = "DOM.childNodeInserted"; + public const string ChildNodeRemoved = "DOM.childNodeRemoved"; + public const string ShadowRootPushed = "DOM.shadowRootPushed"; + public const string ShadowRootPopped = "DOM.shadowRootPopped"; + public const string PseudoElementAdded = "DOM.pseudoElementAdded"; + public const string PseudoElementRemoved = "DOM.pseudoElementRemoved"; + public const string DistributedNodesUpdated = "DOM.distributedNodesUpdated"; + } + + public static class CSS + { + public const string Enable = "CSS.enable"; + public const string Disable = "CSS.disable"; + public const string GetMatchedStylesForNode = "CSS.getMatchedStylesForNode"; + public const string GetInlineStylesForNode = "CSS.getInlineStylesForNode"; + public const string GetComputedStyleForNode = "CSS.getComputedStyleForNode"; + public const string GetPlatformFontsForNode = "CSS.getPlatformFontsForNode"; + public const string GetStyleSheetText = "CSS.getStyleSheetText"; + public const string SetStyleSheetText = "CSS.setStyleSheetText"; + public const string SetPropertyText = "CSS.setPropertyText"; + public const string SetRuleSelector = "CSS.setRuleSelector"; + public const string SetMediaText = "CSS.setMediaText"; + public const string CreateStyleSheet = "CSS.createStyleSheet"; + public const string AddRule = "CSS.addRule"; + public const string ForcePseudoState = "CSS.forcePseudoState"; + public const string GetMediaQueries = "CSS.getMediaQueries"; + public const string MediaQueryResultChanged = "CSS.mediaQueryResultChanged"; + public const string StyleSheetChanged = "CSS.styleSheetChanged"; + public const string StyleSheetAdded = "CSS.styleSheetAdded"; + public const string StyleSheetRemoved = "CSS.styleSheetRemoved"; + } + + public static class Timeline + { + public const string Enable = "Timeline.enable"; + public const string Disable = "Timeline.disable"; + public const string Start = "Timeline.start"; + public const string Stop = "Timeline.stop"; + public const string EventRecorded = "Timeline.eventRecorded"; + } + + public static class Debugger + { + public const string Enable = "Debugger.enable"; + public const string Disable = "Debugger.disable"; + public const string SetBreakpointsActive = "Debugger.setBreakpointsActive"; + public const string SetSkipAllPauses = "Debugger.setSkipAllPauses"; + public const string SetBreakpointByUrl = "Debugger.setBreakpointByUrl"; + public const string SetBreakpoint = "Debugger.setBreakpoint"; + public const string RemoveBreakpoint = "Debugger.removeBreakpoint"; + public const string ContinueToLocation = "Debugger.continueToLocation"; + public const string StepOver = "Debugger.stepOver"; + public const string StepInto = "Debugger.stepInto"; + public const string StepOut = "Debugger.stepOut"; + public const string Pause = "Debugger.pause"; + public const string Resume = "Debugger.resume"; + public const string StepIntoAsync = "Debugger.stepIntoAsync"; + public const string SearchInContent = "Debugger.searchInContent"; + public const string CanSetScriptSource = "Debugger.canSetScriptSource"; + public const string SetScriptSource = "Debugger.setScriptSource"; + public const string RestartFrame = "Debugger.restartFrame"; + public const string GetScriptSource = "Debugger.getScriptSource"; + public const string GetFunctionDetails = "Debugger.getFunctionDetails"; + public const string GetGeneratorObjectDetails = "Debugger.getGeneratorObjectDetails"; + public const string GetCollectionEntries = "Debugger.getCollectionEntries"; + public const string SetPauseOnExceptions = "Debugger.setPauseOnExceptions"; + public const string EvaluateOnCallFrame = "Debugger.evaluateOnCallFrame"; + public const string CompileScript = "Debugger.compileScript"; + public const string RunScript = "Debugger.runScript"; + public const string SetVariableValue = "Debugger.setVariableValue"; + public const string GetStepInPositions = "Debugger.getStepInPositions"; + public const string GetBacktrace = "Debugger.getBacktrace"; + public const string SkipStackFrames = "Debugger.skipStackFrames"; + public const string SetAsyncCallStackDepth = "Debugger.setAsyncCallStackDepth"; + public const string EnablePromiseTracker = "Debugger.enablePromiseTracker"; + public const string DisablePromiseTracker = "Debugger.disablePromiseTracker"; + public const string GetPromises = "Debugger.getPromises"; + public const string GetPromiseById = "Debugger.getPromiseById"; + public const string FlushAsyncOperationEvents = "Debugger.flushAsyncOperationEvents"; + public const string SetAsyncOperationBreakpoint = "Debugger.setAsyncOperationBreakpoint"; + public const string RemoveAsyncOperationBreakpoint = "Debugger.removeAsyncOperationBreakpoint"; + public const string GlobalObjectCleared = "Debugger.globalObjectCleared"; + public const string ScriptParsed = "Debugger.scriptParsed"; + public const string ScriptFailedToParse = "Debugger.scriptFailedToParse"; + public const string BreakpointResolved = "Debugger.breakpointResolved"; + public const string Paused = "Debugger.paused"; + public const string Resumed = "Debugger.resumed"; + public const string PromiseUpdated = "Debugger.promiseUpdated"; + public const string AsyncOperationStarted = "Debugger.asyncOperationStarted"; + public const string AsyncOperationCompleted = "Debugger.asyncOperationCompleted"; + } + + public static class DOMDebugger + { + public const string SetDOMBreakpoint = "DOMDebugger.setDOMBreakpoint"; + public const string RemoveDOMBreakpoint = "DOMDebugger.removeDOMBreakpoint"; + public const string SetEventListenerBreakpoint = "DOMDebugger.setEventListenerBreakpoint"; + public const string RemoveEventListenerBreakpoint = "DOMDebugger.removeEventListenerBreakpoint"; + public const string SetInstrumentationBreakpoint = "DOMDebugger.setInstrumentationBreakpoint"; + public const string RemoveInstrumentationBreakpoint = "DOMDebugger.removeInstrumentationBreakpoint"; + public const string SetXHRBreakpoint = "DOMDebugger.setXHRBreakpoint"; + public const string RemoveXHRBreakpoint = "DOMDebugger.removeXHRBreakpoint"; + } + + public static class Profiler + { + public const string Enable = "Profiler.enable"; + public const string Disable = "Profiler.disable"; + public const string SetSamplingInterval = "Profiler.setSamplingInterval"; + public const string Start = "Profiler.start"; + public const string Stop = "Profiler.stop"; + public const string ConsoleProfileStarted = "Profiler.consoleProfileStarted"; + public const string ConsoleProfileFinished = "Profiler.consoleProfileFinished"; + } + + public static class HeapProfiler + { + public const string Enable = "HeapProfiler.enable"; + public const string Disable = "HeapProfiler.disable"; + public const string StartTrackingHeapObjects = "HeapProfiler.startTrackingHeapObjects"; + public const string StopTrackingHeapObjects = "HeapProfiler.stopTrackingHeapObjects"; + public const string TakeHeapSnapshot = "HeapProfiler.takeHeapSnapshot"; + public const string CollectGarbage = "HeapProfiler.collectGarbage"; + public const string GetObjectByHeapObjectId = "HeapProfiler.getObjectByHeapObjectId"; + public const string AddInspectedHeapObject = "HeapProfiler.addInspectedHeapObject"; + public const string GetHeapObjectId = "HeapProfiler.getHeapObjectId"; + public const string AddHeapSnapshotChunk = "HeapProfiler.addHeapSnapshotChunk"; + public const string ResetProfiles = "HeapProfiler.resetProfiles"; + public const string ReportHeapSnapshotProgress = "HeapProfiler.reportHeapSnapshotProgress"; + public const string LastSeenObjectId = "HeapProfiler.lastSeenObjectId"; + public const string HeapStatsUpdate = "HeapProfiler.heapStatsUpdate"; + } + + public static class Worker + { + public const string Enable = "Worker.enable"; + public const string Disable = "Worker.disable"; + public const string SendMessageToWorker = "Worker.sendMessageToWorker"; + public const string ConnectToWorker = "Worker.connectToWorker"; + public const string DisconnectFromWorker = "Worker.disconnectFromWorker"; + public const string SetAutoconnectToWorkers = "Worker.setAutoconnectToWorkers"; + public const string WorkerCreated = "Worker.workerCreated"; + public const string WorkerTerminated = "Worker.workerTerminated"; + public const string DispatchMessageFromWorker = "Worker.dispatchMessageFromWorker"; + } + + public static class ServiceWorker + { + public const string Enable = "ServiceWorker.enable"; + public const string Disable = "ServiceWorker.disable"; + public const string SendMessage = "ServiceWorker.sendMessage"; + public const string Stop = "ServiceWorker.stop"; + public const string Unregister = "ServiceWorker.unregister"; + public const string UpdateRegistration = "ServiceWorker.updateRegistration"; + public const string StartWorker = "ServiceWorker.startWorker"; + public const string StopWorker = "ServiceWorker.stopWorker"; + public const string InspectWorker = "ServiceWorker.inspectWorker"; + public const string SetDebugOnStart = "ServiceWorker.setDebugOnStart"; + public const string DeliverPushMessage = "ServiceWorker.deliverPushMessage"; + public const string WorkerCreated = "ServiceWorker.workerCreated"; + public const string WorkerTerminated = "ServiceWorker.workerTerminated"; + public const string DispatchMessage = "ServiceWorker.dispatchMessage"; + public const string WorkerRegistrationUpdated = "ServiceWorker.workerRegistrationUpdated"; + public const string WorkerVersionUpdated = "ServiceWorker.workerVersionUpdated"; + public const string WorkerErrorReported = "ServiceWorker.workerErrorReported"; + public const string DebugOnStartUpdated = "ServiceWorker.debugOnStartUpdated"; + } + + public static class Canvas + { + public const string Enable = "Canvas.enable"; + public const string Disable = "Canvas.disable"; + public const string DropTraceLog = "Canvas.dropTraceLog"; + public const string HasUninstrumentedCanvases = "Canvas.hasUninstrumentedCanvases"; + public const string CaptureFrame = "Canvas.captureFrame"; + public const string StartCapturing = "Canvas.startCapturing"; + public const string StopCapturing = "Canvas.stopCapturing"; + public const string GetTraceLog = "Canvas.getTraceLog"; + public const string ReplayTraceLog = "Canvas.replayTraceLog"; + public const string GetResourceState = "Canvas.getResourceState"; + public const string EvaluateTraceLogCallArgument = "Canvas.evaluateTraceLogCallArgument"; + public const string ContextCreated = "Canvas.contextCreated"; + public const string TraceLogsRemoved = "Canvas.traceLogsRemoved"; + } + + public static class Input + { + public const string DispatchKeyEvent = "Input.dispatchKeyEvent"; + public const string DispatchMouseEvent = "Input.dispatchMouseEvent"; + public const string DispatchTouchEvent = "Input.dispatchTouchEvent"; + public const string EmulateTouchFromMouseEvent = "Input.emulateTouchFromMouseEvent"; + public const string SynthesizePinchGesture = "Input.synthesizePinchGesture"; + public const string SynthesizeScrollGesture = "Input.synthesizeScrollGesture"; + public const string SynthesizeTapGesture = "Input.synthesizeTapGesture"; + } + + public static class LayerTree + { + public const string Enable = "LayerTree.enable"; + public const string Disable = "LayerTree.disable"; + public const string CompositingReasons = "LayerTree.compositingReasons"; + public const string MakeSnapshot = "LayerTree.makeSnapshot"; + public const string LoadSnapshot = "LayerTree.loadSnapshot"; + public const string ReleaseSnapshot = "LayerTree.releaseSnapshot"; + public const string ProfileSnapshot = "LayerTree.profileSnapshot"; + public const string ReplaySnapshot = "LayerTree.replaySnapshot"; + public const string SnapshotCommandLog = "LayerTree.snapshotCommandLog"; + public const string LayerTreeDidChange = "LayerTree.layerTreeDidChange"; + public const string LayerPainted = "LayerTree.layerPainted"; + } + + public static class DeviceOrientation + { + public const string SetDeviceOrientationOverride = "DeviceOrientation.setDeviceOrientationOverride"; + public const string ClearDeviceOrientationOverride = "DeviceOrientation.clearDeviceOrientationOverride"; + } + + public static class Tracing + { + public const string Start = "Tracing.start"; + public const string End = "Tracing.end"; + public const string GetCategories = "Tracing.getCategories"; + public const string DataCollected = "Tracing.dataCollected"; + public const string TracingComplete = "Tracing.tracingComplete"; + public const string BufferUsage = "Tracing.bufferUsage"; + } + + public static class Power + { + public const string Start = "Power.start"; + public const string End = "Power.end"; + public const string CanProfilePower = "Power.canProfilePower"; + public const string GetAccuracyLevel = "Power.getAccuracyLevel"; + public const string DataAvailable = "Power.dataAvailable"; + } + + public static class Animation + { + public const string Enable = "Animation.enable"; + public const string GetAnimationPlayersForNode = "Animation.getAnimationPlayersForNode"; + public const string GetPlaybackRate = "Animation.getPlaybackRate"; + public const string SetPlaybackRate = "Animation.setPlaybackRate"; + public const string SetCurrentTime = "Animation.setCurrentTime"; + public const string SetTiming = "Animation.setTiming"; + public const string AnimationPlayerCreated = "Animation.animationPlayerCreated"; + public const string AnimationPlayerCanceled = "Animation.animationPlayerCanceled"; + } + + public static class Accessibility + { + public const string GetAXNode = "Accessibility.getAXNode"; + } + + } +} diff --git a/ChromeDevTools/Protocol/Rendering/SetContinuousPaintingEnabledCommand.cs b/ChromeDevTools/Protocol/Rendering/SetContinuousPaintingEnabledCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..0e795b6e16012402679a25235bc9292c7efa451c --- /dev/null +++ b/ChromeDevTools/Protocol/Rendering/SetContinuousPaintingEnabledCommand.cs @@ -0,0 +1,17 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Rendering +{ + /// <summary> + /// Requests that backend enables continuous painting + /// </summary> + [Command(ProtocolName.Rendering.SetContinuousPaintingEnabled)] + public class SetContinuousPaintingEnabledCommand + { + /// <summary> + /// Gets or sets True for enabling cointinuous painting + /// </summary> + public bool Enabled { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/Rendering/SetContinuousPaintingEnabledCommandResponse.cs b/ChromeDevTools/Protocol/Rendering/SetContinuousPaintingEnabledCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..a59cfddd447ad92cbc8a18f6c236231645541382 --- /dev/null +++ b/ChromeDevTools/Protocol/Rendering/SetContinuousPaintingEnabledCommandResponse.cs @@ -0,0 +1,13 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Rendering +{ + /// <summary> + /// Requests that backend enables continuous painting + /// </summary> + [CommandResponse(ProtocolName.Rendering.SetContinuousPaintingEnabled)] + public class SetContinuousPaintingEnabledCommandResponse + { + } +} diff --git a/ChromeDevTools/Protocol/Rendering/SetShowDebugBordersCommand.cs b/ChromeDevTools/Protocol/Rendering/SetShowDebugBordersCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..6671497d535c001951e021e39a053e17c08129fa --- /dev/null +++ b/ChromeDevTools/Protocol/Rendering/SetShowDebugBordersCommand.cs @@ -0,0 +1,17 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Rendering +{ + /// <summary> + /// Requests that backend shows debug borders on layers + /// </summary> + [Command(ProtocolName.Rendering.SetShowDebugBorders)] + public class SetShowDebugBordersCommand + { + /// <summary> + /// Gets or sets True for showing debug borders + /// </summary> + public bool Show { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/Rendering/SetShowDebugBordersCommandResponse.cs b/ChromeDevTools/Protocol/Rendering/SetShowDebugBordersCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..92a7c0f1d2d2fe9eab5695fe79acb45e85451fda --- /dev/null +++ b/ChromeDevTools/Protocol/Rendering/SetShowDebugBordersCommandResponse.cs @@ -0,0 +1,13 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Rendering +{ + /// <summary> + /// Requests that backend shows debug borders on layers + /// </summary> + [CommandResponse(ProtocolName.Rendering.SetShowDebugBorders)] + public class SetShowDebugBordersCommandResponse + { + } +} diff --git a/ChromeDevTools/Protocol/Rendering/SetShowFPSCounterCommand.cs b/ChromeDevTools/Protocol/Rendering/SetShowFPSCounterCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..849e12e0022188d08e08acafa460788796cb5e60 --- /dev/null +++ b/ChromeDevTools/Protocol/Rendering/SetShowFPSCounterCommand.cs @@ -0,0 +1,17 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Rendering +{ + /// <summary> + /// Requests that backend shows the FPS counter + /// </summary> + [Command(ProtocolName.Rendering.SetShowFPSCounter)] + public class SetShowFPSCounterCommand + { + /// <summary> + /// Gets or sets True for showing the FPS counter + /// </summary> + public bool Show { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/Rendering/SetShowFPSCounterCommandResponse.cs b/ChromeDevTools/Protocol/Rendering/SetShowFPSCounterCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..b792326f4513fe47f04eecf2a962a7614d0b9595 --- /dev/null +++ b/ChromeDevTools/Protocol/Rendering/SetShowFPSCounterCommandResponse.cs @@ -0,0 +1,13 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Rendering +{ + /// <summary> + /// Requests that backend shows the FPS counter + /// </summary> + [CommandResponse(ProtocolName.Rendering.SetShowFPSCounter)] + public class SetShowFPSCounterCommandResponse + { + } +} diff --git a/ChromeDevTools/Protocol/Rendering/SetShowPaintRectsCommand.cs b/ChromeDevTools/Protocol/Rendering/SetShowPaintRectsCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..22164cef16960fa0701a2da63e93cddeae229a68 --- /dev/null +++ b/ChromeDevTools/Protocol/Rendering/SetShowPaintRectsCommand.cs @@ -0,0 +1,17 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Rendering +{ + /// <summary> + /// Requests that backend shows paint rectangles + /// </summary> + [Command(ProtocolName.Rendering.SetShowPaintRects)] + public class SetShowPaintRectsCommand + { + /// <summary> + /// Gets or sets True for showing paint rectangles + /// </summary> + public bool Result { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/Rendering/SetShowPaintRectsCommandResponse.cs b/ChromeDevTools/Protocol/Rendering/SetShowPaintRectsCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..35d315937c66ee78305abfd06fad8f0d6a9fc436 --- /dev/null +++ b/ChromeDevTools/Protocol/Rendering/SetShowPaintRectsCommandResponse.cs @@ -0,0 +1,13 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Rendering +{ + /// <summary> + /// Requests that backend shows paint rectangles + /// </summary> + [CommandResponse(ProtocolName.Rendering.SetShowPaintRects)] + public class SetShowPaintRectsCommandResponse + { + } +} diff --git a/ChromeDevTools/Protocol/Rendering/SetShowScrollBottleneckRectsCommand.cs b/ChromeDevTools/Protocol/Rendering/SetShowScrollBottleneckRectsCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..707adb3d99b34589996c63ae6c0364c5170a2e49 --- /dev/null +++ b/ChromeDevTools/Protocol/Rendering/SetShowScrollBottleneckRectsCommand.cs @@ -0,0 +1,17 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Rendering +{ + /// <summary> + /// Requests that backend shows scroll bottleneck rects + /// </summary> + [Command(ProtocolName.Rendering.SetShowScrollBottleneckRects)] + public class SetShowScrollBottleneckRectsCommand + { + /// <summary> + /// Gets or sets True for showing scroll bottleneck rects + /// </summary> + public bool Show { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/Rendering/SetShowScrollBottleneckRectsCommandResponse.cs b/ChromeDevTools/Protocol/Rendering/SetShowScrollBottleneckRectsCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..93fab75a29dac1e09f38193c846b29f311cb842c --- /dev/null +++ b/ChromeDevTools/Protocol/Rendering/SetShowScrollBottleneckRectsCommandResponse.cs @@ -0,0 +1,13 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Rendering +{ + /// <summary> + /// Requests that backend shows scroll bottleneck rects + /// </summary> + [CommandResponse(ProtocolName.Rendering.SetShowScrollBottleneckRects)] + public class SetShowScrollBottleneckRectsCommandResponse + { + } +} diff --git a/ChromeDevTools/Protocol/Runtime/CallArgument.cs b/ChromeDevTools/Protocol/Runtime/CallArgument.cs new file mode 100644 index 0000000000000000000000000000000000000000..a711f28e558ab7e2d1ddcd98970d124ed2ed6fab --- /dev/null +++ b/ChromeDevTools/Protocol/Runtime/CallArgument.cs @@ -0,0 +1,24 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Runtime +{ + /// <summary> + /// Represents function call argument. Either remote object id <code>objectId</code> or primitive <code>value</code> or neither of (for undefined) them should be specified. + /// </summary> + public class CallArgument + { + /// <summary> + /// Gets or sets Primitive value, or description string if the value can not be JSON-stringified (like NaN, Infinity, -Infinity, -0). + /// </summary> + public object Value { get; set; } + /// <summary> + /// Gets or sets Remote object handle. + /// </summary> + public string ObjectId { get; set; } + /// <summary> + /// Gets or sets Object type. + /// </summary> + public string Type { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/Runtime/CallFunctionOnCommand.cs b/ChromeDevTools/Protocol/Runtime/CallFunctionOnCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..25ce079913e2da9fc32521c0a277d4b3e4b66fc2 --- /dev/null +++ b/ChromeDevTools/Protocol/Runtime/CallFunctionOnCommand.cs @@ -0,0 +1,37 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Runtime +{ + /// <summary> + /// Calls function with given declaration on the given object. Object group of the result is inherited from the target object. + /// </summary> + [Command(ProtocolName.Runtime.CallFunctionOn)] + public class CallFunctionOnCommand + { + /// <summary> + /// Gets or sets Identifier of the object to call function on. + /// </summary> + public string ObjectId { get; set; } + /// <summary> + /// Gets or sets Declaration of the function to call. + /// </summary> + public string FunctionDeclaration { get; set; } + /// <summary> + /// Gets or sets Call arguments. All call arguments must belong to the same JavaScript world as the target object. + /// </summary> + public CallArgument[] Arguments { get; set; } + /// <summary> + /// Gets or sets Specifies whether function call should stop on exceptions and mute console. Overrides setPauseOnException state. + /// </summary> + public bool DoNotPauseOnExceptionsAndMuteConsole { get; set; } + /// <summary> + /// Gets or sets Whether the result is expected to be a JSON object which should be sent by value. + /// </summary> + public bool ReturnByValue { get; set; } + /// <summary> + /// Gets or sets Whether preview should be generated for the result. + /// </summary> + public bool GeneratePreview { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/Runtime/CallFunctionOnCommandResponse.cs b/ChromeDevTools/Protocol/Runtime/CallFunctionOnCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..7c392d1274281c2b8b0b1fc138b88474b32ce62d --- /dev/null +++ b/ChromeDevTools/Protocol/Runtime/CallFunctionOnCommandResponse.cs @@ -0,0 +1,21 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Runtime +{ + /// <summary> + /// Calls function with given declaration on the given object. Object group of the result is inherited from the target object. + /// </summary> + [CommandResponse(ProtocolName.Runtime.CallFunctionOn)] + public class CallFunctionOnCommandResponse + { + /// <summary> + /// Gets or sets Call result. + /// </summary> + public RemoteObject Result { get; set; } + /// <summary> + /// Gets or sets True if the result was thrown during the evaluation. + /// </summary> + public bool WasThrown { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/Runtime/CustomPreview.cs b/ChromeDevTools/Protocol/Runtime/CustomPreview.cs new file mode 100644 index 0000000000000000000000000000000000000000..8ece0125a6d0b000d228746b1fa8fb13be334e1f --- /dev/null +++ b/ChromeDevTools/Protocol/Runtime/CustomPreview.cs @@ -0,0 +1,28 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Runtime +{ + /// <summary> + /// + /// </summary> + public class CustomPreview + { + /// <summary> + /// Gets or sets Header + /// </summary> + public string Header { get; set; } + /// <summary> + /// Gets or sets HasBody + /// </summary> + public bool HasBody { get; set; } + /// <summary> + /// Gets or sets FormatterObjectId + /// </summary> + public string FormatterObjectId { get; set; } + /// <summary> + /// Gets or sets ConfigObjectId + /// </summary> + public string ConfigObjectId { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/Runtime/DisableCommand.cs b/ChromeDevTools/Protocol/Runtime/DisableCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..0aace874bcca18283f49794c9f2f8ed1c8de1970 --- /dev/null +++ b/ChromeDevTools/Protocol/Runtime/DisableCommand.cs @@ -0,0 +1,13 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Runtime +{ + /// <summary> + /// Disables reporting of execution contexts creation. + /// </summary> + [Command(ProtocolName.Runtime.Disable)] + public class DisableCommand + { + } +} diff --git a/ChromeDevTools/Protocol/Runtime/DisableCommandResponse.cs b/ChromeDevTools/Protocol/Runtime/DisableCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..98f3e978e522bbe0d562af481eb7ebe87c3af446 --- /dev/null +++ b/ChromeDevTools/Protocol/Runtime/DisableCommandResponse.cs @@ -0,0 +1,13 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Runtime +{ + /// <summary> + /// Disables reporting of execution contexts creation. + /// </summary> + [CommandResponse(ProtocolName.Runtime.Disable)] + public class DisableCommandResponse + { + } +} diff --git a/ChromeDevTools/Protocol/Runtime/EnableCommand.cs b/ChromeDevTools/Protocol/Runtime/EnableCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..279da313d530b8a23a258a30e77b98ac5634dba0 --- /dev/null +++ b/ChromeDevTools/Protocol/Runtime/EnableCommand.cs @@ -0,0 +1,13 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Runtime +{ + /// <summary> + /// Enables reporting of execution contexts creation by means of <code>executionContextCreated</code> event. When the reporting gets enabled the event will be sent immediately for each existing execution context. + /// </summary> + [Command(ProtocolName.Runtime.Enable)] + public class EnableCommand + { + } +} diff --git a/ChromeDevTools/Protocol/Runtime/EnableCommandResponse.cs b/ChromeDevTools/Protocol/Runtime/EnableCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..7fc6586dd9dbb1c5005bc55d98803c5b739e2b9b --- /dev/null +++ b/ChromeDevTools/Protocol/Runtime/EnableCommandResponse.cs @@ -0,0 +1,13 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Runtime +{ + /// <summary> + /// Enables reporting of execution contexts creation by means of <code>executionContextCreated</code> event. When the reporting gets enabled the event will be sent immediately for each existing execution context. + /// </summary> + [CommandResponse(ProtocolName.Runtime.Enable)] + public class EnableCommandResponse + { + } +} diff --git a/ChromeDevTools/Protocol/Runtime/EntryPreview.cs b/ChromeDevTools/Protocol/Runtime/EntryPreview.cs new file mode 100644 index 0000000000000000000000000000000000000000..b57de3208235c48181b2a5b2a099acea94239ac0 --- /dev/null +++ b/ChromeDevTools/Protocol/Runtime/EntryPreview.cs @@ -0,0 +1,20 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Runtime +{ + /// <summary> + /// + /// </summary> + public class EntryPreview + { + /// <summary> + /// Gets or sets Preview of the key. Specified for map-like collection entries. + /// </summary> + public ObjectPreview Key { get; set; } + /// <summary> + /// Gets or sets Preview of the value. + /// </summary> + public ObjectPreview Value { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/Runtime/EvaluateCommand.cs b/ChromeDevTools/Protocol/Runtime/EvaluateCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..a9a9f580cbf35cd829b234cdd2cdeeaede3383e7 --- /dev/null +++ b/ChromeDevTools/Protocol/Runtime/EvaluateCommand.cs @@ -0,0 +1,41 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Runtime +{ + /// <summary> + /// Evaluates expression on global object. + /// </summary> + [Command(ProtocolName.Runtime.Evaluate)] + public class EvaluateCommand + { + /// <summary> + /// Gets or sets Expression to evaluate. + /// </summary> + public string Expression { get; set; } + /// <summary> + /// Gets or sets Symbolic group name that can be used to release multiple objects. + /// </summary> + public string ObjectGroup { get; set; } + /// <summary> + /// Gets or sets Determines whether Command Line API should be available during the evaluation. + /// </summary> + public bool IncludeCommandLineAPI { get; set; } + /// <summary> + /// Gets or sets Specifies whether evaluation should stop on exceptions and mute console. Overrides setPauseOnException state. + /// </summary> + public bool DoNotPauseOnExceptionsAndMuteConsole { get; set; } + /// <summary> + /// Gets or sets Specifies in which isolated context to perform evaluation. Each content script lives in an isolated context and this parameter may be used to specify one of those contexts. If the parameter is omitted or 0 the evaluation will be performed in the context of the inspected page. + /// </summary> + public long ContextId { get; set; } + /// <summary> + /// Gets or sets Whether the result is expected to be a JSON object that should be sent by value. + /// </summary> + public bool ReturnByValue { get; set; } + /// <summary> + /// Gets or sets Whether preview should be generated for the result. + /// </summary> + public bool GeneratePreview { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/Runtime/EvaluateCommandResponse.cs b/ChromeDevTools/Protocol/Runtime/EvaluateCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..40350bac11ca6b4803f34ea5570677dcc20812ca --- /dev/null +++ b/ChromeDevTools/Protocol/Runtime/EvaluateCommandResponse.cs @@ -0,0 +1,25 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Runtime +{ + /// <summary> + /// Evaluates expression on global object. + /// </summary> + [CommandResponse(ProtocolName.Runtime.Evaluate)] + public class EvaluateCommandResponse + { + /// <summary> + /// Gets or sets Evaluation result. + /// </summary> + public RemoteObject Result { get; set; } + /// <summary> + /// Gets or sets True if the result was thrown during the evaluation. + /// </summary> + public bool WasThrown { get; set; } + /// <summary> + /// Gets or sets Exception details. + /// </summary> + public Debugger.ExceptionDetails ExceptionDetails { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/Runtime/EventListener.cs b/ChromeDevTools/Protocol/Runtime/EventListener.cs new file mode 100644 index 0000000000000000000000000000000000000000..01ec01f8c34695f43318958b19599f3075dc29a6 --- /dev/null +++ b/ChromeDevTools/Protocol/Runtime/EventListener.cs @@ -0,0 +1,28 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Runtime +{ + /// <summary> + /// Object event listener. + /// </summary> + public class EventListener + { + /// <summary> + /// Gets or sets <code>EventListener</code>'s type. + /// </summary> + public string Type { get; set; } + /// <summary> + /// Gets or sets <code>EventListener</code>'s useCapture. + /// </summary> + public bool UseCapture { get; set; } + /// <summary> + /// Gets or sets Handler code location. + /// </summary> + public Debugger.Location Location { get; set; } + /// <summary> + /// Gets or sets Event handler function value. + /// </summary> + public Runtime.RemoteObject Handler { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/Runtime/ExecutionContextCreatedEvent.cs b/ChromeDevTools/Protocol/Runtime/ExecutionContextCreatedEvent.cs new file mode 100644 index 0000000000000000000000000000000000000000..c65b171f5a9af5166954e8a207ba0eeb0f834e30 --- /dev/null +++ b/ChromeDevTools/Protocol/Runtime/ExecutionContextCreatedEvent.cs @@ -0,0 +1,16 @@ +using ChromeDevTools; + +namespace ChromeDevTools.Protocol.Runtime +{ + /// <summary> + /// Issued when new execution context is created. + /// </summary> + [Event(ProtocolName.Runtime.ExecutionContextCreated)] + public class ExecutionContextCreatedEvent + { + /// <summary> + /// Gets or sets A newly created execution contex. + /// </summary> + public ExecutionContextDescription Context { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/Runtime/ExecutionContextDescription.cs b/ChromeDevTools/Protocol/Runtime/ExecutionContextDescription.cs new file mode 100644 index 0000000000000000000000000000000000000000..6c82cdeb20bb38e8abecf5b1afa92d35bd295530 --- /dev/null +++ b/ChromeDevTools/Protocol/Runtime/ExecutionContextDescription.cs @@ -0,0 +1,32 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Runtime +{ + /// <summary> + /// Description of an isolated world. + /// </summary> + public class ExecutionContextDescription + { + /// <summary> + /// Gets or sets Unique id of the execution context. It can be used to specify in which execution context script evaluation should be performed. + /// </summary> + public long Id { get; set; } + /// <summary> + /// Gets or sets True if this is a context where inpspected web page scripts run. False if it is a content script isolated context. + /// </summary> + public bool IsPageContext { get; set; } + /// <summary> + /// Gets or sets Execution context origin. + /// </summary> + public string Origin { get; set; } + /// <summary> + /// Gets or sets Human readable name describing given context. + /// </summary> + public string Name { get; set; } + /// <summary> + /// Gets or sets Id of the owning frame. May be an empty string if the context is not associated with a frame. + /// </summary> + public string FrameId { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/Runtime/ExecutionContextDestroyedEvent.cs b/ChromeDevTools/Protocol/Runtime/ExecutionContextDestroyedEvent.cs new file mode 100644 index 0000000000000000000000000000000000000000..9876c7d3fd4623bb84bc2058789cd0380109405e --- /dev/null +++ b/ChromeDevTools/Protocol/Runtime/ExecutionContextDestroyedEvent.cs @@ -0,0 +1,16 @@ +using ChromeDevTools; + +namespace ChromeDevTools.Protocol.Runtime +{ + /// <summary> + /// Issued when execution context is destroyed. + /// </summary> + [Event(ProtocolName.Runtime.ExecutionContextDestroyed)] + public class ExecutionContextDestroyedEvent + { + /// <summary> + /// Gets or sets Id of the destroyed context + /// </summary> + public long ExecutionContextId { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/Runtime/ExecutionContextsClearedEvent.cs b/ChromeDevTools/Protocol/Runtime/ExecutionContextsClearedEvent.cs new file mode 100644 index 0000000000000000000000000000000000000000..3bd7102c02a7242ef35ecfa9f6775ffcb2284400 --- /dev/null +++ b/ChromeDevTools/Protocol/Runtime/ExecutionContextsClearedEvent.cs @@ -0,0 +1,12 @@ +using ChromeDevTools; + +namespace ChromeDevTools.Protocol.Runtime +{ + /// <summary> + /// Issued when all executionContexts were cleared in browser + /// </summary> + [Event(ProtocolName.Runtime.ExecutionContextsCleared)] + public class ExecutionContextsClearedEvent + { + } +} diff --git a/ChromeDevTools/Protocol/Runtime/GetEventListenersCommand.cs b/ChromeDevTools/Protocol/Runtime/GetEventListenersCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..496054c5c53e3444aa9009a5dbeca34917c45235 --- /dev/null +++ b/ChromeDevTools/Protocol/Runtime/GetEventListenersCommand.cs @@ -0,0 +1,21 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Runtime +{ + /// <summary> + /// Returns event listeners of the given object. + /// </summary> + [Command(ProtocolName.Runtime.GetEventListeners)] + public class GetEventListenersCommand + { + /// <summary> + /// Gets or sets Identifier of the object to return listeners for. + /// </summary> + public string ObjectId { get; set; } + /// <summary> + /// Gets or sets Symbolic group name for handler value. Handler value is not returned without this parameter specified. + /// </summary> + public string ObjectGroup { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/Runtime/GetEventListenersCommandResponse.cs b/ChromeDevTools/Protocol/Runtime/GetEventListenersCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..78a4a748f578239daf5ca477ea380f17f67db8c0 --- /dev/null +++ b/ChromeDevTools/Protocol/Runtime/GetEventListenersCommandResponse.cs @@ -0,0 +1,17 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Runtime +{ + /// <summary> + /// Returns event listeners of the given object. + /// </summary> + [CommandResponse(ProtocolName.Runtime.GetEventListeners)] + public class GetEventListenersCommandResponse + { + /// <summary> + /// Gets or sets Array of relevant listeners. + /// </summary> + public EventListener[] Listeners { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/Runtime/GetPropertiesCommand.cs b/ChromeDevTools/Protocol/Runtime/GetPropertiesCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..4a963c846910495c4fe4eeb8845ccc8430d5251c --- /dev/null +++ b/ChromeDevTools/Protocol/Runtime/GetPropertiesCommand.cs @@ -0,0 +1,29 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Runtime +{ + /// <summary> + /// Returns properties of a given object. Object group of the result is inherited from the target object. + /// </summary> + [Command(ProtocolName.Runtime.GetProperties)] + public class GetPropertiesCommand + { + /// <summary> + /// Gets or sets Identifier of the object to return properties for. + /// </summary> + public string ObjectId { get; set; } + /// <summary> + /// Gets or sets If true, returns properties belonging only to the element itself, not to its prototype chain. + /// </summary> + public bool OwnProperties { get; set; } + /// <summary> + /// Gets or sets If true, returns accessor properties (with getter/setter) only; internal properties are not returned either. + /// </summary> + public bool AccessorPropertiesOnly { get; set; } + /// <summary> + /// Gets or sets Whether preview should be generated for the results. + /// </summary> + public bool GeneratePreview { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/Runtime/GetPropertiesCommandResponse.cs b/ChromeDevTools/Protocol/Runtime/GetPropertiesCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..5eda3ae7825b759dc9941011d3b6825e12390386 --- /dev/null +++ b/ChromeDevTools/Protocol/Runtime/GetPropertiesCommandResponse.cs @@ -0,0 +1,21 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Runtime +{ + /// <summary> + /// Returns properties of a given object. Object group of the result is inherited from the target object. + /// </summary> + [CommandResponse(ProtocolName.Runtime.GetProperties)] + public class GetPropertiesCommandResponse + { + /// <summary> + /// Gets or sets Object properties. + /// </summary> + public PropertyDescriptor[] Result { get; set; } + /// <summary> + /// Gets or sets Internal object properties (only of the element itself). + /// </summary> + public InternalPropertyDescriptor[] InternalProperties { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/Runtime/InternalPropertyDescriptor.cs b/ChromeDevTools/Protocol/Runtime/InternalPropertyDescriptor.cs new file mode 100644 index 0000000000000000000000000000000000000000..4444678837b089be77ffe3f5b0158fb2223a9864 --- /dev/null +++ b/ChromeDevTools/Protocol/Runtime/InternalPropertyDescriptor.cs @@ -0,0 +1,20 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Runtime +{ + /// <summary> + /// Object internal property descriptor. This property isn't normally visible in JavaScript code. + /// </summary> + public class InternalPropertyDescriptor + { + /// <summary> + /// Gets or sets Conventional property name. + /// </summary> + public string Name { get; set; } + /// <summary> + /// Gets or sets The value associated with the property. + /// </summary> + public RemoteObject Value { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/Runtime/IsRunRequiredCommand.cs b/ChromeDevTools/Protocol/Runtime/IsRunRequiredCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..9c05606f0c2e023cb084ecdb663ef4cecab558bc --- /dev/null +++ b/ChromeDevTools/Protocol/Runtime/IsRunRequiredCommand.cs @@ -0,0 +1,10 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Runtime +{ + [Command(ProtocolName.Runtime.IsRunRequired)] + public class IsRunRequiredCommand + { + } +} diff --git a/ChromeDevTools/Protocol/Runtime/IsRunRequiredCommandResponse.cs b/ChromeDevTools/Protocol/Runtime/IsRunRequiredCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..c85e551bd35dc3721645cbfcae92c9f1e49e680c --- /dev/null +++ b/ChromeDevTools/Protocol/Runtime/IsRunRequiredCommandResponse.cs @@ -0,0 +1,14 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Runtime +{ + [CommandResponse(ProtocolName.Runtime.IsRunRequired)] + public class IsRunRequiredCommandResponse + { + /// <summary> + /// Gets or sets True if the Runtime is in paused on start state. + /// </summary> + public bool Result { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/Runtime/ObjectPreview.cs b/ChromeDevTools/Protocol/Runtime/ObjectPreview.cs new file mode 100644 index 0000000000000000000000000000000000000000..e61b548d99c16a0970de19c1261ea164b9e34d3a --- /dev/null +++ b/ChromeDevTools/Protocol/Runtime/ObjectPreview.cs @@ -0,0 +1,40 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Runtime +{ + /// <summary> + /// Object containing abbreviated remote object value. + /// </summary> + public class ObjectPreview + { + /// <summary> + /// Gets or sets Object type. + /// </summary> + public string Type { get; set; } + /// <summary> + /// Gets or sets Object subtype hint. Specified for <code>object</code> type values only. + /// </summary> + public string Subtype { get; set; } + /// <summary> + /// Gets or sets String representation of the object. + /// </summary> + public string Description { get; set; } + /// <summary> + /// Gets or sets Determines whether preview is lossless (contains all information of the original object). + /// </summary> + public bool Lossless { get; set; } + /// <summary> + /// Gets or sets True iff some of the properties or entries of the original object did not fit. + /// </summary> + public bool Overflow { get; set; } + /// <summary> + /// Gets or sets List of the properties. + /// </summary> + public PropertyPreview[] Properties { get; set; } + /// <summary> + /// Gets or sets List of the entries. Specified for <code>map</code> and <code>set</code> subtype values only. + /// </summary> + public EntryPreview[] Entries { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/Runtime/PropertyDescriptor.cs b/ChromeDevTools/Protocol/Runtime/PropertyDescriptor.cs new file mode 100644 index 0000000000000000000000000000000000000000..f52f4fb3c8fa3f72927406d4efc73ef2c62d0a6a --- /dev/null +++ b/ChromeDevTools/Protocol/Runtime/PropertyDescriptor.cs @@ -0,0 +1,52 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Runtime +{ + /// <summary> + /// Object property descriptor. + /// </summary> + public class PropertyDescriptor + { + /// <summary> + /// Gets or sets Property name or symbol description. + /// </summary> + public string Name { get; set; } + /// <summary> + /// Gets or sets The value associated with the property. + /// </summary> + public RemoteObject Value { get; set; } + /// <summary> + /// Gets or sets True if the value associated with the property may be changed (data descriptors only). + /// </summary> + public bool Writable { get; set; } + /// <summary> + /// Gets or sets A function which serves as a getter for the property, or <code>undefined</code> if there is no getter (accessor descriptors only). + /// </summary> + public RemoteObject Get { get; set; } + /// <summary> + /// Gets or sets A function which serves as a setter for the property, or <code>undefined</code> if there is no setter (accessor descriptors only). + /// </summary> + public RemoteObject Set { get; set; } + /// <summary> + /// Gets or sets True if the type of this property descriptor may be changed and if the property may be deleted from the corresponding object. + /// </summary> + public bool Configurable { get; set; } + /// <summary> + /// Gets or sets True if this property shows up during enumeration of the properties on the corresponding object. + /// </summary> + public bool Enumerable { get; set; } + /// <summary> + /// Gets or sets True if the result was thrown during the evaluation. + /// </summary> + public bool WasThrown { get; set; } + /// <summary> + /// Gets or sets True if the property is owned for the object. + /// </summary> + public bool IsOwn { get; set; } + /// <summary> + /// Gets or sets Property symbol object, if the property is of the <code>symbol</code> type. + /// </summary> + public RemoteObject Symbol { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/Runtime/PropertyPreview.cs b/ChromeDevTools/Protocol/Runtime/PropertyPreview.cs new file mode 100644 index 0000000000000000000000000000000000000000..29eb466a3d6ae18b372e8cfdbffa4345b4fc10ab --- /dev/null +++ b/ChromeDevTools/Protocol/Runtime/PropertyPreview.cs @@ -0,0 +1,32 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Runtime +{ + /// <summary> + /// + /// </summary> + public class PropertyPreview + { + /// <summary> + /// Gets or sets Property name. + /// </summary> + public string Name { get; set; } + /// <summary> + /// Gets or sets Object type. Accessor means that the property itself is an accessor property. + /// </summary> + public string Type { get; set; } + /// <summary> + /// Gets or sets User-friendly property value string. + /// </summary> + public string Value { get; set; } + /// <summary> + /// Gets or sets Nested value preview. + /// </summary> + public ObjectPreview ValuePreview { get; set; } + /// <summary> + /// Gets or sets Object subtype hint. Specified for <code>object</code> type values only. + /// </summary> + public string Subtype { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/Runtime/ReleaseObjectCommand.cs b/ChromeDevTools/Protocol/Runtime/ReleaseObjectCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..2b7314d09f20edba4b35b0766bf99fb207d8f365 --- /dev/null +++ b/ChromeDevTools/Protocol/Runtime/ReleaseObjectCommand.cs @@ -0,0 +1,17 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Runtime +{ + /// <summary> + /// Releases remote object with given id. + /// </summary> + [Command(ProtocolName.Runtime.ReleaseObject)] + public class ReleaseObjectCommand + { + /// <summary> + /// Gets or sets Identifier of the object to release. + /// </summary> + public string ObjectId { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/Runtime/ReleaseObjectCommandResponse.cs b/ChromeDevTools/Protocol/Runtime/ReleaseObjectCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..3535475d6b6b7971af3505ada1642451c89bc36a --- /dev/null +++ b/ChromeDevTools/Protocol/Runtime/ReleaseObjectCommandResponse.cs @@ -0,0 +1,13 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Runtime +{ + /// <summary> + /// Releases remote object with given id. + /// </summary> + [CommandResponse(ProtocolName.Runtime.ReleaseObject)] + public class ReleaseObjectCommandResponse + { + } +} diff --git a/ChromeDevTools/Protocol/Runtime/ReleaseObjectGroupCommand.cs b/ChromeDevTools/Protocol/Runtime/ReleaseObjectGroupCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..b79ba4a6113df2d8b938a60139252657863c30c6 --- /dev/null +++ b/ChromeDevTools/Protocol/Runtime/ReleaseObjectGroupCommand.cs @@ -0,0 +1,17 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Runtime +{ + /// <summary> + /// Releases all remote objects that belong to a given group. + /// </summary> + [Command(ProtocolName.Runtime.ReleaseObjectGroup)] + public class ReleaseObjectGroupCommand + { + /// <summary> + /// Gets or sets Symbolic object group name. + /// </summary> + public string ObjectGroup { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/Runtime/ReleaseObjectGroupCommandResponse.cs b/ChromeDevTools/Protocol/Runtime/ReleaseObjectGroupCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..b6f7027d045805cf88f310eb20fe57ac310a6fd5 --- /dev/null +++ b/ChromeDevTools/Protocol/Runtime/ReleaseObjectGroupCommandResponse.cs @@ -0,0 +1,13 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Runtime +{ + /// <summary> + /// Releases all remote objects that belong to a given group. + /// </summary> + [CommandResponse(ProtocolName.Runtime.ReleaseObjectGroup)] + public class ReleaseObjectGroupCommandResponse + { + } +} diff --git a/ChromeDevTools/Protocol/Runtime/RemoteObject.cs b/ChromeDevTools/Protocol/Runtime/RemoteObject.cs new file mode 100644 index 0000000000000000000000000000000000000000..098371ca1f5953e6a64cf3c7b2022e5245cded35 --- /dev/null +++ b/ChromeDevTools/Protocol/Runtime/RemoteObject.cs @@ -0,0 +1,44 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Runtime +{ + /// <summary> + /// Mirror object referencing original JavaScript object. + /// </summary> + public class RemoteObject + { + /// <summary> + /// Gets or sets Object type. + /// </summary> + public string Type { get; set; } + /// <summary> + /// Gets or sets Object subtype hint. Specified for <code>object</code> type values only. + /// </summary> + public string Subtype { get; set; } + /// <summary> + /// Gets or sets Object class (constructor) name. Specified for <code>object</code> type values only. + /// </summary> + public string ClassName { get; set; } + /// <summary> + /// Gets or sets Remote object value in case of primitive values or JSON values (if it was requested), or description string if the value can not be JSON-stringified (like NaN, Infinity, -Infinity, -0). + /// </summary> + public object Value { get; set; } + /// <summary> + /// Gets or sets String representation of the object. + /// </summary> + public string Description { get; set; } + /// <summary> + /// Gets or sets Unique object identifier (for non-primitive values). + /// </summary> + public string ObjectId { get; set; } + /// <summary> + /// Gets or sets Preview containing abbreviated property values. Specified for <code>object</code> type values only. + /// </summary> + public ObjectPreview Preview { get; set; } + /// <summary> + /// Gets or sets CustomPreview + /// </summary> + public CustomPreview CustomPreview { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/Runtime/RunCommand.cs b/ChromeDevTools/Protocol/Runtime/RunCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..65393b96256308652a0926ff69632af654728f22 --- /dev/null +++ b/ChromeDevTools/Protocol/Runtime/RunCommand.cs @@ -0,0 +1,13 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Runtime +{ + /// <summary> + /// Tells inspected instance(worker or page) that it can run in case it was started paused. + /// </summary> + [Command(ProtocolName.Runtime.Run)] + public class RunCommand + { + } +} diff --git a/ChromeDevTools/Protocol/Runtime/RunCommandResponse.cs b/ChromeDevTools/Protocol/Runtime/RunCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..4659105c912fda77b85d46205c27e16a27216268 --- /dev/null +++ b/ChromeDevTools/Protocol/Runtime/RunCommandResponse.cs @@ -0,0 +1,13 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Runtime +{ + /// <summary> + /// Tells inspected instance(worker or page) that it can run in case it was started paused. + /// </summary> + [CommandResponse(ProtocolName.Runtime.Run)] + public class RunCommandResponse + { + } +} diff --git a/ChromeDevTools/Protocol/Runtime/SetCustomObjectFormatterEnabledCommand.cs b/ChromeDevTools/Protocol/Runtime/SetCustomObjectFormatterEnabledCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..15ef161acf8085551744167932f222a777211661 --- /dev/null +++ b/ChromeDevTools/Protocol/Runtime/SetCustomObjectFormatterEnabledCommand.cs @@ -0,0 +1,14 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Runtime +{ + [Command(ProtocolName.Runtime.SetCustomObjectFormatterEnabled)] + public class SetCustomObjectFormatterEnabledCommand + { + /// <summary> + /// Gets or sets Enabled + /// </summary> + public bool Enabled { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/Runtime/SetCustomObjectFormatterEnabledCommandResponse.cs b/ChromeDevTools/Protocol/Runtime/SetCustomObjectFormatterEnabledCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..ce0902219661ef309ea9401047cad92e48dd36c4 --- /dev/null +++ b/ChromeDevTools/Protocol/Runtime/SetCustomObjectFormatterEnabledCommandResponse.cs @@ -0,0 +1,10 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Runtime +{ + [CommandResponse(ProtocolName.Runtime.SetCustomObjectFormatterEnabled)] + public class SetCustomObjectFormatterEnabledCommandResponse + { + } +} diff --git a/ChromeDevTools/Protocol/ServiceWorker/DebugOnStartUpdatedEvent.cs b/ChromeDevTools/Protocol/ServiceWorker/DebugOnStartUpdatedEvent.cs new file mode 100644 index 0000000000000000000000000000000000000000..e8bf3d7499ea2e72270b263285820d2f8183d7f2 --- /dev/null +++ b/ChromeDevTools/Protocol/ServiceWorker/DebugOnStartUpdatedEvent.cs @@ -0,0 +1,13 @@ +using ChromeDevTools; + +namespace ChromeDevTools.Protocol.ServiceWorker +{ + [Event(ProtocolName.ServiceWorker.DebugOnStartUpdated)] + public class DebugOnStartUpdatedEvent + { + /// <summary> + /// Gets or sets DebugOnStart + /// </summary> + public bool DebugOnStart { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/ServiceWorker/DeliverPushMessageCommand.cs b/ChromeDevTools/Protocol/ServiceWorker/DeliverPushMessageCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..9dae49f78450504ed9eed4e87fff83690dba574b --- /dev/null +++ b/ChromeDevTools/Protocol/ServiceWorker/DeliverPushMessageCommand.cs @@ -0,0 +1,22 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.ServiceWorker +{ + [Command(ProtocolName.ServiceWorker.DeliverPushMessage)] + public class DeliverPushMessageCommand + { + /// <summary> + /// Gets or sets Origin + /// </summary> + public string Origin { get; set; } + /// <summary> + /// Gets or sets RegistrationId + /// </summary> + public string RegistrationId { get; set; } + /// <summary> + /// Gets or sets Data + /// </summary> + public string Data { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/ServiceWorker/DeliverPushMessageCommandResponse.cs b/ChromeDevTools/Protocol/ServiceWorker/DeliverPushMessageCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..92c28543d3c783d7ad14fdfb5489735f76c0c413 --- /dev/null +++ b/ChromeDevTools/Protocol/ServiceWorker/DeliverPushMessageCommandResponse.cs @@ -0,0 +1,10 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.ServiceWorker +{ + [CommandResponse(ProtocolName.ServiceWorker.DeliverPushMessage)] + public class DeliverPushMessageCommandResponse + { + } +} diff --git a/ChromeDevTools/Protocol/ServiceWorker/DisableCommand.cs b/ChromeDevTools/Protocol/ServiceWorker/DisableCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..77dae145a6c8ae24d5714696cef6de536f330876 --- /dev/null +++ b/ChromeDevTools/Protocol/ServiceWorker/DisableCommand.cs @@ -0,0 +1,10 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.ServiceWorker +{ + [Command(ProtocolName.ServiceWorker.Disable)] + public class DisableCommand + { + } +} diff --git a/ChromeDevTools/Protocol/ServiceWorker/DisableCommandResponse.cs b/ChromeDevTools/Protocol/ServiceWorker/DisableCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..3b9f6f584f9271d1c4aee14142b8bd6f7eb92974 --- /dev/null +++ b/ChromeDevTools/Protocol/ServiceWorker/DisableCommandResponse.cs @@ -0,0 +1,10 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.ServiceWorker +{ + [CommandResponse(ProtocolName.ServiceWorker.Disable)] + public class DisableCommandResponse + { + } +} diff --git a/ChromeDevTools/Protocol/ServiceWorker/DispatchMessageEvent.cs b/ChromeDevTools/Protocol/ServiceWorker/DispatchMessageEvent.cs new file mode 100644 index 0000000000000000000000000000000000000000..8c48cef93d4a4f4977e5c60d9a7e10384b8796ae --- /dev/null +++ b/ChromeDevTools/Protocol/ServiceWorker/DispatchMessageEvent.cs @@ -0,0 +1,17 @@ +using ChromeDevTools; + +namespace ChromeDevTools.Protocol.ServiceWorker +{ + [Event(ProtocolName.ServiceWorker.DispatchMessage)] + public class DispatchMessageEvent + { + /// <summary> + /// Gets or sets WorkerId + /// </summary> + public string WorkerId { get; set; } + /// <summary> + /// Gets or sets Message + /// </summary> + public string Message { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/ServiceWorker/EnableCommand.cs b/ChromeDevTools/Protocol/ServiceWorker/EnableCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..217d3eeba9af08876caeff82c4012f79ca1be6db --- /dev/null +++ b/ChromeDevTools/Protocol/ServiceWorker/EnableCommand.cs @@ -0,0 +1,10 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.ServiceWorker +{ + [Command(ProtocolName.ServiceWorker.Enable)] + public class EnableCommand + { + } +} diff --git a/ChromeDevTools/Protocol/ServiceWorker/EnableCommandResponse.cs b/ChromeDevTools/Protocol/ServiceWorker/EnableCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..3d318cf1c118d1b012347677857b7facf6fb4cc3 --- /dev/null +++ b/ChromeDevTools/Protocol/ServiceWorker/EnableCommandResponse.cs @@ -0,0 +1,10 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.ServiceWorker +{ + [CommandResponse(ProtocolName.ServiceWorker.Enable)] + public class EnableCommandResponse + { + } +} diff --git a/ChromeDevTools/Protocol/ServiceWorker/InspectWorkerCommand.cs b/ChromeDevTools/Protocol/ServiceWorker/InspectWorkerCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..36e574b128eee689aa8fcea805de822f1584616b --- /dev/null +++ b/ChromeDevTools/Protocol/ServiceWorker/InspectWorkerCommand.cs @@ -0,0 +1,14 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.ServiceWorker +{ + [Command(ProtocolName.ServiceWorker.InspectWorker)] + public class InspectWorkerCommand + { + /// <summary> + /// Gets or sets VersionId + /// </summary> + public string VersionId { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/ServiceWorker/InspectWorkerCommandResponse.cs b/ChromeDevTools/Protocol/ServiceWorker/InspectWorkerCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..68ef97c9348d58ad0b23f723e2d0ef2ab7201e49 --- /dev/null +++ b/ChromeDevTools/Protocol/ServiceWorker/InspectWorkerCommandResponse.cs @@ -0,0 +1,10 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.ServiceWorker +{ + [CommandResponse(ProtocolName.ServiceWorker.InspectWorker)] + public class InspectWorkerCommandResponse + { + } +} diff --git a/ChromeDevTools/Protocol/ServiceWorker/SendMessageCommand.cs b/ChromeDevTools/Protocol/ServiceWorker/SendMessageCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..0509fb6ee70e2d9d0497cce24fc9e92da7f798c2 --- /dev/null +++ b/ChromeDevTools/Protocol/ServiceWorker/SendMessageCommand.cs @@ -0,0 +1,18 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.ServiceWorker +{ + [Command(ProtocolName.ServiceWorker.SendMessage)] + public class SendMessageCommand + { + /// <summary> + /// Gets or sets WorkerId + /// </summary> + public string WorkerId { get; set; } + /// <summary> + /// Gets or sets Message + /// </summary> + public string Message { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/ServiceWorker/SendMessageCommandResponse.cs b/ChromeDevTools/Protocol/ServiceWorker/SendMessageCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..daeba5c2a43c6e11e64c9291d20b28725137a015 --- /dev/null +++ b/ChromeDevTools/Protocol/ServiceWorker/SendMessageCommandResponse.cs @@ -0,0 +1,10 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.ServiceWorker +{ + [CommandResponse(ProtocolName.ServiceWorker.SendMessage)] + public class SendMessageCommandResponse + { + } +} diff --git a/ChromeDevTools/Protocol/ServiceWorker/ServiceWorkerErrorMessage.cs b/ChromeDevTools/Protocol/ServiceWorker/ServiceWorkerErrorMessage.cs new file mode 100644 index 0000000000000000000000000000000000000000..8b747befda95894a732c5e40d788affe82d9db5c --- /dev/null +++ b/ChromeDevTools/Protocol/ServiceWorker/ServiceWorkerErrorMessage.cs @@ -0,0 +1,36 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.ServiceWorker +{ + /// <summary> + /// ServiceWorker error message. + /// </summary> + public class ServiceWorkerErrorMessage + { + /// <summary> + /// Gets or sets ErrorMessage + /// </summary> + public string ErrorMessage { get; set; } + /// <summary> + /// Gets or sets RegistrationId + /// </summary> + public string RegistrationId { get; set; } + /// <summary> + /// Gets or sets VersionId + /// </summary> + public string VersionId { get; set; } + /// <summary> + /// Gets or sets SourceURL + /// </summary> + public string SourceURL { get; set; } + /// <summary> + /// Gets or sets LineNumber + /// </summary> + public long LineNumber { get; set; } + /// <summary> + /// Gets or sets ColumnNumber + /// </summary> + public long ColumnNumber { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/ServiceWorker/ServiceWorkerRegistration.cs b/ChromeDevTools/Protocol/ServiceWorker/ServiceWorkerRegistration.cs new file mode 100644 index 0000000000000000000000000000000000000000..e25ea091ac8222de984dcd77a8115190dbe43537 --- /dev/null +++ b/ChromeDevTools/Protocol/ServiceWorker/ServiceWorkerRegistration.cs @@ -0,0 +1,24 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.ServiceWorker +{ + /// <summary> + /// ServiceWorker registration. + /// </summary> + public class ServiceWorkerRegistration + { + /// <summary> + /// Gets or sets RegistrationId + /// </summary> + public string RegistrationId { get; set; } + /// <summary> + /// Gets or sets ScopeURL + /// </summary> + public string ScopeURL { get; set; } + /// <summary> + /// Gets or sets IsDeleted + /// </summary> + public bool IsDeleted { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/ServiceWorker/ServiceWorkerVersion.cs b/ChromeDevTools/Protocol/ServiceWorker/ServiceWorkerVersion.cs new file mode 100644 index 0000000000000000000000000000000000000000..44bf97cb3612160e93cd2fcbec5f945260cec5dd --- /dev/null +++ b/ChromeDevTools/Protocol/ServiceWorker/ServiceWorkerVersion.cs @@ -0,0 +1,40 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.ServiceWorker +{ + /// <summary> + /// ServiceWorker version. + /// </summary> + public class ServiceWorkerVersion + { + /// <summary> + /// Gets or sets VersionId + /// </summary> + public string VersionId { get; set; } + /// <summary> + /// Gets or sets RegistrationId + /// </summary> + public string RegistrationId { get; set; } + /// <summary> + /// Gets or sets ScriptURL + /// </summary> + public string ScriptURL { get; set; } + /// <summary> + /// Gets or sets RunningStatus + /// </summary> + public ServiceWorkerVersionRunningStatus RunningStatus { get; set; } + /// <summary> + /// Gets or sets Status + /// </summary> + public ServiceWorkerVersionStatus Status { get; set; } + /// <summary> + /// Gets or sets The Last-Modified header value of the main script. + /// </summary> + public double ScriptLastModified { get; set; } + /// <summary> + /// Gets or sets The time at which the response headers of the main script were received from the server. For cached script it is the last time the cache entry was validated. + /// </summary> + public double ScriptResponseTime { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/ServiceWorker/ServiceWorkerVersionRunningStatus.cs b/ChromeDevTools/Protocol/ServiceWorker/ServiceWorkerVersionRunningStatus.cs new file mode 100644 index 0000000000000000000000000000000000000000..8d1ba5610b5ad5cbb79b3b26963195f56e70f99f --- /dev/null +++ b/ChromeDevTools/Protocol/ServiceWorker/ServiceWorkerVersionRunningStatus.cs @@ -0,0 +1,14 @@ +using ChromeDevTools; + +namespace ChromeDevTools.Protocol.ServiceWorker{ + /// <summary> + /// + /// </summary> + public enum ServiceWorkerVersionRunningStatus + { + Stopped, + Starting, + Running, + Stopping, + } +} diff --git a/ChromeDevTools/Protocol/ServiceWorker/ServiceWorkerVersionStatus.cs b/ChromeDevTools/Protocol/ServiceWorker/ServiceWorkerVersionStatus.cs new file mode 100644 index 0000000000000000000000000000000000000000..58fdb7d057af00f26684fa1b9208aac2c7890423 --- /dev/null +++ b/ChromeDevTools/Protocol/ServiceWorker/ServiceWorkerVersionStatus.cs @@ -0,0 +1,16 @@ +using ChromeDevTools; + +namespace ChromeDevTools.Protocol.ServiceWorker{ + /// <summary> + /// + /// </summary> + public enum ServiceWorkerVersionStatus + { + New, + Installing, + Installed, + Activating, + Activated, + Redundant, + } +} diff --git a/ChromeDevTools/Protocol/ServiceWorker/SetDebugOnStartCommand.cs b/ChromeDevTools/Protocol/ServiceWorker/SetDebugOnStartCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..6d793be1319c70e2de6963d271f0866ffea319f6 --- /dev/null +++ b/ChromeDevTools/Protocol/ServiceWorker/SetDebugOnStartCommand.cs @@ -0,0 +1,14 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.ServiceWorker +{ + [Command(ProtocolName.ServiceWorker.SetDebugOnStart)] + public class SetDebugOnStartCommand + { + /// <summary> + /// Gets or sets DebugOnStart + /// </summary> + public bool DebugOnStart { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/ServiceWorker/SetDebugOnStartCommandResponse.cs b/ChromeDevTools/Protocol/ServiceWorker/SetDebugOnStartCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..e4a19338d786b5582b475d2ab83ae94a8e26943f --- /dev/null +++ b/ChromeDevTools/Protocol/ServiceWorker/SetDebugOnStartCommandResponse.cs @@ -0,0 +1,10 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.ServiceWorker +{ + [CommandResponse(ProtocolName.ServiceWorker.SetDebugOnStart)] + public class SetDebugOnStartCommandResponse + { + } +} diff --git a/ChromeDevTools/Protocol/ServiceWorker/StartWorkerCommand.cs b/ChromeDevTools/Protocol/ServiceWorker/StartWorkerCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..d8ff96e7d7b753cd26045f2cd11976586ac9eea4 --- /dev/null +++ b/ChromeDevTools/Protocol/ServiceWorker/StartWorkerCommand.cs @@ -0,0 +1,14 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.ServiceWorker +{ + [Command(ProtocolName.ServiceWorker.StartWorker)] + public class StartWorkerCommand + { + /// <summary> + /// Gets or sets ScopeURL + /// </summary> + public string ScopeURL { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/ServiceWorker/StartWorkerCommandResponse.cs b/ChromeDevTools/Protocol/ServiceWorker/StartWorkerCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..d3ad3548178cc82fcfdc135642fa26857e94caa6 --- /dev/null +++ b/ChromeDevTools/Protocol/ServiceWorker/StartWorkerCommandResponse.cs @@ -0,0 +1,10 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.ServiceWorker +{ + [CommandResponse(ProtocolName.ServiceWorker.StartWorker)] + public class StartWorkerCommandResponse + { + } +} diff --git a/ChromeDevTools/Protocol/ServiceWorker/StopCommand.cs b/ChromeDevTools/Protocol/ServiceWorker/StopCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..5b7fdc450812ca569b3ed655f7956afeaf28573a --- /dev/null +++ b/ChromeDevTools/Protocol/ServiceWorker/StopCommand.cs @@ -0,0 +1,14 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.ServiceWorker +{ + [Command(ProtocolName.ServiceWorker.Stop)] + public class StopCommand + { + /// <summary> + /// Gets or sets WorkerId + /// </summary> + public string WorkerId { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/ServiceWorker/StopCommandResponse.cs b/ChromeDevTools/Protocol/ServiceWorker/StopCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..c61186bff1431f719847580f5b566aeaec4bc70c --- /dev/null +++ b/ChromeDevTools/Protocol/ServiceWorker/StopCommandResponse.cs @@ -0,0 +1,10 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.ServiceWorker +{ + [CommandResponse(ProtocolName.ServiceWorker.Stop)] + public class StopCommandResponse + { + } +} diff --git a/ChromeDevTools/Protocol/ServiceWorker/StopWorkerCommand.cs b/ChromeDevTools/Protocol/ServiceWorker/StopWorkerCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..21682cca87893efbcf100ed9edc6d176ce696bc8 --- /dev/null +++ b/ChromeDevTools/Protocol/ServiceWorker/StopWorkerCommand.cs @@ -0,0 +1,14 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.ServiceWorker +{ + [Command(ProtocolName.ServiceWorker.StopWorker)] + public class StopWorkerCommand + { + /// <summary> + /// Gets or sets VersionId + /// </summary> + public string VersionId { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/ServiceWorker/StopWorkerCommandResponse.cs b/ChromeDevTools/Protocol/ServiceWorker/StopWorkerCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..b8e3e3bfbbdd9609dea7bc9d50ae9cc68069c2e6 --- /dev/null +++ b/ChromeDevTools/Protocol/ServiceWorker/StopWorkerCommandResponse.cs @@ -0,0 +1,10 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.ServiceWorker +{ + [CommandResponse(ProtocolName.ServiceWorker.StopWorker)] + public class StopWorkerCommandResponse + { + } +} diff --git a/ChromeDevTools/Protocol/ServiceWorker/UnregisterCommand.cs b/ChromeDevTools/Protocol/ServiceWorker/UnregisterCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..e3b0464fea1b54a85605a5cc051c0ac355d01c2d --- /dev/null +++ b/ChromeDevTools/Protocol/ServiceWorker/UnregisterCommand.cs @@ -0,0 +1,14 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.ServiceWorker +{ + [Command(ProtocolName.ServiceWorker.Unregister)] + public class UnregisterCommand + { + /// <summary> + /// Gets or sets ScopeURL + /// </summary> + public string ScopeURL { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/ServiceWorker/UnregisterCommandResponse.cs b/ChromeDevTools/Protocol/ServiceWorker/UnregisterCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..9b70f7437fdf4a7060091644c716e51a0dc1ec66 --- /dev/null +++ b/ChromeDevTools/Protocol/ServiceWorker/UnregisterCommandResponse.cs @@ -0,0 +1,10 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.ServiceWorker +{ + [CommandResponse(ProtocolName.ServiceWorker.Unregister)] + public class UnregisterCommandResponse + { + } +} diff --git a/ChromeDevTools/Protocol/ServiceWorker/UpdateRegistrationCommand.cs b/ChromeDevTools/Protocol/ServiceWorker/UpdateRegistrationCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..d72991c74dc251b7740878e988232b9553579d02 --- /dev/null +++ b/ChromeDevTools/Protocol/ServiceWorker/UpdateRegistrationCommand.cs @@ -0,0 +1,14 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.ServiceWorker +{ + [Command(ProtocolName.ServiceWorker.UpdateRegistration)] + public class UpdateRegistrationCommand + { + /// <summary> + /// Gets or sets ScopeURL + /// </summary> + public string ScopeURL { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/ServiceWorker/UpdateRegistrationCommandResponse.cs b/ChromeDevTools/Protocol/ServiceWorker/UpdateRegistrationCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..0439baa025f364a02a42ef57ab790baafda78760 --- /dev/null +++ b/ChromeDevTools/Protocol/ServiceWorker/UpdateRegistrationCommandResponse.cs @@ -0,0 +1,10 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.ServiceWorker +{ + [CommandResponse(ProtocolName.ServiceWorker.UpdateRegistration)] + public class UpdateRegistrationCommandResponse + { + } +} diff --git a/ChromeDevTools/Protocol/ServiceWorker/WorkerCreatedEvent.cs b/ChromeDevTools/Protocol/ServiceWorker/WorkerCreatedEvent.cs new file mode 100644 index 0000000000000000000000000000000000000000..7ca4696374c2524c1bd1d9ebee203898ac5fc3e0 --- /dev/null +++ b/ChromeDevTools/Protocol/ServiceWorker/WorkerCreatedEvent.cs @@ -0,0 +1,17 @@ +using ChromeDevTools; + +namespace ChromeDevTools.Protocol.ServiceWorker +{ + [Event(ProtocolName.ServiceWorker.WorkerCreated)] + public class WorkerCreatedEvent + { + /// <summary> + /// Gets or sets WorkerId + /// </summary> + public string WorkerId { get; set; } + /// <summary> + /// Gets or sets Url + /// </summary> + public string Url { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/ServiceWorker/WorkerErrorReportedEvent.cs b/ChromeDevTools/Protocol/ServiceWorker/WorkerErrorReportedEvent.cs new file mode 100644 index 0000000000000000000000000000000000000000..63c8aa346fbd994a21d187d34579e279ce3b442b --- /dev/null +++ b/ChromeDevTools/Protocol/ServiceWorker/WorkerErrorReportedEvent.cs @@ -0,0 +1,13 @@ +using ChromeDevTools; + +namespace ChromeDevTools.Protocol.ServiceWorker +{ + [Event(ProtocolName.ServiceWorker.WorkerErrorReported)] + public class WorkerErrorReportedEvent + { + /// <summary> + /// Gets or sets ErrorMessage + /// </summary> + public ServiceWorkerErrorMessage ErrorMessage { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/ServiceWorker/WorkerRegistrationUpdatedEvent.cs b/ChromeDevTools/Protocol/ServiceWorker/WorkerRegistrationUpdatedEvent.cs new file mode 100644 index 0000000000000000000000000000000000000000..a1e105c8d0f831c8f8b76e75fcc208685fe16a46 --- /dev/null +++ b/ChromeDevTools/Protocol/ServiceWorker/WorkerRegistrationUpdatedEvent.cs @@ -0,0 +1,13 @@ +using ChromeDevTools; + +namespace ChromeDevTools.Protocol.ServiceWorker +{ + [Event(ProtocolName.ServiceWorker.WorkerRegistrationUpdated)] + public class WorkerRegistrationUpdatedEvent + { + /// <summary> + /// Gets or sets Registrations + /// </summary> + public ServiceWorkerRegistration[] Registrations { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/ServiceWorker/WorkerTerminatedEvent.cs b/ChromeDevTools/Protocol/ServiceWorker/WorkerTerminatedEvent.cs new file mode 100644 index 0000000000000000000000000000000000000000..699ae678efe6d9ead71e17960860bd0661e903f1 --- /dev/null +++ b/ChromeDevTools/Protocol/ServiceWorker/WorkerTerminatedEvent.cs @@ -0,0 +1,13 @@ +using ChromeDevTools; + +namespace ChromeDevTools.Protocol.ServiceWorker +{ + [Event(ProtocolName.ServiceWorker.WorkerTerminated)] + public class WorkerTerminatedEvent + { + /// <summary> + /// Gets or sets WorkerId + /// </summary> + public string WorkerId { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/ServiceWorker/WorkerVersionUpdatedEvent.cs b/ChromeDevTools/Protocol/ServiceWorker/WorkerVersionUpdatedEvent.cs new file mode 100644 index 0000000000000000000000000000000000000000..aed0eac85e17326e8320a6dba8d91f980c128267 --- /dev/null +++ b/ChromeDevTools/Protocol/ServiceWorker/WorkerVersionUpdatedEvent.cs @@ -0,0 +1,13 @@ +using ChromeDevTools; + +namespace ChromeDevTools.Protocol.ServiceWorker +{ + [Event(ProtocolName.ServiceWorker.WorkerVersionUpdated)] + public class WorkerVersionUpdatedEvent + { + /// <summary> + /// Gets or sets Versions + /// </summary> + public ServiceWorkerVersion[] Versions { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/Timeline/DisableCommand.cs b/ChromeDevTools/Protocol/Timeline/DisableCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..cf9d4482823238013b2c952dbd06e6cc6814408f --- /dev/null +++ b/ChromeDevTools/Protocol/Timeline/DisableCommand.cs @@ -0,0 +1,13 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Timeline +{ + /// <summary> + /// Deprecated. + /// </summary> + [Command(ProtocolName.Timeline.Disable)] + public class DisableCommand + { + } +} diff --git a/ChromeDevTools/Protocol/Timeline/DisableCommandResponse.cs b/ChromeDevTools/Protocol/Timeline/DisableCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..e21ebacda9a9d7f31b3a3a0ea1661555d5918307 --- /dev/null +++ b/ChromeDevTools/Protocol/Timeline/DisableCommandResponse.cs @@ -0,0 +1,13 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Timeline +{ + /// <summary> + /// Deprecated. + /// </summary> + [CommandResponse(ProtocolName.Timeline.Disable)] + public class DisableCommandResponse + { + } +} diff --git a/ChromeDevTools/Protocol/Timeline/EnableCommand.cs b/ChromeDevTools/Protocol/Timeline/EnableCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..db74975d6e85c5010c18d86fb8b8f201f6bf4cad --- /dev/null +++ b/ChromeDevTools/Protocol/Timeline/EnableCommand.cs @@ -0,0 +1,13 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Timeline +{ + /// <summary> + /// Deprecated. + /// </summary> + [Command(ProtocolName.Timeline.Enable)] + public class EnableCommand + { + } +} diff --git a/ChromeDevTools/Protocol/Timeline/EnableCommandResponse.cs b/ChromeDevTools/Protocol/Timeline/EnableCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..f8335a09ff79a94f354ca64cf71d660fa18f022a --- /dev/null +++ b/ChromeDevTools/Protocol/Timeline/EnableCommandResponse.cs @@ -0,0 +1,13 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Timeline +{ + /// <summary> + /// Deprecated. + /// </summary> + [CommandResponse(ProtocolName.Timeline.Enable)] + public class EnableCommandResponse + { + } +} diff --git a/ChromeDevTools/Protocol/Timeline/EventRecordedEvent.cs b/ChromeDevTools/Protocol/Timeline/EventRecordedEvent.cs new file mode 100644 index 0000000000000000000000000000000000000000..896b194c45d582726c896fbad8ae57dc301efdd9 --- /dev/null +++ b/ChromeDevTools/Protocol/Timeline/EventRecordedEvent.cs @@ -0,0 +1,16 @@ +using ChromeDevTools; + +namespace ChromeDevTools.Protocol.Timeline +{ + /// <summary> + /// Deprecated. + /// </summary> + [Event(ProtocolName.Timeline.EventRecorded)] + public class EventRecordedEvent + { + /// <summary> + /// Gets or sets Timeline event record data. + /// </summary> + public TimelineEvent Record { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/Timeline/StartCommand.cs b/ChromeDevTools/Protocol/Timeline/StartCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..08fb2c5e3f458082ae7818c57fbc84f17d85ab26 --- /dev/null +++ b/ChromeDevTools/Protocol/Timeline/StartCommand.cs @@ -0,0 +1,33 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Timeline +{ + /// <summary> + /// Deprecated. + /// </summary> + [Command(ProtocolName.Timeline.Start)] + public class StartCommand + { + /// <summary> + /// Gets or sets Samples JavaScript stack traces up to <code>maxCallStackDepth</code>, defaults to 5. + /// </summary> + public long MaxCallStackDepth { get; set; } + /// <summary> + /// Gets or sets Whether instrumentation events should be buffered and returned upon <code>stop</code> call. + /// </summary> + public bool BufferEvents { get; set; } + /// <summary> + /// Gets or sets Coma separated event types to issue although bufferEvents is set. + /// </summary> + public string LiveEvents { get; set; } + /// <summary> + /// Gets or sets Whether counters data should be included into timeline events. + /// </summary> + public bool IncludeCounters { get; set; } + /// <summary> + /// Gets or sets Whether events from GPU process should be collected. + /// </summary> + public bool IncludeGPUEvents { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/Timeline/StartCommandResponse.cs b/ChromeDevTools/Protocol/Timeline/StartCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..68ff81747b524a41c3cce121bc04dc170fd483a4 --- /dev/null +++ b/ChromeDevTools/Protocol/Timeline/StartCommandResponse.cs @@ -0,0 +1,13 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Timeline +{ + /// <summary> + /// Deprecated. + /// </summary> + [CommandResponse(ProtocolName.Timeline.Start)] + public class StartCommandResponse + { + } +} diff --git a/ChromeDevTools/Protocol/Timeline/StopCommand.cs b/ChromeDevTools/Protocol/Timeline/StopCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..b604efec42e764b2755e90f08d391b23c4397230 --- /dev/null +++ b/ChromeDevTools/Protocol/Timeline/StopCommand.cs @@ -0,0 +1,13 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Timeline +{ + /// <summary> + /// Deprecated. + /// </summary> + [Command(ProtocolName.Timeline.Stop)] + public class StopCommand + { + } +} diff --git a/ChromeDevTools/Protocol/Timeline/StopCommandResponse.cs b/ChromeDevTools/Protocol/Timeline/StopCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..fddedb0514333acdc37d9675da98a3d16df78686 --- /dev/null +++ b/ChromeDevTools/Protocol/Timeline/StopCommandResponse.cs @@ -0,0 +1,13 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Timeline +{ + /// <summary> + /// Deprecated. + /// </summary> + [CommandResponse(ProtocolName.Timeline.Stop)] + public class StopCommandResponse + { + } +} diff --git a/ChromeDevTools/Protocol/Timeline/TimelineEvent.cs b/ChromeDevTools/Protocol/Timeline/TimelineEvent.cs new file mode 100644 index 0000000000000000000000000000000000000000..706b5c3ea6148b236ca4f9770acc271411432b80 --- /dev/null +++ b/ChromeDevTools/Protocol/Timeline/TimelineEvent.cs @@ -0,0 +1,44 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Timeline +{ + /// <summary> + /// Timeline record contains information about the recorded activity. + /// </summary> + public class TimelineEvent + { + /// <summary> + /// Gets or sets Event type. + /// </summary> + public string Type { get; set; } + /// <summary> + /// Gets or sets Event data. + /// </summary> + public object Data { get; set; } + /// <summary> + /// Gets or sets Start time. + /// </summary> + public double StartTime { get; set; } + /// <summary> + /// Gets or sets End time. + /// </summary> + public double EndTime { get; set; } + /// <summary> + /// Gets or sets Nested records. + /// </summary> + public TimelineEvent[] Children { get; set; } + /// <summary> + /// Gets or sets If present, identifies the thread that produced the event. + /// </summary> + public string Thread { get; set; } + /// <summary> + /// Gets or sets Stack trace. + /// </summary> + public Console.CallFrame[] StackTrace { get; set; } + /// <summary> + /// Gets or sets Unique identifier of the frame within the page that the event relates to. + /// </summary> + public string FrameId { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/Tracing/BufferUsageEvent.cs b/ChromeDevTools/Protocol/Tracing/BufferUsageEvent.cs new file mode 100644 index 0000000000000000000000000000000000000000..fdde39a5e6176bb520f56f38f412f863dfefd113 --- /dev/null +++ b/ChromeDevTools/Protocol/Tracing/BufferUsageEvent.cs @@ -0,0 +1,21 @@ +using ChromeDevTools; + +namespace ChromeDevTools.Protocol.Tracing +{ + [Event(ProtocolName.Tracing.BufferUsage)] + public class BufferUsageEvent + { + /// <summary> + /// Gets or sets A number in range [0..1] that indicates the used size of event buffer as a fraction of its total size. + /// </summary> + public double PercentFull { get; set; } + /// <summary> + /// Gets or sets An approximate number of events in the trace log. + /// </summary> + public double EventCount { get; set; } + /// <summary> + /// Gets or sets A number in range [0..1] that indicates the used size of event buffer as a fraction of its total size. + /// </summary> + public double Value { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/Tracing/DataCollectedEvent.cs b/ChromeDevTools/Protocol/Tracing/DataCollectedEvent.cs new file mode 100644 index 0000000000000000000000000000000000000000..819413f2e5171b5712409943f15fe2e027fca402 --- /dev/null +++ b/ChromeDevTools/Protocol/Tracing/DataCollectedEvent.cs @@ -0,0 +1,20 @@ +using ChromeDevTools; + +namespace ChromeDevTools.Protocol.Tracing +{ + /// <summary> + /// Contains an bucket of collected trace events. When tracing is stopped collected events will be send as a sequence of dataCollected events followed by tracingComplete event. + /// </summary> + [Event(ProtocolName.Tracing.DataCollected)] + public class DataCollectedEvent + { + public class ValueArray + { + } + + /// <summary> + /// Gets or sets Value + /// </summary> + public ValueArray[] Value { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/Tracing/EndCommand.cs b/ChromeDevTools/Protocol/Tracing/EndCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..cf811b0c35c11d2f327b4ff1312472b3c008c841 --- /dev/null +++ b/ChromeDevTools/Protocol/Tracing/EndCommand.cs @@ -0,0 +1,13 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Tracing +{ + /// <summary> + /// Stop trace events collection. + /// </summary> + [Command(ProtocolName.Tracing.End)] + public class EndCommand + { + } +} diff --git a/ChromeDevTools/Protocol/Tracing/EndCommandResponse.cs b/ChromeDevTools/Protocol/Tracing/EndCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..999e789ab4d6124c37fa913bfd79098a1924a04b --- /dev/null +++ b/ChromeDevTools/Protocol/Tracing/EndCommandResponse.cs @@ -0,0 +1,13 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Tracing +{ + /// <summary> + /// Stop trace events collection. + /// </summary> + [CommandResponse(ProtocolName.Tracing.End)] + public class EndCommandResponse + { + } +} diff --git a/ChromeDevTools/Protocol/Tracing/GetCategoriesCommand.cs b/ChromeDevTools/Protocol/Tracing/GetCategoriesCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..03177a06c8d3a4f547e596265453a942749338aa --- /dev/null +++ b/ChromeDevTools/Protocol/Tracing/GetCategoriesCommand.cs @@ -0,0 +1,13 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Tracing +{ + /// <summary> + /// Gets supported tracing categories. + /// </summary> + [Command(ProtocolName.Tracing.GetCategories)] + public class GetCategoriesCommand + { + } +} diff --git a/ChromeDevTools/Protocol/Tracing/GetCategoriesCommandResponse.cs b/ChromeDevTools/Protocol/Tracing/GetCategoriesCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..16a7d51f9592207d7c071fa3a467b7fbb61b7343 --- /dev/null +++ b/ChromeDevTools/Protocol/Tracing/GetCategoriesCommandResponse.cs @@ -0,0 +1,17 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Tracing +{ + /// <summary> + /// Gets supported tracing categories. + /// </summary> + [CommandResponse(ProtocolName.Tracing.GetCategories)] + public class GetCategoriesCommandResponse + { + /// <summary> + /// Gets or sets A list of supported tracing categories. + /// </summary> + public string[] Categories { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/Tracing/StartCommand.cs b/ChromeDevTools/Protocol/Tracing/StartCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..6f060625537e379730d054a5859a2f6eb2b643b2 --- /dev/null +++ b/ChromeDevTools/Protocol/Tracing/StartCommand.cs @@ -0,0 +1,25 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Tracing +{ + /// <summary> + /// Start trace events collection. + /// </summary> + [Command(ProtocolName.Tracing.Start)] + public class StartCommand + { + /// <summary> + /// Gets or sets Category/tag filter + /// </summary> + public string Categories { get; set; } + /// <summary> + /// Gets or sets Tracing options + /// </summary> + public string Options { get; set; } + /// <summary> + /// Gets or sets If set, the agent will issue bufferUsage events at this interval, specified in milliseconds + /// </summary> + public double BufferUsageReportingInterval { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/Tracing/StartCommandResponse.cs b/ChromeDevTools/Protocol/Tracing/StartCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..fad5580fe4e8d49f123fc6f0b778bb11a6f5d074 --- /dev/null +++ b/ChromeDevTools/Protocol/Tracing/StartCommandResponse.cs @@ -0,0 +1,13 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Tracing +{ + /// <summary> + /// Start trace events collection. + /// </summary> + [CommandResponse(ProtocolName.Tracing.Start)] + public class StartCommandResponse + { + } +} diff --git a/ChromeDevTools/Protocol/Tracing/TracingCompleteEvent.cs b/ChromeDevTools/Protocol/Tracing/TracingCompleteEvent.cs new file mode 100644 index 0000000000000000000000000000000000000000..fa69af886ae8b8ab9b3f191883f6582130ebbe28 --- /dev/null +++ b/ChromeDevTools/Protocol/Tracing/TracingCompleteEvent.cs @@ -0,0 +1,12 @@ +using ChromeDevTools; + +namespace ChromeDevTools.Protocol.Tracing +{ + /// <summary> + /// Signals that tracing is stopped and there is no trace buffers pending flush, all data were delivered via dataCollected events. + /// </summary> + [Event(ProtocolName.Tracing.TracingComplete)] + public class TracingCompleteEvent + { + } +} diff --git a/ChromeDevTools/Protocol/Worker/ConnectToWorkerCommand.cs b/ChromeDevTools/Protocol/Worker/ConnectToWorkerCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..f3ebcd12eeae6394a18c2c928b8ceb914876e36a --- /dev/null +++ b/ChromeDevTools/Protocol/Worker/ConnectToWorkerCommand.cs @@ -0,0 +1,14 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Worker +{ + [Command(ProtocolName.Worker.ConnectToWorker)] + public class ConnectToWorkerCommand + { + /// <summary> + /// Gets or sets WorkerId + /// </summary> + public string WorkerId { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/Worker/ConnectToWorkerCommandResponse.cs b/ChromeDevTools/Protocol/Worker/ConnectToWorkerCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..e4d56a0cde84e6d438594b749d61df12e397be76 --- /dev/null +++ b/ChromeDevTools/Protocol/Worker/ConnectToWorkerCommandResponse.cs @@ -0,0 +1,10 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Worker +{ + [CommandResponse(ProtocolName.Worker.ConnectToWorker)] + public class ConnectToWorkerCommandResponse + { + } +} diff --git a/ChromeDevTools/Protocol/Worker/DisableCommand.cs b/ChromeDevTools/Protocol/Worker/DisableCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..0d746833385452d936c03414fa2fb72acb44b101 --- /dev/null +++ b/ChromeDevTools/Protocol/Worker/DisableCommand.cs @@ -0,0 +1,10 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Worker +{ + [Command(ProtocolName.Worker.Disable)] + public class DisableCommand + { + } +} diff --git a/ChromeDevTools/Protocol/Worker/DisableCommandResponse.cs b/ChromeDevTools/Protocol/Worker/DisableCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..cae5edbf737fed2f401a0f951f1b203a08c9bd5e --- /dev/null +++ b/ChromeDevTools/Protocol/Worker/DisableCommandResponse.cs @@ -0,0 +1,10 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Worker +{ + [CommandResponse(ProtocolName.Worker.Disable)] + public class DisableCommandResponse + { + } +} diff --git a/ChromeDevTools/Protocol/Worker/DisconnectFromWorkerCommand.cs b/ChromeDevTools/Protocol/Worker/DisconnectFromWorkerCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..26413cf39106220ccf3a61f462f0085f72621c94 --- /dev/null +++ b/ChromeDevTools/Protocol/Worker/DisconnectFromWorkerCommand.cs @@ -0,0 +1,14 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Worker +{ + [Command(ProtocolName.Worker.DisconnectFromWorker)] + public class DisconnectFromWorkerCommand + { + /// <summary> + /// Gets or sets WorkerId + /// </summary> + public string WorkerId { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/Worker/DisconnectFromWorkerCommandResponse.cs b/ChromeDevTools/Protocol/Worker/DisconnectFromWorkerCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..3fdce4e01573ab013c2d5d723778799c1c4d1d63 --- /dev/null +++ b/ChromeDevTools/Protocol/Worker/DisconnectFromWorkerCommandResponse.cs @@ -0,0 +1,10 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Worker +{ + [CommandResponse(ProtocolName.Worker.DisconnectFromWorker)] + public class DisconnectFromWorkerCommandResponse + { + } +} diff --git a/ChromeDevTools/Protocol/Worker/DispatchMessageFromWorkerEvent.cs b/ChromeDevTools/Protocol/Worker/DispatchMessageFromWorkerEvent.cs new file mode 100644 index 0000000000000000000000000000000000000000..49590d40f1a78625034032aefc2a516153a0bc3a --- /dev/null +++ b/ChromeDevTools/Protocol/Worker/DispatchMessageFromWorkerEvent.cs @@ -0,0 +1,17 @@ +using ChromeDevTools; + +namespace ChromeDevTools.Protocol.Worker +{ + [Event(ProtocolName.Worker.DispatchMessageFromWorker)] + public class DispatchMessageFromWorkerEvent + { + /// <summary> + /// Gets or sets WorkerId + /// </summary> + public string WorkerId { get; set; } + /// <summary> + /// Gets or sets Message + /// </summary> + public string Message { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/Worker/EnableCommand.cs b/ChromeDevTools/Protocol/Worker/EnableCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..0d7768cf2638aa8a397de0e9b4f4aafcfc76450a --- /dev/null +++ b/ChromeDevTools/Protocol/Worker/EnableCommand.cs @@ -0,0 +1,10 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Worker +{ + [Command(ProtocolName.Worker.Enable)] + public class EnableCommand + { + } +} diff --git a/ChromeDevTools/Protocol/Worker/EnableCommandResponse.cs b/ChromeDevTools/Protocol/Worker/EnableCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..47c5a300cdc965f528e6d8d7984d386f037e0bc1 --- /dev/null +++ b/ChromeDevTools/Protocol/Worker/EnableCommandResponse.cs @@ -0,0 +1,10 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Worker +{ + [CommandResponse(ProtocolName.Worker.Enable)] + public class EnableCommandResponse + { + } +} diff --git a/ChromeDevTools/Protocol/Worker/SendMessageToWorkerCommand.cs b/ChromeDevTools/Protocol/Worker/SendMessageToWorkerCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..128ce55be193ef89f99a946798fe30cf039c6624 --- /dev/null +++ b/ChromeDevTools/Protocol/Worker/SendMessageToWorkerCommand.cs @@ -0,0 +1,18 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Worker +{ + [Command(ProtocolName.Worker.SendMessageToWorker)] + public class SendMessageToWorkerCommand + { + /// <summary> + /// Gets or sets WorkerId + /// </summary> + public string WorkerId { get; set; } + /// <summary> + /// Gets or sets Message + /// </summary> + public string Message { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/Worker/SendMessageToWorkerCommandResponse.cs b/ChromeDevTools/Protocol/Worker/SendMessageToWorkerCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..8a71b20ac57b07d18734492f5be4e854b11ecf4a --- /dev/null +++ b/ChromeDevTools/Protocol/Worker/SendMessageToWorkerCommandResponse.cs @@ -0,0 +1,10 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Worker +{ + [CommandResponse(ProtocolName.Worker.SendMessageToWorker)] + public class SendMessageToWorkerCommandResponse + { + } +} diff --git a/ChromeDevTools/Protocol/Worker/SetAutoconnectToWorkersCommand.cs b/ChromeDevTools/Protocol/Worker/SetAutoconnectToWorkersCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..a71d6d3320c5a7597e6e002a382eaa6b9ae4987d --- /dev/null +++ b/ChromeDevTools/Protocol/Worker/SetAutoconnectToWorkersCommand.cs @@ -0,0 +1,14 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Worker +{ + [Command(ProtocolName.Worker.SetAutoconnectToWorkers)] + public class SetAutoconnectToWorkersCommand + { + /// <summary> + /// Gets or sets Value + /// </summary> + public bool Value { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/Worker/SetAutoconnectToWorkersCommandResponse.cs b/ChromeDevTools/Protocol/Worker/SetAutoconnectToWorkersCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..80c1503c28f22e092e7900a9435b48f1159c746b --- /dev/null +++ b/ChromeDevTools/Protocol/Worker/SetAutoconnectToWorkersCommandResponse.cs @@ -0,0 +1,10 @@ +using ChromeDevTools;using Newtonsoft.Json; +using System.Collections.Generic; + +namespace ChromeDevTools.Protocol.Worker +{ + [CommandResponse(ProtocolName.Worker.SetAutoconnectToWorkers)] + public class SetAutoconnectToWorkersCommandResponse + { + } +} diff --git a/ChromeDevTools/Protocol/Worker/WorkerCreatedEvent.cs b/ChromeDevTools/Protocol/Worker/WorkerCreatedEvent.cs new file mode 100644 index 0000000000000000000000000000000000000000..724722c058a209597e0dbb1b1234866246870374 --- /dev/null +++ b/ChromeDevTools/Protocol/Worker/WorkerCreatedEvent.cs @@ -0,0 +1,21 @@ +using ChromeDevTools; + +namespace ChromeDevTools.Protocol.Worker +{ + [Event(ProtocolName.Worker.WorkerCreated)] + public class WorkerCreatedEvent + { + /// <summary> + /// Gets or sets WorkerId + /// </summary> + public string WorkerId { get; set; } + /// <summary> + /// Gets or sets Url + /// </summary> + public string Url { get; set; } + /// <summary> + /// Gets or sets InspectorConnected + /// </summary> + public bool InspectorConnected { get; set; } + } +} diff --git a/ChromeDevTools/Protocol/Worker/WorkerTerminatedEvent.cs b/ChromeDevTools/Protocol/Worker/WorkerTerminatedEvent.cs new file mode 100644 index 0000000000000000000000000000000000000000..5bb578f948f626d8d848d11d87d9d63bf545c319 --- /dev/null +++ b/ChromeDevTools/Protocol/Worker/WorkerTerminatedEvent.cs @@ -0,0 +1,13 @@ +using ChromeDevTools; + +namespace ChromeDevTools.Protocol.Worker +{ + [Event(ProtocolName.Worker.WorkerTerminated)] + public class WorkerTerminatedEvent + { + /// <summary> + /// Gets or sets WorkerId + /// </summary> + public string WorkerId { get; set; } + } +} diff --git a/AutoWebPerf/Chrome/Messages/MethodNameAttribute.cs b/ChromeDevTools/ProtocolNameAttribute.cs similarity index 60% rename from AutoWebPerf/Chrome/Messages/MethodNameAttribute.cs rename to ChromeDevTools/ProtocolNameAttribute.cs index 21688b3151da5a007726fc63912833bcbe188460..8abc90b65e273e5cba53a97e55b7cdb197c10dc3 100644 --- a/AutoWebPerf/Chrome/Messages/MethodNameAttribute.cs +++ b/ChromeDevTools/ProtocolNameAttribute.cs @@ -1,11 +1,11 @@ using System; -namespace AutoWebPerf.Chrome.Messages +namespace ChromeDevTools { [AttributeUsage(AttributeTargets.Class, Inherited = false)] - public class MethodNameAttribute : Attribute + public class ProtocolNameAttribute : Attribute { - public MethodNameAttribute(string methodName) + public ProtocolNameAttribute(string methodName) { this.MethodName = methodName; } diff --git a/AutoWebPerf/Chrome/MessageContractResolver.cs b/ChromeDevTools/Serialization/MessageContractResolver.cs similarity index 90% rename from AutoWebPerf/Chrome/MessageContractResolver.cs rename to ChromeDevTools/Serialization/MessageContractResolver.cs index df78bd57f27aedddd186f86f0e226ea825998361..2bfd0fd675369a32fc8f1eab8998779693f2d5c2 100644 --- a/AutoWebPerf/Chrome/MessageContractResolver.cs +++ b/ChromeDevTools/Serialization/MessageContractResolver.cs @@ -5,7 +5,7 @@ using System.Text; using System.Threading.Tasks; using Newtonsoft.Json.Serialization; -namespace AutoWebPerf.Chrome +namespace ChromeDevTools.Serialization { class MessageContractResolver : DefaultContractResolver { diff --git a/ChromeDevTools/packages.config b/ChromeDevTools/packages.config new file mode 100644 index 0000000000000000000000000000000000000000..afd4ccc71de3168b8272ba3b01b94c7c5044cff8 --- /dev/null +++ b/ChromeDevTools/packages.config @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="utf-8"?> +<packages> + <package id="Newtonsoft.Json" version="6.0.8" targetFramework="net45" /> + <package id="WebSocket4Net" version="0.12" targetFramework="net45" /> +</packages> \ No newline at end of file