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

Side by Side Diff: content/browser/devtools/protocol/devtools_protocol_client.cc

Issue 642263004: [DevTools] Make generated protocol structs wrappers around DictionaryValue (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 2014 The Chromium Authors. All rights reserved. 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 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 #include "content/browser/devtools/protocol/devtools_protocol_client.h" 5 #include "content/browser/devtools/protocol/devtools_protocol_client.h"
6 6
7 namespace content { 7 namespace content {
8 8
9 DevToolsProtocolClient::DevToolsProtocolClient( 9 DevToolsProtocolClient::DevToolsProtocolClient(
10 const EventCallback& event_callback, 10 const EventCallback& event_callback,
11 const ResponseCallback& response_callback) 11 const ResponseCallback& response_callback)
12 : event_callback_(event_callback), 12 : event_callback_(event_callback),
13 response_callback_(response_callback) { 13 response_callback_(response_callback) {
14 } 14 }
15 15
16 DevToolsProtocolClient::~DevToolsProtocolClient() { 16 DevToolsProtocolClient::~DevToolsProtocolClient() {
17 } 17 }
18 18
19 void DevToolsProtocolClient::SendNotification(const std::string& method, 19 void DevToolsProtocolClient::SendNotification(
20 base::DictionaryValue* params) { 20 const std::string& method,
21 event_callback_.Run(method, params); 21 scoped_ptr<base::DictionaryValue> params) {
22 event_callback_.Run(method, params.release());
22 } 23 }
23 24
24 void DevToolsProtocolClient::SendAsyncResponse( 25 void DevToolsProtocolClient::SendAsyncResponse(
25 scoped_refptr<DevToolsProtocol::Response> response) { 26 scoped_refptr<DevToolsProtocol::Response> response) {
26 response_callback_.Run(response); 27 response_callback_.Run(response);
27 } 28 }
28 29
29 void DevToolsProtocolClient::SendInvalidParamsResponse( 30 void DevToolsProtocolClient::SendInvalidParamsResponse(
30 scoped_refptr<DevToolsProtocol::Command> command, 31 scoped_refptr<DevToolsProtocol::Command> command,
31 const std::string& message) { 32 const std::string& message) {
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 } 85 }
85 86
86 const std::string& Response::message() const { 87 const std::string& Response::message() const {
87 return message_; 88 return message_;
88 } 89 }
89 90
90 Response::Response() { 91 Response::Response() {
91 } 92 }
92 93
93 } // namespace content 94 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698