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_PROTOCOL_DEVTOOLS_PROTOCOL_FRONTEND_H_ | |
6 #define CONTENT_BROWSER_DEVTOOLS_PROTOCOL_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 { | |
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
| |
17 RESPONSE_STATUS_FALLTHROUGH, | |
18 RESPONSE_STATUS_OK, | |
19 RESPONSE_STATUS_INVALID_PARAMS, | |
20 RESPONSE_STATUS_INTERNAL_ERROR, | |
21 RESPONSE_STATUS_SERVER_ERROR, | |
22 }; | |
23 | |
24 struct Response { | |
25 static Response FallThrough(); | |
26 static Response OK(); | |
27 static Response InvalidParams(const std::string& message); | |
28 static Response InternalError(const std::string& message); | |
29 static Response ServerError(const std::string& message); | |
30 | |
31 ResponseStatus status_; | |
dgozman
2014/09/10 13:01:20
private:
vkuzkokov
2014/09/11 12:53:03
Done.
| |
32 std::string message_; | |
33 }; | |
34 | |
35 protected: | |
36 explicit DevToolsProtocolFrontend(const EventCallback& event_callback); | |
37 virtual ~DevToolsProtocolFrontend(); | |
38 | |
39 void SendNotification(const std::string& method, | |
40 base::DictionaryValue* params); | |
41 | |
42 private: | |
43 EventCallback event_callback_; | |
44 | |
45 DISALLOW_COPY_AND_ASSIGN(DevToolsProtocolFrontend); | |
46 }; | |
47 | |
48 } // namespace content | |
49 | |
50 #endif // CONTENT_BROWSER_DEVTOOLS_PROTOCOL_DEVTOOLS_PROTOCOL_FRONTEND_H_ | |
OLD | NEW |