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

Side by Side Diff: third_party/WebKit/Source/platform/inspector_protocol/Dispatcher_h.template

Issue 2012753003: DevTools: consolidate protocol generators for front-end, backend and type builder. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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
OLDNEW
(Empty)
1 // This file is generated
2
3 // Copyright (c) 2016 The Chromium Authors. All rights reserved.
4 // Use of this source code is governed by a BSD-style license that can be
5 // found in the LICENSE file.
6
7 #ifndef {{class_name}}_h
8 #define {{class_name}}_h
9
10 #include "platform/inspector_protocol/Backend.h"
11 #include "platform/inspector_protocol/TypeBuilder.h"
12
13 namespace blink {
14 namespace protocol {
15
16 class FrontendChannel;
17 class DispatcherImplWeakPtr;
18
19 class PLATFORM_EXPORT Dispatcher {
20 public:
21 static std::unique_ptr<Dispatcher> create(FrontendChannel* frontendChannel);
22 virtual ~Dispatcher() { }
23
24 {% for domain in api.domains %}
25 virtual void registerAgent(blink::protocol::{{domain.domain}}::Backend*) = 0 ;
26 {% endfor %}
27
28 virtual void clearFrontend() = 0;
29
30 enum CommonErrorCode {
31 ParseError = 0,
32 InvalidRequest,
33 MethodNotFound,
34 InvalidParams,
35 InternalError,
36 ServerError,
37 LastEntry,
38 };
39
40 void reportProtocolError(int callId, CommonErrorCode, const String16& errorM essage) const;
41 virtual void reportProtocolError(int callId, CommonErrorCode, const String16 & errorMessage, ErrorSupport*) const = 0;
42 virtual void dispatch(const String16& message) = 0;
43 static bool getCommandName(const String16& message, String16* result);
44 };
45
46 } // namespace protocol
47 } // namespace blink
48
49 #endif // !defined({{class_name}}_h)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698