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/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 14 matching lines...) Expand all Loading... |
25 #include "content/public/browser/browser_thread.h" | 25 #include "content/public/browser/browser_thread.h" |
26 #include "content/public/browser/url_data_source.h" | 26 #include "content/public/browser/url_data_source.h" |
27 #include "content/public/browser/web_contents.h" | 27 #include "content/public/browser/web_contents.h" |
28 #include "content/public/browser/web_ui.h" | 28 #include "content/public/browser/web_ui.h" |
29 #include "content/public/browser/web_ui_data_source.h" | 29 #include "content/public/browser/web_ui_data_source.h" |
30 #include "content/public/browser/web_ui_message_handler.h" | 30 #include "content/public/browser/web_ui_message_handler.h" |
31 #include "grit/browser_resources.h" | 31 #include "grit/browser_resources.h" |
32 | 32 |
33 #ifdef USE_SOURCE_FILES_DIRECTLY | 33 #ifdef USE_SOURCE_FILES_DIRECTLY |
34 #include "base/base_paths.h" | 34 #include "base/base_paths.h" |
35 #include "base/file_util.h" | 35 #include "base/files/file_util.h" |
36 #include "base/memory/ref_counted_memory.h" | 36 #include "base/memory/ref_counted_memory.h" |
37 #include "base/path_service.h" | 37 #include "base/path_service.h" |
38 #endif // USE_SOURCE_FILES_DIRECTLY | 38 #endif // USE_SOURCE_FILES_DIRECTLY |
39 | 39 |
40 using chrome_browser_metrics::TrackingSynchronizer; | 40 using chrome_browser_metrics::TrackingSynchronizer; |
41 using content::BrowserThread; | 41 using content::BrowserThread; |
42 using content::WebContents; | 42 using content::WebContents; |
43 using content::WebUIMessageHandler; | 43 using content::WebUIMessageHandler; |
44 | 44 |
45 namespace { | 45 namespace { |
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
175 int process_type) { | 175 int process_type) { |
176 // Serialize the data to JSON. | 176 // Serialize the data to JSON. |
177 base::DictionaryValue json_data; | 177 base::DictionaryValue json_data; |
178 task_profiler::TaskProfilerDataSerializer::ToValue(profiler_data, | 178 task_profiler::TaskProfilerDataSerializer::ToValue(profiler_data, |
179 process_type, | 179 process_type, |
180 &json_data); | 180 &json_data); |
181 | 181 |
182 // Send the data to the renderer. | 182 // Send the data to the renderer. |
183 web_ui()->CallJavascriptFunction("g_browserBridge.receivedData", json_data); | 183 web_ui()->CallJavascriptFunction("g_browserBridge.receivedData", json_data); |
184 } | 184 } |
OLD | NEW |