| OLD | NEW |
| 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 #ifndef {{"_".join(config.protocol.namespace)}}_DispatcherBase_h | 5 #ifndef {{"_".join(config.protocol.namespace)}}_DispatcherBase_h |
| 6 #define {{"_".join(config.protocol.namespace)}}_DispatcherBase_h | 6 #define {{"_".join(config.protocol.namespace)}}_DispatcherBase_h |
| 7 | 7 |
| 8 //#include "Collections.h" | 8 //#include "Collections.h" |
| 9 //#include "ErrorSupport.h" | 9 //#include "ErrorSupport.h" |
| 10 //#include "Forward.h" | 10 //#include "Forward.h" |
| (...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 118 bool fallThroughForNotFound() { return m_fallThroughForNotFound; } | 118 bool fallThroughForNotFound() { return m_fallThroughForNotFound; } |
| 119 void setFallThroughForNotFound(bool); | 119 void setFallThroughForNotFound(bool); |
| 120 virtual ~UberDispatcher(); | 120 virtual ~UberDispatcher(); |
| 121 | 121 |
| 122 private: | 122 private: |
| 123 FrontendChannel* m_frontendChannel; | 123 FrontendChannel* m_frontendChannel; |
| 124 bool m_fallThroughForNotFound; | 124 bool m_fallThroughForNotFound; |
| 125 protocol::HashMap<String, std::unique_ptr<protocol::DispatcherBase>> m_dispa
tchers; | 125 protocol::HashMap<String, std::unique_ptr<protocol::DispatcherBase>> m_dispa
tchers; |
| 126 }; | 126 }; |
| 127 | 127 |
| 128 class InternalResponse : public Serializable { |
| 129 PROTOCOL_DISALLOW_COPY(InternalResponse); |
| 130 public: |
| 131 static std::unique_ptr<InternalResponse> createResponse(int callId, std::uni
que_ptr<Serializable> params); |
| 132 static std::unique_ptr<InternalResponse> createNotification(const String& no
tification, std::unique_ptr<Serializable> params = nullptr); |
| 133 |
| 134 String serialize() override; |
| 135 |
| 136 ~InternalResponse() override {} |
| 137 |
| 138 private: |
| 139 InternalResponse(int callId, const String& notification, std::unique_ptr<Ser
ializable> params); |
| 140 |
| 141 int m_callId; |
| 142 String m_notification; |
| 143 std::unique_ptr<Serializable> m_params; |
| 144 }; |
| 145 |
| 128 {% for namespace in config.protocol.namespace %} | 146 {% for namespace in config.protocol.namespace %} |
| 129 } // namespace {{namespace}} | 147 } // namespace {{namespace}} |
| 130 {% endfor %} | 148 {% endfor %} |
| 131 | 149 |
| 132 #endif // !defined({{"_".join(config.protocol.namespace)}}_DispatcherBase_h) | 150 #endif // !defined({{"_".join(config.protocol.namespace)}}_DispatcherBase_h) |
| OLD | NEW |