Index: content/browser/devtools/protocol/devtools_protocol_frontend.h |
diff --git a/content/browser/devtools/protocol/devtools_protocol_frontend.h b/content/browser/devtools/protocol/devtools_protocol_frontend.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..dfbc64f64aac283dd7687211c8b5429d906ac048 |
--- /dev/null |
+++ b/content/browser/devtools/protocol/devtools_protocol_frontend.h |
@@ -0,0 +1,50 @@ |
+// Copyright 2014 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#ifndef CONTENT_BROWSER_DEVTOOLS_PROTOCOL_DEVTOOLS_PROTOCOL_FRONTEND_H_ |
+#define CONTENT_BROWSER_DEVTOOLS_PROTOCOL_DEVTOOLS_PROTOCOL_FRONTEND_H_ |
+ |
+#include "content/browser/devtools/devtools_protocol.h" |
+ |
+namespace content { |
+ |
+class DevToolsProtocolFrontend { |
+ public: |
+ typedef base::Callback<void(const std::string& event, |
+ base::DictionaryValue* params)> EventCallback; |
+ enum ResponseStatus { |
dgozman
2014/09/10 13:01:20
Looks like there is no need to expose this enum. L
vkuzkokov
2014/09/11 12:53:03
This enum is used in generated .cc
|
+ RESPONSE_STATUS_FALLTHROUGH, |
+ RESPONSE_STATUS_OK, |
+ RESPONSE_STATUS_INVALID_PARAMS, |
+ RESPONSE_STATUS_INTERNAL_ERROR, |
+ RESPONSE_STATUS_SERVER_ERROR, |
+ }; |
+ |
+ struct Response { |
+ static Response FallThrough(); |
+ static Response OK(); |
+ static Response InvalidParams(const std::string& message); |
+ static Response InternalError(const std::string& message); |
+ static Response ServerError(const std::string& message); |
+ |
+ ResponseStatus status_; |
dgozman
2014/09/10 13:01:20
private:
vkuzkokov
2014/09/11 12:53:03
Done.
|
+ std::string message_; |
+ }; |
+ |
+ protected: |
+ explicit DevToolsProtocolFrontend(const EventCallback& event_callback); |
+ virtual ~DevToolsProtocolFrontend(); |
+ |
+ void SendNotification(const std::string& method, |
+ base::DictionaryValue* params); |
+ |
+ private: |
+ EventCallback event_callback_; |
+ |
+ DISALLOW_COPY_AND_ASSIGN(DevToolsProtocolFrontend); |
+}; |
+ |
+} // namespace content |
+ |
+#endif // CONTENT_BROWSER_DEVTOOLS_PROTOCOL_DEVTOOLS_PROTOCOL_FRONTEND_H_ |