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

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

Issue 12906011: Detect debugging target crash. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 7 years, 9 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 | Annotate | Revision Log
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 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 93
94 std::string Serialize(); 94 std::string Serialize();
95 95
96 private: 96 private:
97 std::string method_; 97 std::string method_;
98 scoped_ptr<base::DictionaryValue> params_; 98 scoped_ptr<base::DictionaryValue> params_;
99 99
100 DISALLOW_COPY_AND_ASSIGN(Notification); 100 DISALLOW_COPY_AND_ASSIGN(Notification);
101 }; 101 };
102 102
103 class Event {
104 public:
105 ~Event();
106
107 std::string Serialize();
108
109 private:
110 friend class DevToolsProtocol;
111
112 // Takes ownership over |params|.
113 Event(const std::string& method, base::DictionaryValue* params);
114
115 std::string method_;
116 scoped_ptr<base::DictionaryValue> params_;
117
118 DISALLOW_COPY_AND_ASSIGN(Event);
119 };
120
103 class Handler { 121 class Handler {
104 public: 122 public:
105 typedef base::Callback<scoped_ptr<DevToolsProtocol::Response>( 123 typedef base::Callback<scoped_ptr<DevToolsProtocol::Response>(
106 DevToolsProtocol::Command* command)> CommandHandler; 124 DevToolsProtocol::Command* command)> CommandHandler;
107 125
108 virtual ~Handler(); 126 virtual ~Handler();
109 127
110 virtual scoped_ptr<DevToolsProtocol::Response> HandleCommand( 128 virtual scoped_ptr<DevToolsProtocol::Response> HandleCommand(
111 DevToolsProtocol::Command* command); 129 DevToolsProtocol::Command* command);
112 130
(...skipping 14 matching lines...) Expand all
127 145
128 Notifier notifier_; 146 Notifier notifier_;
129 CommandHandlers command_handlers_; 147 CommandHandlers command_handlers_;
130 148
131 DISALLOW_COPY_AND_ASSIGN(Handler); 149 DISALLOW_COPY_AND_ASSIGN(Handler);
132 }; 150 };
133 151
134 static Command* ParseCommand(const std::string& json, 152 static Command* ParseCommand(const std::string& json,
135 std::string* error_response); 153 std::string* error_response);
136 154
155 static Event* CreateEvent(const std::string& method,
156 base::DictionaryValue* params);
157
137 private: 158 private:
138 DevToolsProtocol() {} 159 DevToolsProtocol() {}
139 ~DevToolsProtocol() {} 160 ~DevToolsProtocol() {}
140 }; 161 };
141 162
142 } // namespace content 163 } // namespace content
143 164
144 #endif // CONTENT_BROWSER_DEVTOOLS_DEVTOOLS_PROTOCOL_H_ 165 #endif // CONTENT_BROWSER_DEVTOOLS_DEVTOOLS_PROTOCOL_H_
OLDNEW
« no previous file with comments | « content/browser/devtools/devtools_http_handler_impl.cc ('k') | content/browser/devtools/devtools_protocol.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698