| Index: content/browser/devtools/protocol/schema_handler.cc
|
| diff --git a/content/browser/devtools/protocol/schema_handler.cc b/content/browser/devtools/protocol/schema_handler.cc
|
| index a7cbe1ca168ec632fd902249fab30ec490c2452f..6583de68c6946f86fcaaf6b2cb3fe52153be46b9 100644
|
| --- a/content/browser/devtools/protocol/schema_handler.cc
|
| +++ b/content/browser/devtools/protocol/schema_handler.cc
|
| @@ -5,10 +5,7 @@
|
| #include "content/browser/devtools/protocol/schema_handler.h"
|
|
|
| namespace content {
|
| -namespace devtools {
|
| -namespace schema {
|
| -
|
| -using Response = DevToolsProtocolClient::Response;
|
| +namespace protocol {
|
|
|
| SchemaHandler::SchemaHandler() {
|
| }
|
| @@ -16,8 +13,16 @@ SchemaHandler::SchemaHandler() {
|
| SchemaHandler::~SchemaHandler() {
|
| }
|
|
|
| +void SchemaHandler::Wire(UberDispatcher* dispatcher) {
|
| + Schema::Dispatcher::wire(dispatcher, this);
|
| +}
|
| +
|
| +Response SchemaHandler::Disable() {
|
| + return Response::OK();
|
| +}
|
| +
|
| Response SchemaHandler::GetDomains(
|
| - std::vector<scoped_refptr<Domain>>* domains) {
|
| + std::unique_ptr<protocol::Array<Schema::Domain>>* domains) {
|
| // TODO(kozyatisnkiy): get this from the target instead of hardcoding a list.
|
| static const char kVersion[] = "1.2";
|
| static const char* kDomains[] = {
|
| @@ -28,14 +33,15 @@ Response SchemaHandler::GetDomains(
|
| "Accessibility", "Storage", "Log", "Runtime", "Debugger",
|
| "Profiler", "HeapProfiler", "Schema", "Target"
|
| };
|
| + *domains = protocol::Array<Schema::Domain>::create();
|
| for (size_t i = 0; i < arraysize(kDomains); ++i) {
|
| - domains->push_back(Domain::Create()
|
| - ->set_name(kDomains[i])
|
| - ->set_version(kVersion));
|
| + (*domains)->addItem(Schema::Domain::Create()
|
| + .SetName(kDomains[i])
|
| + .SetVersion(kVersion)
|
| + .Build());
|
| }
|
| return Response::OK();
|
| }
|
|
|
| -} // namespace schema
|
| -} // namespace devtools
|
| +} // namespace protocol
|
| } // namespace content
|
|
|