11cb0ef41Sopenharmony_ci// Copyright 2016 the V8 project authors. All rights reserved. 21cb0ef41Sopenharmony_ci// Use of this source code is governed by a BSD-style license that can be 31cb0ef41Sopenharmony_ci// found in the LICENSE file. 41cb0ef41Sopenharmony_ci 51cb0ef41Sopenharmony_ci#include "src/inspector/v8-schema-agent-impl.h" 61cb0ef41Sopenharmony_ci 71cb0ef41Sopenharmony_ci#include "src/inspector/protocol/Protocol.h" 81cb0ef41Sopenharmony_ci#include "src/inspector/v8-inspector-session-impl.h" 91cb0ef41Sopenharmony_ci 101cb0ef41Sopenharmony_cinamespace v8_inspector { 111cb0ef41Sopenharmony_ci 121cb0ef41Sopenharmony_ciV8SchemaAgentImpl::V8SchemaAgentImpl(V8InspectorSessionImpl* session, 131cb0ef41Sopenharmony_ci protocol::FrontendChannel* frontendChannel, 141cb0ef41Sopenharmony_ci protocol::DictionaryValue* state) 151cb0ef41Sopenharmony_ci : m_session(session), m_frontend(frontendChannel) {} 161cb0ef41Sopenharmony_ci 171cb0ef41Sopenharmony_ciV8SchemaAgentImpl::~V8SchemaAgentImpl() = default; 181cb0ef41Sopenharmony_ci 191cb0ef41Sopenharmony_ciResponse V8SchemaAgentImpl::getDomains( 201cb0ef41Sopenharmony_ci std::unique_ptr<protocol::Array<protocol::Schema::Domain>>* result) { 211cb0ef41Sopenharmony_ci *result = 221cb0ef41Sopenharmony_ci std::make_unique<std::vector<std::unique_ptr<protocol::Schema::Domain>>>( 231cb0ef41Sopenharmony_ci m_session->supportedDomainsImpl()); 241cb0ef41Sopenharmony_ci return Response::Success(); 251cb0ef41Sopenharmony_ci} 261cb0ef41Sopenharmony_ci 271cb0ef41Sopenharmony_ci} // namespace v8_inspector 28