OLD | NEW |
---|---|
(Empty) | |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef CONTENT_BROWSER_DEVTOOLS_DEVTOOLS_PROTOCOL_FRONTEND_H_ | |
6 #define CONTENT_BROWSER_DEVTOOLS_DEVTOOLS_PROTOCOL_FRONTEND_H_ | |
7 | |
8 #include "content/browser/devtools/devtools_protocol.h" | |
9 | |
10 namespace content { | |
11 | |
12 class DevToolsProtocolFrontend { | |
13 public: | |
14 typedef base::Callback<void(const std::string& event, | |
15 base::DictionaryValue* params)> EventCallback; | |
16 enum ResponseStatus { | |
17 RESPONSE_STATUS_FALLTHROUGH, | |
18 RESPONSE_STATUS_OK, | |
19 RESPONSE_STATUS_INVALID_PARAMS, | |
20 RESPONSE_STATUS_SERVER_ERROR, | |
dgozman
2014/09/09 14:30:59
Add internal error as well.
vkuzkokov
2014/09/10 10:33:12
Done.
| |
21 }; | |
22 | |
23 struct Response { | |
24 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.
| |
25 | |
26 ResponseStatus status_; | |
27 std::string message_; | |
28 }; | |
29 | |
30 protected: | |
31 explicit DevToolsProtocolFrontend(const EventCallback& event_callback); | |
32 virtual ~DevToolsProtocolFrontend(); | |
33 | |
34 void SendNotification(const std::string& method, | |
35 base::DictionaryValue* params); | |
36 | |
37 private: | |
38 EventCallback event_callback_; | |
39 | |
40 DISALLOW_COPY_AND_ASSIGN(DevToolsProtocolFrontend); | |
41 }; | |
42 | |
43 } // namespace content | |
44 | |
45 #endif // CONTENT_BROWSER_DEVTOOLS_DEVTOOLS_PROTOCOL_FRONTEND_H_ | |
OLD | NEW |