Chromium Code Reviews| Index: content/browser/devtools/devtools_protocol_frontend.h |
| diff --git a/content/browser/devtools/devtools_protocol_frontend.h b/content/browser/devtools/devtools_protocol_frontend.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..50daffd8fabdd77d7c95a5020f0c57a5d6f2cce4 |
| --- /dev/null |
| +++ b/content/browser/devtools/devtools_protocol_frontend.h |
| @@ -0,0 +1,45 @@ |
| +// 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_DEVTOOLS_PROTOCOL_FRONTEND_H_ |
| +#define CONTENT_BROWSER_DEVTOOLS_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 { |
| + RESPONSE_STATUS_FALLTHROUGH, |
| + RESPONSE_STATUS_OK, |
| + RESPONSE_STATUS_INVALID_PARAMS, |
| + RESPONSE_STATUS_SERVER_ERROR, |
|
dgozman
2014/09/09 14:30:59
Add internal error as well.
vkuzkokov
2014/09/10 10:33:12
Done.
|
| + }; |
| + |
| + struct Response { |
| + Response(ResponseStatus status, const std::string& message); |
|
dgozman
2014/09/09 14:30:59
Let's add
static Response FallThrough();
static R
vkuzkokov
2014/09/10 10:33:12
Done.
|
| + |
| + ResponseStatus status_; |
| + 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_DEVTOOLS_PROTOCOL_FRONTEND_H_ |