| 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 OnVideoMemoryUsageStatsUpdate( |
| 94 const content::GPUVideoMemoryUsageStats& video_memory) OVERRIDE {} |
| 93 | 95 |
| 94 // Messages. | 96 // Messages. |
| 95 void OnTracingControllerInitialized(const ListValue* list); | 97 void OnTracingControllerInitialized(const ListValue* list); |
| 96 void OnBeginTracing(const ListValue* list); | 98 void OnBeginTracing(const ListValue* list); |
| 97 void OnEndTracingAsync(const ListValue* list); | 99 void OnEndTracingAsync(const ListValue* list); |
| 98 void OnBeginRequestBufferPercentFull(const ListValue* list); | 100 void OnBeginRequestBufferPercentFull(const ListValue* list); |
| 99 void OnLoadTraceFile(const ListValue* list); | 101 void OnLoadTraceFile(const ListValue* list); |
| 100 void OnSaveTraceFile(const ListValue* list); | 102 void OnSaveTraceFile(const ListValue* list); |
| 101 | 103 |
| 102 // Callbacks. | 104 // Callbacks. |
| (...skipping 433 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 536 // | 538 // |
| 537 //////////////////////////////////////////////////////////////////////////////// | 539 //////////////////////////////////////////////////////////////////////////////// |
| 538 | 540 |
| 539 TracingUI::TracingUI(content::WebUI* web_ui) : WebUIController(web_ui) { | 541 TracingUI::TracingUI(content::WebUI* web_ui) : WebUIController(web_ui) { |
| 540 web_ui->AddMessageHandler(new TracingMessageHandler()); | 542 web_ui->AddMessageHandler(new TracingMessageHandler()); |
| 541 | 543 |
| 542 // Set up the chrome://tracing/ source. | 544 // Set up the chrome://tracing/ source. |
| 543 Profile* profile = Profile::FromWebUI(web_ui); | 545 Profile* profile = Profile::FromWebUI(web_ui); |
| 544 ChromeURLDataManager::AddDataSource(profile, CreateTracingHTMLSource()); | 546 ChromeURLDataManager::AddDataSource(profile, CreateTracingHTMLSource()); |
| 545 } | 547 } |
| OLD | NEW |