| 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 "chrome/browser/ui/webui/tracing_ui.h" | 5 #include "chrome/browser/ui/webui/tracing_ui.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/bind_helpers.h" | 10 #include "base/bind_helpers.h" |
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 83 virtual void FileSelectionCanceled(void* params); | 83 virtual void FileSelectionCanceled(void* params); |
| 84 | 84 |
| 85 // TraceSubscriber implementation. | 85 // TraceSubscriber implementation. |
| 86 virtual void OnEndTracingComplete(); | 86 virtual void OnEndTracingComplete(); |
| 87 virtual void OnTraceDataCollected( | 87 virtual void OnTraceDataCollected( |
| 88 const scoped_refptr<base::RefCountedString>& trace_fragment); | 88 const scoped_refptr<base::RefCountedString>& trace_fragment); |
| 89 virtual void OnTraceBufferPercentFullReply(float percent_full); | 89 virtual void OnTraceBufferPercentFullReply(float percent_full); |
| 90 | 90 |
| 91 // GpuDataManagerObserver implementation. | 91 // GpuDataManagerObserver implementation. |
| 92 virtual void OnGpuInfoUpdate() OVERRIDE; | 92 virtual void OnGpuInfoUpdate() OVERRIDE; |
| 93 virtual void OnVidmemUpdate(const content::GPUVidmem& vidmem) OVERRIDE {} |
| 93 | 94 |
| 94 // Messages. | 95 // Messages. |
| 95 void OnTracingControllerInitialized(const ListValue* list); | 96 void OnTracingControllerInitialized(const ListValue* list); |
| 96 void OnBeginTracing(const ListValue* list); | 97 void OnBeginTracing(const ListValue* list); |
| 97 void OnEndTracingAsync(const ListValue* list); | 98 void OnEndTracingAsync(const ListValue* list); |
| 98 void OnBeginRequestBufferPercentFull(const ListValue* list); | 99 void OnBeginRequestBufferPercentFull(const ListValue* list); |
| 99 void OnLoadTraceFile(const ListValue* list); | 100 void OnLoadTraceFile(const ListValue* list); |
| 100 void OnSaveTraceFile(const ListValue* list); | 101 void OnSaveTraceFile(const ListValue* list); |
| 101 | 102 |
| 102 // Callbacks. | 103 // Callbacks. |
| (...skipping 433 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 536 // | 537 // |
| 537 //////////////////////////////////////////////////////////////////////////////// | 538 //////////////////////////////////////////////////////////////////////////////// |
| 538 | 539 |
| 539 TracingUI::TracingUI(content::WebUI* web_ui) : WebUIController(web_ui) { | 540 TracingUI::TracingUI(content::WebUI* web_ui) : WebUIController(web_ui) { |
| 540 web_ui->AddMessageHandler(new TracingMessageHandler()); | 541 web_ui->AddMessageHandler(new TracingMessageHandler()); |
| 541 | 542 |
| 542 // Set up the chrome://tracing/ source. | 543 // Set up the chrome://tracing/ source. |
| 543 Profile* profile = Profile::FromWebUI(web_ui); | 544 Profile* profile = Profile::FromWebUI(web_ui); |
| 544 ChromeURLDataManager::AddDataSource(profile, CreateTracingHTMLSource()); | 545 ChromeURLDataManager::AddDataSource(profile, CreateTracingHTMLSource()); |
| 545 } | 546 } |
| OLD | NEW |