| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/tracking_ui.h" | 5 #include "chrome/browser/ui/webui/tracking_ui.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 // When testing the javacript code, it is cumbersome to have to keep | 9 // When testing the javacript code, it is cumbersome to have to keep |
| 10 // re-building the resouces package and reloading the browser. To solve | 10 // re-building the resouces package and reloading the browser. To solve |
| (...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 156 | 156 |
| 157 // Set up the chrome://tracking2/ source. | 157 // Set up the chrome://tracking2/ source. |
| 158 Profile::FromBrowserContext(contents->browser_context())-> | 158 Profile::FromBrowserContext(contents->browser_context())-> |
| 159 GetChromeURLDataManager()->AddDataSource(CreateTrackingHTMLSource()); | 159 GetChromeURLDataManager()->AddDataSource(CreateTrackingHTMLSource()); |
| 160 } | 160 } |
| 161 | 161 |
| 162 TrackingUI::~TrackingUI() { | 162 TrackingUI::~TrackingUI() { |
| 163 } | 163 } |
| 164 | 164 |
| 165 void TrackingUI::GetData() { | 165 void TrackingUI::GetData() { |
| 166 TrackingSynchronizer::FetchTrackingDataAsynchronously(ui_weak_ptr_); | 166 TrackingSynchronizer::FetchProfilerDataAsynchronously(ui_weak_ptr_); |
| 167 } | 167 } |
| 168 | 168 |
| 169 void TrackingUI::ReceivedData(base::Value* value) { | 169 void TrackingUI::ReceivedData(base::Value* value) { |
| 170 // Send the data to the renderer. | 170 // Send the data to the renderer. |
| 171 scoped_ptr<Value> data_values(value); | 171 scoped_ptr<Value> data_values(value); |
| 172 CallJavascriptFunction("g_browserBridge.receivedData", *data_values.get()); | 172 CallJavascriptFunction("g_browserBridge.receivedData", *data_values.get()); |
| 173 } | 173 } |
| 174 | 174 |
| OLD | NEW |