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

Side by Side Diff: content/browser/devtools/protocol/schema_handler.cc

Issue 2835843002: Revert of [DevTools] Consolidate overlay-related functionality in Overlay domain (Closed)
Patch Set: Created 3 years, 8 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 unified diff | Download patch
« no previous file with comments | « no previous file | headless/BUILD.gn » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 protocol { 8 namespace protocol {
9 9
10 SchemaHandler::SchemaHandler() 10 SchemaHandler::SchemaHandler()
11 : DevToolsDomainHandler(Schema::Metainfo::domainName) { 11 : DevToolsDomainHandler(Schema::Metainfo::domainName) {
12 } 12 }
13 13
14 SchemaHandler::~SchemaHandler() { 14 SchemaHandler::~SchemaHandler() {
15 } 15 }
16 16
17 void SchemaHandler::Wire(UberDispatcher* dispatcher) { 17 void SchemaHandler::Wire(UberDispatcher* dispatcher) {
18 Schema::Dispatcher::wire(dispatcher, this); 18 Schema::Dispatcher::wire(dispatcher, this);
19 } 19 }
20 20
21 Response SchemaHandler::GetDomains( 21 Response SchemaHandler::GetDomains(
22 std::unique_ptr<protocol::Array<Schema::Domain>>* domains) { 22 std::unique_ptr<protocol::Array<Schema::Domain>>* domains) {
23 // TODO(kozyatisnkiy): get this from the target instead of hardcoding a list. 23 // TODO(kozyatisnkiy): get this from the target instead of hardcoding a list.
24 static const char kVersion[] = "1.2"; 24 static const char kVersion[] = "1.2";
25 static const char* kDomains[] = {"Inspector", 25 static const char* kDomains[] = {
26 "Memory", 26 "Inspector", "Memory", "Page", "Rendering", "Emulation", "Security",
27 "Page", 27 "Network", "Database", "IndexedDB", "CacheStorage", "DOMStorage", "CSS",
28 "Emulation", 28 "ApplicationCache", "DOM", "IO", "DOMDebugger", "ServiceWorker",
29 "Security", 29 "Input", "LayerTree", "DeviceOrientation", "Tracing", "Animation",
30 "Network", 30 "Accessibility", "Storage", "Log", "Runtime", "Debugger",
31 "Database", 31 "Profiler", "HeapProfiler", "Schema", "Target"
32 "IndexedDB", 32 };
33 "CacheStorage",
34 "DOMStorage",
35 "CSS",
36 "ApplicationCache",
37 "DOM",
38 "IO",
39 "DOMDebugger",
40 "ServiceWorker",
41 "Input",
42 "LayerTree",
43 "DeviceOrientation",
44 "Tracing",
45 "Animation",
46 "Accessibility",
47 "Storage",
48 "Log",
49 "Runtime",
50 "Debugger",
51 "Profiler",
52 "HeapProfiler",
53 "Schema",
54 "Target",
55 "Overlay"};
56 *domains = protocol::Array<Schema::Domain>::create(); 33 *domains = protocol::Array<Schema::Domain>::create();
57 for (size_t i = 0; i < arraysize(kDomains); ++i) { 34 for (size_t i = 0; i < arraysize(kDomains); ++i) {
58 (*domains)->addItem(Schema::Domain::Create() 35 (*domains)->addItem(Schema::Domain::Create()
59 .SetName(kDomains[i]) 36 .SetName(kDomains[i])
60 .SetVersion(kVersion) 37 .SetVersion(kVersion)
61 .Build()); 38 .Build());
62 } 39 }
63 return Response::OK(); 40 return Response::OK();
64 } 41 }
65 42
66 } // namespace protocol 43 } // namespace protocol
67 } // namespace content 44 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | headless/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698