From 1bf1084f2b10c3b47fd1a588d85d21ed0eb41d0c Mon Sep 17 00:00:00 2001 From: Lorry Tar Creator Date: Tue, 27 Jun 2017 06:07:23 +0000 Subject: webkitgtk-2.16.5 --- Source/WebCore/inspector/PageRuntimeAgent.h | 52 ++++++++++++----------------- 1 file changed, 22 insertions(+), 30 deletions(-) (limited to 'Source/WebCore/inspector/PageRuntimeAgent.h') diff --git a/Source/WebCore/inspector/PageRuntimeAgent.h b/Source/WebCore/inspector/PageRuntimeAgent.h index 02058d6f4..c6d2ee3d2 100644 --- a/Source/WebCore/inspector/PageRuntimeAgent.h +++ b/Source/WebCore/inspector/PageRuntimeAgent.h @@ -1,5 +1,6 @@ /* * Copyright (C) 2011 Google Inc. All rights reserved. + * Copyright (C) 2015 Apple Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are @@ -28,23 +29,16 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifndef PageRuntimeAgent_h -#define PageRuntimeAgent_h +#pragma once -#if ENABLE(INSPECTOR) - -#include +#include "InspectorWebAgentBase.h" +#include #include -#include namespace JSC { class ExecState; } -namespace Inspector { -class InjectedScriptManager; -} - namespace WebCore { class InspectorPageAgent; @@ -54,35 +48,33 @@ class SecurityOrigin; typedef String ErrorString; class PageRuntimeAgent final : public Inspector::InspectorRuntimeAgent { + WTF_MAKE_FAST_ALLOCATED; public: - PageRuntimeAgent(Inspector::InjectedScriptManager*, Page*, InspectorPageAgent*); + PageRuntimeAgent(PageAgentContext&, InspectorPageAgent*); virtual ~PageRuntimeAgent() { } - - virtual void didCreateFrontendAndBackend(Inspector::InspectorFrontendChannel*, Inspector::InspectorBackendDispatcher*) override; - virtual void willDestroyFrontendAndBackend(Inspector::InspectorDisconnectReason) override; - virtual void enable(ErrorString*) override; - virtual void disable(ErrorString*) override; - void didCreateMainWorldContext(Frame*); - void didCreateIsolatedContext(Frame*, JSC::ExecState*, SecurityOrigin*); + void didCreateFrontendAndBackend(Inspector::FrontendRouter*, Inspector::BackendDispatcher*) override; + void willDestroyFrontendAndBackend(Inspector::DisconnectReason) override; + void enable(ErrorString&) override; + void disable(ErrorString&) override; + + // InspectorInstrumentation + void didCreateMainWorldContext(Frame&); private: - virtual JSC::VM* globalVM() override; - virtual Inspector::InjectedScript injectedScriptForEval(ErrorString*, const int* executionContextId) override; - virtual void muteConsole() override; - virtual void unmuteConsole() override; + Inspector::InjectedScript injectedScriptForEval(ErrorString&, const int* executionContextId) override; + void muteConsole() override; + void unmuteConsole() override; void reportExecutionContextCreation(); void notifyContextCreated(const String& frameId, JSC::ExecState*, SecurityOrigin*, bool isPageContext); - Page* m_inspectedPage; + std::unique_ptr m_frontendDispatcher; + RefPtr m_backendDispatcher; InspectorPageAgent* m_pageAgent; - std::unique_ptr m_frontendDispatcher; - RefPtr m_backendDispatcher; - bool m_mainWorldContextCreated; -}; -} // namespace WebCore + Page& m_inspectedPage; -#endif // ENABLE(INSPECTOR) + bool m_mainWorldContextCreated { false }; +}; -#endif // !defined(InspectorPagerAgent_h) +} // namespace WebCore -- cgit v1.2.1