OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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 #include "content/browser/tracing/tracing_controller_impl.h" | 4 #include "content/browser/tracing/tracing_controller_impl.h" |
5 | 5 |
6 #include "base/bind.h" | 6 #include "base/bind.h" |
7 #include "base/files/file_util.h" | 7 #include "base/files/file_util.h" |
8 #include "base/json/string_escape.h" | 8 #include "base/json/string_escape.h" |
9 #include "base/macros.h" | 9 #include "base/macros.h" |
10 #include "base/strings/string_number_conversions.h" | 10 #include "base/strings/string_number_conversions.h" |
(...skipping 414 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
425 | 425 |
426 for (TraceMessageFilterSet::iterator it = trace_message_filters_.begin(); | 426 for (TraceMessageFilterSet::iterator it = trace_message_filters_.begin(); |
427 it != trace_message_filters_.end(); ++it) { | 427 it != trace_message_filters_.end(); ++it) { |
428 it->get()->SendCancelWatchEvent(); | 428 it->get()->SendCancelWatchEvent(); |
429 } | 429 } |
430 | 430 |
431 watch_event_callback_.Reset(); | 431 watch_event_callback_.Reset(); |
432 return true; | 432 return true; |
433 } | 433 } |
434 | 434 |
| 435 bool TracingControllerImpl::IsRecording() const { |
| 436 return is_recording_; |
| 437 } |
| 438 |
435 void TracingControllerImpl::AddTraceMessageFilter( | 439 void TracingControllerImpl::AddTraceMessageFilter( |
436 TraceMessageFilter* trace_message_filter) { | 440 TraceMessageFilter* trace_message_filter) { |
437 if (!BrowserThread::CurrentlyOn(BrowserThread::UI)) { | 441 if (!BrowserThread::CurrentlyOn(BrowserThread::UI)) { |
438 BrowserThread::PostTask(BrowserThread::UI, FROM_HERE, | 442 BrowserThread::PostTask(BrowserThread::UI, FROM_HERE, |
439 base::Bind(&TracingControllerImpl::AddTraceMessageFilter, | 443 base::Bind(&TracingControllerImpl::AddTraceMessageFilter, |
440 base::Unretained(this), | 444 base::Unretained(this), |
441 make_scoped_refptr(trace_message_filter))); | 445 make_scoped_refptr(trace_message_filter))); |
442 return; | 446 return; |
443 } | 447 } |
444 | 448 |
(...skipping 410 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
855 is_monitoring_ = is_monitoring; | 859 is_monitoring_ = is_monitoring; |
856 #if !defined(OS_ANDROID) | 860 #if !defined(OS_ANDROID) |
857 for (std::set<TracingUI*>::iterator it = tracing_uis_.begin(); | 861 for (std::set<TracingUI*>::iterator it = tracing_uis_.begin(); |
858 it != tracing_uis_.end(); it++) { | 862 it != tracing_uis_.end(); it++) { |
859 (*it)->OnMonitoringStateChanged(is_monitoring); | 863 (*it)->OnMonitoringStateChanged(is_monitoring); |
860 } | 864 } |
861 #endif | 865 #endif |
862 } | 866 } |
863 | 867 |
864 } // namespace content | 868 } // namespace content |
OLD | NEW |