joepeck@webkit.org | fbdc00d | 2014-01-25 17:48:16 +0000 | [diff] [blame] | 1 | /* |
bburg@apple.com | 84eff9e | 2015-09-05 16:06:23 +0000 | [diff] [blame] | 2 | * Copyright (C) 2014, 2015 Apple Inc. All rights reserved. |
joepeck@webkit.org | fbdc00d | 2014-01-25 17:48:16 +0000 | [diff] [blame] | 3 | * |
| 4 | * Redistribution and use in source and binary forms, with or without |
| 5 | * modification, are permitted provided that the following conditions |
| 6 | * are met: |
| 7 | * 1. Redistributions of source code must retain the above copyright |
| 8 | * notice, this list of conditions and the following disclaimer. |
| 9 | * 2. Redistributions in binary form must reproduce the above copyright |
| 10 | * notice, this list of conditions and the following disclaimer in the |
| 11 | * documentation and/or other materials provided with the distribution. |
| 12 | * |
| 13 | * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY |
| 14 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
| 15 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR |
| 16 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR |
| 17 | * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, |
| 18 | * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, |
| 19 | * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR |
| 20 | * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY |
| 21 | * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 22 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| 23 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 24 | */ |
| 25 | |
commit-queue@webkit.org | 35dd301 | 2016-08-15 20:55:16 +0000 | [diff] [blame] | 26 | #pragma once |
joepeck@webkit.org | fbdc00d | 2014-01-25 17:48:16 +0000 | [diff] [blame] | 27 | |
annulen@yandex.ru | 6712c2d | 2017-06-25 17:40:30 +0000 | [diff] [blame] | 28 | #include "InspectorFrontendDispatchers.h" |
joepeck@webkit.org | fbdc00d | 2014-01-25 17:48:16 +0000 | [diff] [blame] | 29 | #include "InspectorRuntimeAgent.h" |
joepeck@webkit.org | fbdc00d | 2014-01-25 17:48:16 +0000 | [diff] [blame] | 30 | |
| 31 | namespace JSC { |
| 32 | class JSGlobalObject; |
| 33 | } |
| 34 | |
| 35 | namespace Inspector { |
| 36 | |
| 37 | class JSGlobalObjectRuntimeAgent final : public InspectorRuntimeAgent { |
commit-queue@webkit.org | 6a4af63 | 2017-11-29 07:26:41 +0000 | [diff] [blame] | 38 | WTF_MAKE_NONCOPYABLE(JSGlobalObjectRuntimeAgent); |
| 39 | WTF_MAKE_FAST_ALLOCATED; |
joepeck@webkit.org | fbdc00d | 2014-01-25 17:48:16 +0000 | [diff] [blame] | 40 | public: |
bburg@apple.com | d81c28d | 2015-09-05 18:52:16 +0000 | [diff] [blame] | 41 | JSGlobalObjectRuntimeAgent(JSAgentContext&); |
joepeck@webkit.org | fbdc00d | 2014-01-25 17:48:16 +0000 | [diff] [blame] | 42 | |
darin@apple.com | 11ff47c | 2016-03-04 16:47:55 +0000 | [diff] [blame] | 43 | void didCreateFrontendAndBackend(FrontendRouter*, BackendDispatcher*) override; |
joepeck@webkit.org | fbdc00d | 2014-01-25 17:48:16 +0000 | [diff] [blame] | 44 | |
darin@apple.com | 11ff47c | 2016-03-04 16:47:55 +0000 | [diff] [blame] | 45 | InjectedScript injectedScriptForEval(ErrorString&, const int* executionContextId) override; |
joepeck@webkit.org | fbdc00d | 2014-01-25 17:48:16 +0000 | [diff] [blame] | 46 | |
commit-queue@webkit.org | 2449041 | 2014-04-08 22:46:10 +0000 | [diff] [blame] | 47 | // NOTE: JavaScript inspector does not yet need to mute a console because no messages |
| 48 | // are sent to the console outside of the API boundary or console object. |
darin@apple.com | 11ff47c | 2016-03-04 16:47:55 +0000 | [diff] [blame] | 49 | void muteConsole() override { } |
| 50 | void unmuteConsole() override { } |
joepeck@webkit.org | fbdc00d | 2014-01-25 17:48:16 +0000 | [diff] [blame] | 51 | |
| 52 | private: |
burg@cs.washington.edu | 91ba873 | 2015-02-14 23:25:53 +0000 | [diff] [blame] | 53 | std::unique_ptr<RuntimeFrontendDispatcher> m_frontendDispatcher; |
| 54 | RefPtr<RuntimeBackendDispatcher> m_backendDispatcher; |
joepeck@webkit.org | fbdc00d | 2014-01-25 17:48:16 +0000 | [diff] [blame] | 55 | JSC::JSGlobalObject& m_globalObject; |
| 56 | }; |
| 57 | |
| 58 | } // namespace Inspector |