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

Side by Side Diff: third_party/inspector_protocol/lib/DispatcherBase_h.template

Issue 2548263002: [DevTools] Migrate dom, emulation, inspector, network, page and schema handlers to new generator. (Closed)
Patch Set: works Created 4 years 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
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 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 protocol::HashSet<WeakPtr*> m_weakPtrs; 106 protocol::HashSet<WeakPtr*> m_weakPtrs;
107 int m_lastCallbackId; 107 int m_lastCallbackId;
108 bool m_lastCallbackFallThrough; 108 bool m_lastCallbackFallThrough;
109 }; 109 };
110 110
111 class {{config.lib.export_macro}} UberDispatcher { 111 class {{config.lib.export_macro}} UberDispatcher {
112 PROTOCOL_DISALLOW_COPY(UberDispatcher); 112 PROTOCOL_DISALLOW_COPY(UberDispatcher);
113 public: 113 public:
114 explicit UberDispatcher(FrontendChannel*); 114 explicit UberDispatcher(FrontendChannel*);
115 void registerBackend(const String& name, std::unique_ptr<protocol::Dispatche rBase>); 115 void registerBackend(const String& name, std::unique_ptr<protocol::Dispatche rBase>);
116 DispatchResponse::Status dispatch(std::unique_ptr<Value> message); 116 DispatchResponse::Status dispatch(std::unique_ptr<Value> message, int* callI d = nullptr, String* method = nullptr);
117 FrontendChannel* channel() { return m_frontendChannel; } 117 FrontendChannel* channel() { return m_frontendChannel; }
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 };
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
163 } 163 }
164 164
165 String m_notification; 165 String m_notification;
166 }; 166 };
167 167
168 {% for namespace in config.protocol.namespace %} 168 {% for namespace in config.protocol.namespace %}
169 } // namespace {{namespace}} 169 } // namespace {{namespace}}
170 {% endfor %} 170 {% endfor %}
171 171
172 #endif // !defined({{"_".join(config.protocol.namespace)}}_DispatcherBase_h) 172 #endif // !defined({{"_".join(config.protocol.namespace)}}_DispatcherBase_h)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698