| OLD | NEW |
| 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 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 191 } | 191 } |
| 192 | 192 |
| 193 void DevToolsAgent::disableTracing() { | 193 void DevToolsAgent::disableTracing() { |
| 194 TraceLog::GetInstance()->SetDisabled(); | 194 TraceLog::GetInstance()->SetDisabled(); |
| 195 } | 195 } |
| 196 | 196 |
| 197 void DevToolsAgent::setCPUThrottlingRate(double rate) { | 197 void DevToolsAgent::setCPUThrottlingRate(double rate) { |
| 198 cpu_throttler_->SetThrottlingRate(rate); | 198 cpu_throttler_->SetThrottlingRate(rate); |
| 199 } | 199 } |
| 200 | 200 |
| 201 void DevToolsAgent::showCertificateViewer(const WebString& certificate) { |
| 202 Send(new DevToolsAgentHostMsg_ShowCertificateViewer( |
| 203 routing_id(), certificate.latin1())); |
| 204 } |
| 205 |
| 201 // static | 206 // static |
| 202 DevToolsAgent* DevToolsAgent::FromRoutingId(int routing_id) { | 207 DevToolsAgent* DevToolsAgent::FromRoutingId(int routing_id) { |
| 203 IdToAgentMap::iterator it = g_agent_for_routing_id.Get().find(routing_id); | 208 IdToAgentMap::iterator it = g_agent_for_routing_id.Get().find(routing_id); |
| 204 if (it != g_agent_for_routing_id.Get().end()) { | 209 if (it != g_agent_for_routing_id.Get().end()) { |
| 205 return it->second; | 210 return it->second; |
| 206 } | 211 } |
| 207 return NULL; | 212 return NULL; |
| 208 } | 213 } |
| 209 | 214 |
| 210 // static | 215 // static |
| (...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 344 result->Set("errors", errors.release()); | 349 result->Set("errors", errors.release()); |
| 345 response->Set("result", result.release()); | 350 response->Set("result", result.release()); |
| 346 | 351 |
| 347 std::string json_message; | 352 std::string json_message; |
| 348 base::JSONWriter::Write(*response, &json_message); | 353 base::JSONWriter::Write(*response, &json_message); |
| 349 SendChunkedProtocolMessage(this, routing_id(), session_id, call_id, | 354 SendChunkedProtocolMessage(this, routing_id(), session_id, call_id, |
| 350 json_message, std::string()); | 355 json_message, std::string()); |
| 351 } | 356 } |
| 352 | 357 |
| 353 } // namespace content | 358 } // namespace content |
| OLD | NEW |