OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "content/browser/devtools/protocol/schema_handler.h" | 5 #include "content/browser/devtools/protocol/schema_handler.h" |
6 | 6 |
7 namespace content { | 7 namespace content { |
8 namespace devtools { | 8 namespace devtools { |
9 namespace schema { | 9 namespace schema { |
10 | 10 |
11 using Response = DevToolsProtocolClient::Response; | 11 using Response = DevToolsProtocolClient::Response; |
12 | 12 |
13 SchemaHandler::SchemaHandler() { | 13 SchemaHandler::SchemaHandler() { |
14 } | 14 } |
15 | 15 |
16 SchemaHandler::~SchemaHandler() { | 16 SchemaHandler::~SchemaHandler() { |
17 } | 17 } |
18 | 18 |
19 Response SchemaHandler::GetDomains( | 19 Response SchemaHandler::GetDomains( |
20 std::vector<scoped_refptr<Domain>>* domains) { | 20 std::vector<scoped_refptr<Domain>>* domains) { |
21 // TODO(kozyatisnkiy): get this from the target instead of hardcoding a list. | 21 // TODO(kozyatisnkiy): get this from the target instead of hardcoding a list. |
22 static const char kVersion[] = "1.2"; | 22 static const char kVersion[] = "1.2"; |
23 static const char* kDomains[] = { | 23 static const char* kDomains[] = { |
24 "Inspector", "Memory", "Page", "Rendering", "Emulation", "Security", | 24 "Inspector", "Memory", "Page", "Rendering", "Emulation", "Security", |
25 "Network", "Database", "IndexedDB", "CacheStorage", "DOMStorage", "CSS", | 25 "Network", "Database", "IndexedDB", "CacheStorage", "DOMStorage", "CSS", |
26 "ApplicationCache", "DOM", "IO", "DOMDebugger", "Worker", "ServiceWorker", | 26 "ApplicationCache", "DOM", "IO", "DOMDebugger", "Worker", "ServiceWorker", |
27 "Input", "LayerTree", "DeviceOrientation", "Tracing", "Animation", | 27 "Input", "LayerTree", "DeviceOrientation", "Tracing", "Animation", |
28 "Accessibility", "Storage", "Log", "Browser", "Runtime", "Debugger", | 28 "Accessibility", "Storage", "Log", "Runtime", "Debugger", |
29 "Profiler", "HeapProfiler", "Schema", "Target" | 29 "Profiler", "HeapProfiler", "Schema", "Target" |
30 }; | 30 }; |
31 for (size_t i = 0; i < arraysize(kDomains); ++i) { | 31 for (size_t i = 0; i < arraysize(kDomains); ++i) { |
32 domains->push_back(Domain::Create() | 32 domains->push_back(Domain::Create() |
33 ->set_name(kDomains[i]) | 33 ->set_name(kDomains[i]) |
34 ->set_version(kVersion)); | 34 ->set_version(kVersion)); |
35 } | 35 } |
36 return Response::OK(); | 36 return Response::OK(); |
37 } | 37 } |
38 | 38 |
39 } // namespace schema | 39 } // namespace schema |
40 } // namespace devtools | 40 } // namespace devtools |
41 } // namespace content | 41 } // namespace content |
OLD | NEW |