| 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 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 135 delete file_contents; | 135 delete file_contents; |
| 136 } | 136 } |
| 137 | 137 |
| 138 void SaveTraceFileCompleteProxy() { | 138 void SaveTraceFileCompleteProxy() { |
| 139 if (handler_) | 139 if (handler_) |
| 140 handler_->SaveTraceFileComplete(); | 140 handler_->SaveTraceFileComplete(); |
| 141 } | 141 } |
| 142 | 142 |
| 143 private: | 143 private: |
| 144 friend class base::RefCountedThreadSafe<TaskProxy>; | 144 friend class base::RefCountedThreadSafe<TaskProxy>; |
| 145 ~TaskProxy() {} |
| 145 | 146 |
| 146 // The message handler to call callbacks on. | 147 // The message handler to call callbacks on. |
| 147 base::WeakPtr<TracingMessageHandler> handler_; | 148 base::WeakPtr<TracingMessageHandler> handler_; |
| 148 | 149 |
| 149 DISALLOW_COPY_AND_ASSIGN(TaskProxy); | 150 DISALLOW_COPY_AND_ASSIGN(TaskProxy); |
| 150 }; | 151 }; |
| 151 | 152 |
| 152 //////////////////////////////////////////////////////////////////////////////// | 153 //////////////////////////////////////////////////////////////////////////////// |
| 153 // | 154 // |
| 154 // TracingMessageHandler | 155 // TracingMessageHandler |
| (...skipping 325 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 480 // | 481 // |
| 481 //////////////////////////////////////////////////////////////////////////////// | 482 //////////////////////////////////////////////////////////////////////////////// |
| 482 | 483 |
| 483 TracingUI::TracingUI(content::WebUI* web_ui) : WebUIController(web_ui) { | 484 TracingUI::TracingUI(content::WebUI* web_ui) : WebUIController(web_ui) { |
| 484 web_ui->AddMessageHandler(new TracingMessageHandler()); | 485 web_ui->AddMessageHandler(new TracingMessageHandler()); |
| 485 | 486 |
| 486 // Set up the chrome://tracing/ source. | 487 // Set up the chrome://tracing/ source. |
| 487 Profile::FromWebUI(web_ui)-> | 488 Profile::FromWebUI(web_ui)-> |
| 488 GetChromeURLDataManager()->AddDataSource(CreateTracingHTMLSource()); | 489 GetChromeURLDataManager()->AddDataSource(CreateTracingHTMLSource()); |
| 489 } | 490 } |
| OLD | NEW |