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 "content/browser/tracing/tracing_ui.h" | 5 #include "content/browser/tracing/tracing_ui.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "base/base64.h" | 9 #include "base/base64.h" |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
11 #include "base/bind_helpers.h" | 11 #include "base/bind_helpers.h" |
12 #include "base/file_util.h" | 12 #include "base/file_util.h" |
13 #include "base/json/json_reader.h" | 13 #include "base/json/json_reader.h" |
14 #include "base/json/json_writer.h" | 14 #include "base/json/json_writer.h" |
15 #include "base/memory/scoped_ptr.h" | 15 #include "base/memory/scoped_ptr.h" |
16 #include "base/strings/string_number_conversions.h" | 16 #include "base/strings/string_number_conversions.h" |
17 #include "base/strings/string_util.h" | 17 #include "base/strings/string_util.h" |
18 #include "base/values.h" | 18 #include "base/values.h" |
| 19 #include "content/browser/tracing/grit/tracing_resources.h" |
19 #include "content/browser/tracing/tracing_controller_impl.h" | 20 #include "content/browser/tracing/tracing_controller_impl.h" |
20 #include "content/public/browser/browser_thread.h" | 21 #include "content/public/browser/browser_thread.h" |
21 #include "content/public/browser/tracing_controller.h" | 22 #include "content/public/browser/tracing_controller.h" |
22 #include "content/public/browser/web_contents.h" | 23 #include "content/public/browser/web_contents.h" |
23 #include "content/public/browser/web_ui.h" | 24 #include "content/public/browser/web_ui.h" |
24 #include "content/public/browser/web_ui_data_source.h" | 25 #include "content/public/browser/web_ui_data_source.h" |
25 #include "content/public/common/url_constants.h" | 26 #include "content/public/common/url_constants.h" |
26 #include "grit/tracing_resources.h" | |
27 | 27 |
28 namespace content { | 28 namespace content { |
29 namespace { | 29 namespace { |
30 | 30 |
31 void OnGotCategories(const WebUIDataSource::GotDataCallback& callback, | 31 void OnGotCategories(const WebUIDataSource::GotDataCallback& callback, |
32 const std::set<std::string>& categorySet) { | 32 const std::set<std::string>& categorySet) { |
33 | 33 |
34 scoped_ptr<base::ListValue> category_list(new base::ListValue()); | 34 scoped_ptr<base::ListValue> category_list(new base::ListValue()); |
35 for (std::set<std::string>::const_iterator it = categorySet.begin(); | 35 for (std::set<std::string>::const_iterator it = categorySet.begin(); |
36 it != categorySet.end(); it++) { | 36 it != categorySet.end(); it++) { |
(...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
282 TracingUI::~TracingUI() { | 282 TracingUI::~TracingUI() { |
283 TracingControllerImpl::GetInstance()->UnregisterTracingUI(this); | 283 TracingControllerImpl::GetInstance()->UnregisterTracingUI(this); |
284 } | 284 } |
285 | 285 |
286 void TracingUI::OnMonitoringStateChanged(bool is_monitoring) { | 286 void TracingUI::OnMonitoringStateChanged(bool is_monitoring) { |
287 web_ui()->CallJavascriptFunction( | 287 web_ui()->CallJavascriptFunction( |
288 "onMonitoringStateChanged", base::FundamentalValue(is_monitoring)); | 288 "onMonitoringStateChanged", base::FundamentalValue(is_monitoring)); |
289 } | 289 } |
290 | 290 |
291 } // namespace content | 291 } // namespace content |
OLD | NEW |