Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(528)

Unified Diff: src/inspector/V8SchemaAgentImpl.cpp

Issue 2292573002: [inspector] Initial import of v8_inspector. (Closed)
Patch Set: format the code, disable cpplint Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/inspector/V8SchemaAgentImpl.h ('k') | src/inspector/V8StackTraceImpl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/inspector/V8SchemaAgentImpl.cpp
diff --git a/src/inspector/V8SchemaAgentImpl.cpp b/src/inspector/V8SchemaAgentImpl.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..42ce00cf5e69e08e000d68cde2b3e614cb180222
--- /dev/null
+++ b/src/inspector/V8SchemaAgentImpl.cpp
@@ -0,0 +1,29 @@
+// Copyright 2016 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "src/inspector/V8SchemaAgentImpl.h"
+
+#include "src/inspector/V8InspectorSessionImpl.h"
+#include "src/inspector/protocol/Protocol.h"
+
+namespace v8_inspector {
+
+V8SchemaAgentImpl::V8SchemaAgentImpl(V8InspectorSessionImpl* session,
+ protocol::FrontendChannel* frontendChannel,
+ protocol::DictionaryValue* state)
+ : m_session(session), m_frontend(frontendChannel) {}
+
+V8SchemaAgentImpl::~V8SchemaAgentImpl() {}
+
+void V8SchemaAgentImpl::getDomains(
+ ErrorString*,
+ std::unique_ptr<protocol::Array<protocol::Schema::Domain>>* result) {
+ std::vector<std::unique_ptr<protocol::Schema::Domain>> domains =
+ m_session->supportedDomainsImpl();
+ *result = protocol::Array<protocol::Schema::Domain>::create();
+ for (size_t i = 0; i < domains.size(); ++i)
+ (*result)->addItem(std::move(domains[i]));
+}
+
+} // namespace v8_inspector
« no previous file with comments | « src/inspector/V8SchemaAgentImpl.h ('k') | src/inspector/V8StackTraceImpl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698