| /* |
| * Copyright (C) 2013 Google Inc. All rights reserved. |
| * |
| * Redistribution and use in source and binary forms, with or without |
| * modification, are permitted provided that the following conditions are |
| * met: |
| * |
| * * Redistributions of source code must retain the above copyright |
| * notice, this list of conditions and the following disclaimer. |
| * * Redistributions in binary form must reproduce the above |
| * copyright notice, this list of conditions and the following disclaimer |
| * in the documentation and/or other materials provided with the |
| * distribution. |
| * * Neither the name of Google Inc. nor the names of its |
| * contributors may be used to endorse or promote products derived from |
| * this software without specific prior written permission. |
| * |
| * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |
| * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |
| * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR |
| * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT |
| * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |
| * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |
| * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
| * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
| * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| */ |
| |
| /* |
| * make_instrumenting_probes.py uses this file as a source to generate |
| * core_probes_inl.h, core_probes_impl.cc and core_probe_sink.h. |
| * |
| * The code below is not a correct IDL but a mix of IDL and C++. |
| * |
| * The syntax for an instrumentation method is as follows: |
| * |
| * returnValue methodName([paramAttr1] param1, [paramAttr2] param2, ...) |
| * |
| * Where: |
| * paramAttr - optional attribute controlling the parameters handling (one attribute per parameter max). |
| * Keep - pass first parameter (used to access the CoreProbeSink instance) to agents. |
| * |
| * returnValue: "void" for instant probes. |
| * Omitted for the scoped probes. |
| * |
| * methodName: C++ name for the public instrumentation method and agents methods. |
| * |
| * paramList: C++ parameter list with optional names. Names will be deduced from types if omitted but you have to |
| * specify explicit names for multiple parameters of the same type. |
| */ |
| |
| interface CoreProbes { |
| |
| class InspectorIssue; |
| class ConsoleMessage; |
| class FontCustomPlatformData; |
| class FontFace; |
| class HTMLDocumentParser; |
| class XMLHttpRequest; |
| class HTMLInputElement; |
| class HTMLPortalElement; |
| |
| void DidClearDocumentOfWindowObject([Keep] LocalFrame*); |
| void WillInsertDOMNode([Keep] Node* parent); |
| void DidInsertDOMNode([Keep] Node*); |
| void WillRemoveDOMNode([Keep] Node*); |
| void WillModifyDOMAttr([Keep] Element*, const AtomicString& old_value, const AtomicString& new_value); |
| void DidModifyDOMAttr([Keep] Element*, const QualifiedName& name, const AtomicString& value); |
| void DidRemoveDOMAttr([Keep] Element*, const QualifiedName& name); |
| void WillChangeStyleElement([Keep] Element*); |
| void CharacterDataModified([Keep] CharacterData*); |
| void DidInvalidateStyleAttr([Keep] Node*); |
| void DidPerformElementShadowDistribution([Keep] Element*); |
| void DidPerformSlotDistribution([Keep] HTMLSlotElement*); |
| void DocumentDetached([Keep] Document*); |
| void ActiveStyleSheetsUpdated([Keep] Document*); |
| void FontsUpdated(ExecutionContext*, const FontFace* face, const String& src, const FontCustomPlatformData* font_custom_platform_data); |
| void MediaQueryResultChanged(Document*); |
| void DidPushShadowRoot([Keep] Element* host, ShadowRoot*); |
| void WillPopShadowRoot([Keep] Element* host, ShadowRoot*); |
| void WillSendXMLHttpOrFetchNetworkRequest(ExecutionContext*, const String& url); |
| void DidCreateCanvasContext(Document*); |
| void DidFireWebGLError(Element*, const String& error_name); |
| void DidFireWebGLWarning(Element*); |
| void DidFireWebGLErrorOrWarning(Element*, const String& message); |
| void DidResizeMainFrame(LocalFrame*); |
| void ApplyAcceptLanguageOverride(ExecutionContext*, String* accept_language); |
| void ApplyUserAgentOverride(CoreProbeSink*, String* user_agent); |
| void ApplyUserAgentMetadataOverride(CoreProbeSink*, base::Optional<blink::UserAgentMetadata>* ua_metadata_override); |
| void DidBlockRequest(CoreProbeSink*, const ResourceRequest&, DocumentLoader*, const KURL& fetch_context_url, const FetchInitiatorInfo&, ResourceRequestBlockedReason, ResourceType); |
| void DidChangeResourcePriority(LocalFrame*, DocumentLoader*, uint64_t identifier, ResourceLoadPriority load_priority); |
| void PrepareRequest(CoreProbeSink*, DocumentLoader*, ResourceRequest&, const FetchInitiatorInfo&, ResourceType); |
| void WillSendRequest(CoreProbeSink*, uint64_t identifier, DocumentLoader*, const KURL& fetch_context_url, const ResourceRequest&, const ResourceResponse& redirect_response, const FetchInitiatorInfo&, ResourceType); |
| void WillSendNavigationRequest(CoreProbeSink*, uint64_t identifier, DocumentLoader*, const KURL&, const AtomicString& http_method, EncodedFormData*); |
| void MarkResourceAsCached(LocalFrame*, DocumentLoader*, uint64_t identifier); |
| void DidReceiveResourceResponse(CoreProbeSink*, uint64_t identifier, DocumentLoader*, const ResourceResponse&, const Resource*); |
| void DidReceiveData(CoreProbeSink*, uint64_t identifier, DocumentLoader*, const char* data, uint64_t data_length); |
| void DidReceiveBlob(CoreProbeSink*, uint64_t identifier, DocumentLoader*, BlobDataHandle*); |
| void DidReceiveEncodedDataLength(CoreProbeSink*, DocumentLoader* loader, uint64_t identifier, size_t encoded_data_length); |
| void DidFinishLoading(CoreProbeSink*, uint64_t identifier, DocumentLoader*, base::TimeTicks finish_time, int64_t encoded_data_length, int64_t decoded_body_length, bool should_report_corb_blocking); |
| void DidReceiveCorsRedirectResponse(ExecutionContext*, uint64_t identifier, DocumentLoader*, const ResourceResponse&, Resource*); |
| void DidFailLoading([Keep] CoreProbeSink*, uint64_t identifier, DocumentLoader*, const ResourceError&, const base::UnguessableToken&); |
| void WillSendEventSourceRequest(ExecutionContext*); |
| void WillDispatchEventSourceEvent(ExecutionContext*, uint64_t identifier, const AtomicString& event_name, const AtomicString& event_id, const String& data); |
| void WillLoadXHR([Keep] ExecutionContext*, const AtomicString& method, const KURL& url, bool async, const HTTPHeaderMap& headers, bool include_credentials); |
| void DidFinishXHR(ExecutionContext*, XMLHttpRequest* xhr); |
| void ScriptImported(ExecutionContext*, uint64_t identifier, const String& source_string); |
| void ScriptExecutionBlockedByCSP(ExecutionContext*, const String& directive_text); |
| void DidReceiveScriptResponse(ExecutionContext*, uint64_t identifier); |
| void DomContentLoadedEventFired([Keep] LocalFrame*); |
| void LoadEventFired([Keep] LocalFrame*); |
| void FrameAttachedToParent([Keep] LocalFrame*); |
| void FrameDetachedFromParent([Keep] LocalFrame*); |
| void DidStartProvisionalLoad([Keep] LocalFrame*); |
| void DidFailProvisionalLoad([Keep] LocalFrame*); |
| void WillCommitLoad([Keep] LocalFrame*, DocumentLoader*); |
| void DidCommitLoad([Keep] LocalFrame*, DocumentLoader*); |
| void DidNavigateWithinDocument([Keep] LocalFrame*); |
| void FrameDocumentUpdated([Keep] LocalFrame*); |
| void FrameOwnerContentUpdated([Keep] LocalFrame*, HTMLFrameOwnerElement*); |
| void FrameStartedLoading([Keep] LocalFrame*); |
| void FrameStoppedLoading([Keep] LocalFrame*); |
| void FrameRequestedNavigation(LocalFrame*, Frame* target_frame, const KURL& url, ClientNavigationReason reason, NavigationPolicy policy); |
| void FrameScheduledNavigation([Keep] LocalFrame*, const KURL& url, base::TimeDelta delay, ClientNavigationReason reason); |
| void FrameClearedScheduledNavigation([Keep] LocalFrame*); |
| void DidCreateWebSocket([Keep] ExecutionContext*, uint64_t identifier, const KURL& request_url, const String& protocol); |
| void WillSendWebSocketHandshakeRequest([Keep] ExecutionContext*, uint64_t identifier, network::mojom::blink::WebSocketHandshakeRequest* request); |
| void DidReceiveWebSocketHandshakeResponse([Keep] ExecutionContext*, uint64_t identifier, network::mojom::blink::WebSocketHandshakeRequest* request, network::mojom::blink::WebSocketHandshakeResponse* response); |
| void DidCloseWebSocket([Keep] ExecutionContext*, uint64_t identifier); |
| void DidReceiveWebSocketMessage(ExecutionContext*, uint64_t identifier, int opcode, bool masked, const Vector<base::span<const char>>& data); |
| void DidSendWebSocketMessage(ExecutionContext*, uint64_t identifier, int opcode, bool masked, const char* payload, size_t payload_length); |
| void DidReceiveWebSocketMessageError(ExecutionContext*, uint64_t identifier, const String& error_message); |
| void NetworkStateChanged([Keep] LocalFrame*, bool online); |
| void UpdateApplicationCacheStatus([Keep] LocalFrame*); |
| /* This is for pre-BlinkGenPropertyTrees. TODO(wangxianzhu): Remove this function for BlinkGenPropertyTrees. */ |
| void LayerTreeDidChange(LocalFrame*); |
| /* For BlinkGenPropertyTrees/CompositeAfterPaint. */ |
| void LayerTreePainted(LocalFrame*); |
| void PseudoElementCreated([Keep] PseudoElement*); |
| void PseudoElementDestroyed([Keep] PseudoElement*); |
| void DidCreateAnimation(Document*, unsigned); |
| void AnimationPlayStateChanged(Document*, Animation*, Animation::AnimationPlayState old_play_state, Animation::AnimationPlayState new_play_state); |
| void WindowOpen([Keep] Document*, const String& url, const AtomicString& window_name, const WebWindowFeatures& window_features, bool user_gestrue); |
| void ConsoleMessageAdded(ExecutionContext*, ConsoleMessage*); |
| void InspectorIssueAdded(CoreProbeSink*, InspectorIssue*); |
| void WillRunJavaScriptDialog(LocalFrame* frame); |
| void DidRunJavaScriptDialog(LocalFrame* frame); |
| void DocumentWriteFetchScript([Keep] Document*); |
| void DidChangeViewport(LocalFrame* document); |
| void BreakableLocation(ExecutionContext* context, const char* name); |
| RecalculateStyle(Document* document); |
| UpdateLayout(Document* document); |
| ExecuteScript([Keep] ExecutionContext* context, const String& script_url, int script_id); |
| CallFunction([Keep] ExecutionContext* context, v8::Local<v8::Function> function, int depth = 0); |
| UserCallback([Keep] ExecutionContext* context, const char* name, const AtomicString& atomic_name, bool recurring, EventTarget* event_target = nullptr); |
| V8Compile([Keep] ExecutionContext* context, const String& file_name, int line, int column); |
| ParseHTML(Document* document, HTMLDocumentParser* parser); |
| void ForcePseudoState([Keep] Element* element, CSSSelector::PseudoType pseudo_state, bool* result); |
| void ShouldForceCorsPreflight(ExecutionContext*, bool* result); |
| void ShouldBlockRequest(CoreProbeSink*, const KURL&, bool* result); |
| void ShouldBypassServiceWorker(ExecutionContext* context, bool* result); |
| void ConsoleTimeStamp(ExecutionContext*, const String& title); |
| void WillStartDebuggerTask(CoreProbeSink*); |
| void DidFinishDebuggerTask(CoreProbeSink*); |
| void LifecycleEvent([Keep] LocalFrame*, DocumentLoader*, const char* name, double timestamp); |
| void PaintTiming([Keep] Document*, const char* name, double timestamp); |
| void DidCreateAudioContext(Document*); |
| void DidCloseAudioContext(Document*); |
| void DidResumeAudioContext(Document*); |
| void DidSuspendAudioContext(Document*); |
| void ProduceCompilationCache(CoreProbeSink*, const ScriptSourceCode& source, v8::Local<v8::Script> script); |
| void ConsumeCompilationCache(ExecutionContext*, const ScriptSourceCode& source, v8::ScriptCompiler::CachedData** cached_data); |
| void NodeCreated([Keep] Node* node); |
| void PortalRemoteFrameCreated(Document*, HTMLPortalElement* portal_element); |
| void FileChooserOpened([Keep] LocalFrame* frame, HTMLInputElement* element, bool* intercepted); |
| void PlayerErrorsRaised(ExecutionContext* context, String player_id, const Vector<InspectorPlayerError>& errors); |
| void PlayerEventsAdded(ExecutionContext* context, String player_id, const Vector<InspectorPlayerEvent>& events); |
| void PlayerMessagesLogged(ExecutionContext* context, String player_id, const Vector<InspectorPlayerMessage>& messages); |
| void PlayerPropertiesChanged(ExecutionContext* context, String player_id, const Vector<InspectorPlayerProperty>& properties); |
| void PlayersCreated(ExecutionContext* context, const Vector<WebString>& players); |
| void SetDevToolsIds(CoreProbeSink*, ResourceRequest& request, const FetchInitiatorInfo&); |
| void DidMutateStyleSheet(Document*, CSSStyleSheet* style_sheet); |
| void LocalFontsEnabled(ExecutionContext*, bool* result); |
| void DidUpdateComputedStyle([Keep] Element*, const ComputedStyle* old_style, const ComputedStyle* new_style); |
| } |