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/profiler_ui.h" | 5 #include "chrome/browser/ui/webui/profiler_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 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
154 | 154 |
155 // Set up the chrome://profiler/ source. | 155 // Set up the chrome://profiler/ source. |
156 Profile::FromBrowserContext(contents->browser_context())-> | 156 Profile::FromBrowserContext(contents->browser_context())-> |
157 GetChromeURLDataManager()->AddDataSource(CreateProfilerHTMLSource()); | 157 GetChromeURLDataManager()->AddDataSource(CreateProfilerHTMLSource()); |
158 } | 158 } |
159 | 159 |
160 ProfilerUI::~ProfilerUI() { | 160 ProfilerUI::~ProfilerUI() { |
161 } | 161 } |
162 | 162 |
163 void ProfilerUI::GetData() { | 163 void ProfilerUI::GetData() { |
164 TrackingSynchronizer::FetchTrackingDataAsynchronously(ui_weak_ptr_); | 164 TrackingSynchronizer::FetchProfilerDataAsynchronously(ui_weak_ptr_); |
165 } | 165 } |
166 | 166 |
167 void ProfilerUI::ReceivedData(base::Value* value) { | 167 void ProfilerUI::ReceivedData(base::Value* value) { |
168 // Send the data to the renderer. | 168 // Send the data to the renderer. |
169 scoped_ptr<Value> data_values(value); | 169 scoped_ptr<Value> data_values(value); |
170 CallJavascriptFunction("g_browserBridge.receivedData", *data_values.get()); | 170 CallJavascriptFunction("g_browserBridge.receivedData", *data_values.get()); |
171 } | 171 } |
172 | 172 |
OLD | NEW |