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

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

Issue 2819183002: [DevTools] Consolidate overlay-related functionality in Overlay domain (Closed)
Patch Set: rebased bad merge 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[] = { 25 static const char* kDomains[] = {"Inspector",
26 "Inspector", "Memory", "Page", "Rendering", "Emulation", "Security", 26 "Memory",
27 "Network", "Database", "IndexedDB", "CacheStorage", "DOMStorage", "CSS", 27 "Page",
28 "ApplicationCache", "DOM", "IO", "DOMDebugger", "ServiceWorker", 28 "Emulation",
29 "Input", "LayerTree", "DeviceOrientation", "Tracing", "Animation", 29 "Security",
30 "Accessibility", "Storage", "Log", "Runtime", "Debugger", 30 "Network",
31 "Profiler", "HeapProfiler", "Schema", "Target" 31 "Database",
32 }; 32 "IndexedDB",
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"};
33 *domains = protocol::Array<Schema::Domain>::create(); 56 *domains = protocol::Array<Schema::Domain>::create();
34 for (size_t i = 0; i < arraysize(kDomains); ++i) { 57 for (size_t i = 0; i < arraysize(kDomains); ++i) {
35 (*domains)->addItem(Schema::Domain::Create() 58 (*domains)->addItem(Schema::Domain::Create()
36 .SetName(kDomains[i]) 59 .SetName(kDomains[i])
37 .SetVersion(kVersion) 60 .SetVersion(kVersion)
38 .Build()); 61 .Build());
39 } 62 }
40 return Response::OK(); 63 return Response::OK();
41 } 64 }
42 65
43 } // namespace protocol 66 } // namespace protocol
44 } // namespace content 67 } // 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