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

Side by Side Diff: content/browser/devtools/devtools_protocol.h

Issue 667943003: Standardize usage of virtual/override/final in content/browser/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 months 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 (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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 CONTENT_BROWSER_DEVTOOLS_DEVTOOLS_PROTOCOL_H_ 5 #ifndef CONTENT_BROWSER_DEVTOOLS_DEVTOOLS_PROTOCOL_H_
6 #define CONTENT_BROWSER_DEVTOOLS_DEVTOOLS_PROTOCOL_H_ 6 #define CONTENT_BROWSER_DEVTOOLS_DEVTOOLS_PROTOCOL_H_
7 7
8 #include <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 10
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 scoped_ptr<base::DictionaryValue> params_; 43 scoped_ptr<base::DictionaryValue> params_;
44 44
45 private: 45 private:
46 DISALLOW_COPY_AND_ASSIGN(Message); 46 DISALLOW_COPY_AND_ASSIGN(Message);
47 }; 47 };
48 48
49 class Command : public Message { 49 class Command : public Message {
50 public: 50 public:
51 int id() { return id_; } 51 int id() { return id_; }
52 52
53 virtual std::string Serialize() override; 53 std::string Serialize() override;
54 54
55 // Creates success response. Takes ownership of |result|. 55 // Creates success response. Takes ownership of |result|.
56 scoped_refptr<Response> SuccessResponse(base::DictionaryValue* result); 56 scoped_refptr<Response> SuccessResponse(base::DictionaryValue* result);
57 57
58 // Creates error response. 58 // Creates error response.
59 scoped_refptr<Response> InternalErrorResponse(const std::string& message); 59 scoped_refptr<Response> InternalErrorResponse(const std::string& message);
60 60
61 // Creates error response. 61 // Creates error response.
62 scoped_refptr<Response> InvalidParamResponse(const std::string& param); 62 scoped_refptr<Response> InvalidParamResponse(const std::string& param);
63 63
64 // Creates error response. 64 // Creates error response.
65 scoped_refptr<Response> NoSuchMethodErrorResponse(); 65 scoped_refptr<Response> NoSuchMethodErrorResponse();
66 66
67 // Creates error response. 67 // Creates error response.
68 scoped_refptr<Response> ServerErrorResponse(const std::string& message); 68 scoped_refptr<Response> ServerErrorResponse(const std::string& message);
69 69
70 // Creates async response promise. 70 // Creates async response promise.
71 scoped_refptr<Response> AsyncResponsePromise(); 71 scoped_refptr<Response> AsyncResponsePromise();
72 72
73 protected: 73 protected:
74 virtual ~Command(); 74 ~Command() override;
75 75
76 private: 76 private:
77 friend class DevToolsProtocol; 77 friend class DevToolsProtocol;
78 Command(int id, const std::string& method, 78 Command(int id, const std::string& method,
79 base::DictionaryValue* params); 79 base::DictionaryValue* params);
80 80
81 int id_; 81 int id_;
82 82
83 DISALLOW_COPY_AND_ASSIGN(Command); 83 DISALLOW_COPY_AND_ASSIGN(Command);
84 }; 84 };
(...skipping 17 matching lines...) Expand all
102 scoped_ptr<base::DictionaryValue> result_; 102 scoped_ptr<base::DictionaryValue> result_;
103 int error_code_; 103 int error_code_;
104 std::string error_message_; 104 std::string error_message_;
105 bool is_async_promise_; 105 bool is_async_promise_;
106 106
107 DISALLOW_COPY_AND_ASSIGN(Response); 107 DISALLOW_COPY_AND_ASSIGN(Response);
108 }; 108 };
109 109
110 class Notification : public Message { 110 class Notification : public Message {
111 public: 111 public:
112 112 std::string Serialize() override;
113 virtual std::string Serialize() override;
114 113
115 private: 114 private:
116 friend class DevToolsProtocol; 115 friend class DevToolsProtocol;
117 virtual ~Notification(); 116 ~Notification() override;
118 117
119 // Takes ownership of |params|. 118 // Takes ownership of |params|.
120 Notification(const std::string& method, 119 Notification(const std::string& method,
121 base::DictionaryValue* params); 120 base::DictionaryValue* params);
122 121
123 DISALLOW_COPY_AND_ASSIGN(Notification); 122 DISALLOW_COPY_AND_ASSIGN(Notification);
124 }; 123 };
125 124
126 class CONTENT_EXPORT Handler { 125 class CONTENT_EXPORT Handler {
127 public: 126 public:
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
186 static scoped_refptr<Notification> CreateNotification( 185 static scoped_refptr<Notification> CreateNotification(
187 const std::string& method, base::DictionaryValue* params); 186 const std::string& method, base::DictionaryValue* params);
188 187
189 DevToolsProtocol() {} 188 DevToolsProtocol() {}
190 ~DevToolsProtocol() {} 189 ~DevToolsProtocol() {}
191 }; 190 };
192 191
193 } // namespace content 192 } // namespace content
194 193
195 #endif // CONTENT_BROWSER_DEVTOOLS_DEVTOOLS_PROTOCOL_H_ 194 #endif // CONTENT_BROWSER_DEVTOOLS_DEVTOOLS_PROTOCOL_H_
OLDNEW
« no previous file with comments | « content/browser/devtools/devtools_netlog_observer.h ('k') | content/browser/devtools/devtools_system_info_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698