| OLD | NEW |
| (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) | |
| OLD | NEW |