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

Side by Side Diff: content/renderer/devtools/devtools_agent.cc

Issue 2034153002: Makes RenderFrameObserver/RenderViewObserver::OnDestruct pure virtual. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed comments. Created 4 years, 6 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
« no previous file with comments | « content/renderer/devtools/devtools_agent.h ('k') | content/renderer/devtools/devtools_client.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/renderer/devtools/devtools_agent.h" 5 #include "content/renderer/devtools/devtools_agent.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <map> 9 #include <map>
10 10
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 if (message.type() == FrameMsg_Navigate::ID) 100 if (message.type() == FrameMsg_Navigate::ID)
101 ContinueProgram(); // Don't want to swallow the message. 101 ContinueProgram(); // Don't want to swallow the message.
102 102
103 return handled; 103 return handled;
104 } 104 }
105 105
106 void DevToolsAgent::WidgetWillClose() { 106 void DevToolsAgent::WidgetWillClose() {
107 ContinueProgram(); 107 ContinueProgram();
108 } 108 }
109 109
110 void DevToolsAgent::OnDestruct() {
111 delete this;
112 }
113
110 void DevToolsAgent::sendProtocolMessage(int session_id, 114 void DevToolsAgent::sendProtocolMessage(int session_id,
111 int call_id, 115 int call_id,
112 const blink::WebString& message, 116 const blink::WebString& message,
113 const blink::WebString& state_cookie) { 117 const blink::WebString& state_cookie) {
114 if (!send_protocol_message_callback_for_test_.is_null()) { 118 if (!send_protocol_message_callback_for_test_.is_null()) {
115 send_protocol_message_callback_for_test_.Run( 119 send_protocol_message_callback_for_test_.Run(
116 session_id, call_id, message.utf8(), state_cookie.utf8()); 120 session_id, call_id, message.utf8(), state_cookie.utf8());
117 return; 121 return;
118 } 122 }
119 SendChunkedProtocolMessage(this, routing_id(), session_id, call_id, 123 SendChunkedProtocolMessage(this, routing_id(), session_id, call_id,
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after
313 result->Set("errors", errors.release()); 317 result->Set("errors", errors.release());
314 response->Set("result", result.release()); 318 response->Set("result", result.release());
315 319
316 std::string json_message; 320 std::string json_message;
317 base::JSONWriter::Write(*response, &json_message); 321 base::JSONWriter::Write(*response, &json_message);
318 SendChunkedProtocolMessage(this, routing_id(), session_id, call_id, 322 SendChunkedProtocolMessage(this, routing_id(), session_id, call_id,
319 json_message, std::string()); 323 json_message, std::string());
320 } 324 }
321 325
322 } // namespace content 326 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/devtools/devtools_agent.h ('k') | content/renderer/devtools/devtools_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698