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 #ifndef COMPONENTS_TRACING_CHILD_TRACE_MESSAGE_FILTER_H_ | 5 #ifndef COMPONENTS_TRACING_CHILD_TRACE_MESSAGE_FILTER_H_ |
6 #define COMPONENTS_TRACING_CHILD_TRACE_MESSAGE_FILTER_H_ | 6 #define COMPONENTS_TRACING_CHILD_TRACE_MESSAGE_FILTER_H_ |
7 | 7 |
8 #include "base/bind.h" | 8 #include "base/bind.h" |
9 #include "base/memory/ref_counted_memory.h" | 9 #include "base/memory/ref_counted_memory.h" |
10 #include "base/metrics/histogram.h" | 10 #include "base/metrics/histogram.h" |
11 #include "base/time/time.h" | 11 #include "base/time/time.h" |
12 #include "base/trace_event/memory_dump_request_args.h" | 12 #include "base/trace_event/memory_dump_request_args.h" |
| 13 #include "components/tracing/child_memory_dump_manager_delegate_impl.h" |
13 #include "components/tracing/tracing_export.h" | 14 #include "components/tracing/tracing_export.h" |
| 15 #include "ipc/ipc_platform_file.h" |
14 #include "ipc/message_filter.h" | 16 #include "ipc/message_filter.h" |
15 | 17 |
16 namespace base { | 18 namespace base { |
17 class SingleThreadTaskRunner; | 19 class SingleThreadTaskRunner; |
18 } | 20 } |
19 | 21 |
20 namespace tracing { | 22 namespace tracing { |
21 | 23 |
22 // This class sends and receives trace messages on child processes. | 24 // This class sends and receives trace messages on child processes. |
23 class TRACING_EXPORT ChildTraceMessageFilter : public IPC::MessageFilter { | 25 class TRACING_EXPORT ChildTraceMessageFilter : public IPC::MessageFilter { |
(...skipping 14 matching lines...) Expand all Loading... |
38 return ipc_task_runner_; | 40 return ipc_task_runner_; |
39 } | 41 } |
40 | 42 |
41 protected: | 43 protected: |
42 ~ChildTraceMessageFilter() override; | 44 ~ChildTraceMessageFilter() override; |
43 | 45 |
44 private: | 46 private: |
45 // Message handlers. | 47 // Message handlers. |
46 void OnBeginTracing(const std::string& trace_config_str, | 48 void OnBeginTracing(const std::string& trace_config_str, |
47 base::TraceTicks browser_time, | 49 base::TraceTicks browser_time, |
48 uint64 tracing_process_id); | 50 TracingMsg_MemoryTracingInfo memory_tracing_info); |
49 void OnEndTracing(); | 51 void OnEndTracing(); |
50 void OnCancelTracing(); | 52 void OnCancelTracing(); |
51 void OnEnableMonitoring(const std::string& trace_config_str, | 53 void OnEnableMonitoring(const std::string& trace_config_str, |
52 base::TraceTicks browser_time); | 54 base::TraceTicks browser_time); |
53 void OnDisableMonitoring(); | 55 void OnDisableMonitoring(); |
54 void OnCaptureMonitoringSnapshot(); | 56 void OnCaptureMonitoringSnapshot(); |
55 void OnGetTraceLogStatus(); | 57 void OnGetTraceLogStatus(); |
56 void OnSetWatchEvent(const std::string& category_name, | 58 void OnSetWatchEvent(const std::string& category_name, |
57 const std::string& event_name); | 59 const std::string& event_name); |
58 void OnCancelWatchEvent(); | 60 void OnCancelWatchEvent(); |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
92 base::trace_event::MemoryDumpCallback pending_memory_dump_callback_; | 94 base::trace_event::MemoryDumpCallback pending_memory_dump_callback_; |
93 | 95 |
94 base::Time histogram_last_changed_; | 96 base::Time histogram_last_changed_; |
95 | 97 |
96 DISALLOW_COPY_AND_ASSIGN(ChildTraceMessageFilter); | 98 DISALLOW_COPY_AND_ASSIGN(ChildTraceMessageFilter); |
97 }; | 99 }; |
98 | 100 |
99 } // namespace tracing | 101 } // namespace tracing |
100 | 102 |
101 #endif // COMPONENTS_TRACING_CHILD_TRACE_MESSAGE_FILTER_H_ | 103 #endif // COMPONENTS_TRACING_CHILD_TRACE_MESSAGE_FILTER_H_ |
OLD | NEW |