Chromium Code Reviews| 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/browser/tracing/tracing_ui.h" | 5 #include "content/browser/tracing/tracing_ui.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "base/base64.h" | 9 #include "base/base64.h" |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 281 | 281 |
| 282 TracingUI::~TracingUI() { | 282 TracingUI::~TracingUI() { |
| 283 TracingControllerImpl::GetInstance()->UnregisterTracingUI(this); | 283 TracingControllerImpl::GetInstance()->UnregisterTracingUI(this); |
| 284 } | 284 } |
| 285 | 285 |
| 286 void TracingUI::OnMonitoringStateChanged(bool is_monitoring) { | 286 void TracingUI::OnMonitoringStateChanged(bool is_monitoring) { |
| 287 web_ui()->CallJavascriptFunction( | 287 web_ui()->CallJavascriptFunction( |
| 288 "onMonitoringStateChanged", base::FundamentalValue(is_monitoring)); | 288 "onMonitoringStateChanged", base::FundamentalValue(is_monitoring)); |
| 289 } | 289 } |
| 290 | 290 |
| 291 void TracingUI::OnSystemTraceDataCollected( | |
| 292 const scoped_refptr<base::RefCountedString>& events_str_ptr) { | |
| 293 web_ui()->CallJavascriptFunction( | |
|
dsinclair
2014/01/30 14:36:06
Don't think we want to send this back as JS, but i
| |
| 294 "tracingController.onSystemTraceDataCollected", | |
| 295 *scoped_ptr<base::Value>(new base::StringValue(events_str_ptr->data()))); | |
| 296 } | |
| 297 | |
| 291 } // namespace content | 298 } // namespace content |
| OLD | NEW |