OLD | NEW |
1 // This file is generated | 1 // This file is generated |
2 | 2 |
3 // Copyright (c) 2016 The Chromium Authors. All rights reserved. | 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 | 4 // Use of this source code is governed by a BSD-style license that can be |
5 // found in the LICENSE file. | 5 // found in the LICENSE file. |
6 | 6 |
7 #ifndef {{class_name}}_h | 7 #ifndef {{class_name}}_h |
8 #define {{class_name}}_h | 8 #define {{class_name}}_h |
9 | 9 |
10 #include "platform/inspector_protocol/TypeBuilder.h" | 10 #include "platform/inspector_protocol/TypeBuilder.h" |
11 | 11 |
12 namespace blink { | 12 namespace blink { |
13 namespace protocol { | 13 namespace protocol { |
14 | 14 |
15 class FrontendChannel; | 15 class FrontendChannel; |
16 class DispatcherImplWeakPtr; | 16 class DispatcherImplWeakPtr; |
17 using ErrorString = String; | |
18 | 17 |
19 class PLATFORM_EXPORT Dispatcher { | 18 class PLATFORM_EXPORT Dispatcher { |
20 public: | 19 public: |
21 static PassOwnPtr<Dispatcher> create(FrontendChannel* frontendChannel); | 20 static PassOwnPtr<Dispatcher> create(FrontendChannel* frontendChannel); |
22 virtual ~Dispatcher() { } | 21 virtual ~Dispatcher() { } |
23 | 22 |
24 class PLATFORM_EXPORT CallbackBase { | 23 class PLATFORM_EXPORT CallbackBase { |
25 public: | 24 public: |
26 CallbackBase(PassOwnPtr<DispatcherImplWeakPtr> backendImpl, int sessionI
d, int id); | 25 CallbackBase(PassOwnPtr<DispatcherImplWeakPtr> backendImpl, int sessionI
d, int id); |
27 virtual ~CallbackBase(); | 26 virtual ~CallbackBase(); |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
95 enum CommonErrorCode { | 94 enum CommonErrorCode { |
96 ParseError = 0, | 95 ParseError = 0, |
97 InvalidRequest, | 96 InvalidRequest, |
98 MethodNotFound, | 97 MethodNotFound, |
99 InvalidParams, | 98 InvalidParams, |
100 InternalError, | 99 InternalError, |
101 ServerError, | 100 ServerError, |
102 LastEntry, | 101 LastEntry, |
103 }; | 102 }; |
104 | 103 |
105 void reportProtocolError(int sessionId, int callId, CommonErrorCode, const S
tring& errorMessage) const; | 104 void reportProtocolError(int sessionId, int callId, CommonErrorCode, const S
tring16& errorMessage) const; |
106 virtual void reportProtocolError(int sessionId, int callId, CommonErrorCode,
const String& errorMessage, ErrorSupport*) const = 0; | 105 virtual void reportProtocolError(int sessionId, int callId, CommonErrorCode,
const String16& errorMessage, ErrorSupport*) const = 0; |
107 virtual void dispatch(int sessionId, const String& message) = 0; | 106 virtual void dispatch(int sessionId, const String16& message) = 0; |
108 static bool getCommandName(const String& message, String* result); | 107 static bool getCommandName(const String16& message, String16* result); |
109 }; | 108 }; |
110 | 109 |
111 } // namespace protocol | 110 } // namespace protocol |
112 } // namespace blink | 111 } // namespace blink |
113 | 112 |
114 using blink::protocol::ErrorString; | |
115 | |
116 #endif // !defined({{class_name}}_h) | 113 #endif // !defined({{class_name}}_h) |
OLD | NEW |