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 "ipc/message_filter.h" | 10 #include "ipc/message_filter.h" |
(...skipping 14 matching lines...) Expand all Loading... |
25 virtual void OnFilterRemoved() OVERRIDE; | 25 virtual void OnFilterRemoved() OVERRIDE; |
26 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; | 26 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; |
27 | 27 |
28 protected: | 28 protected: |
29 virtual ~ChildTraceMessageFilter(); | 29 virtual ~ChildTraceMessageFilter(); |
30 | 30 |
31 private: | 31 private: |
32 // Message handlers. | 32 // Message handlers. |
33 void OnBeginTracing(const std::string& category_filter_str, | 33 void OnBeginTracing(const std::string& category_filter_str, |
34 base::TimeTicks browser_time, | 34 base::TimeTicks browser_time, |
35 int options); | 35 const std::string& options); |
36 void OnEndTracing(); | 36 void OnEndTracing(); |
37 void OnEnableMonitoring(const std::string& category_filter_str, | 37 void OnEnableMonitoring(const std::string& category_filter_str, |
38 base::TimeTicks browser_time, | 38 base::TimeTicks browser_time, |
39 int options); | 39 const std::string& options); |
40 void OnDisableMonitoring(); | 40 void OnDisableMonitoring(); |
41 void OnCaptureMonitoringSnapshot(); | 41 void OnCaptureMonitoringSnapshot(); |
42 void OnGetTraceBufferPercentFull(); | 42 void OnGetTraceBufferPercentFull(); |
43 void OnSetWatchEvent(const std::string& category_name, | 43 void OnSetWatchEvent(const std::string& category_name, |
44 const std::string& event_name); | 44 const std::string& event_name); |
45 void OnCancelWatchEvent(); | 45 void OnCancelWatchEvent(); |
46 void OnWatchEventMatched(); | 46 void OnWatchEventMatched(); |
47 | 47 |
48 // Callback from trace subsystem. | 48 // Callback from trace subsystem. |
49 void OnTraceDataCollected( | 49 void OnTraceDataCollected( |
50 const scoped_refptr<base::RefCountedString>& events_str_ptr, | 50 const scoped_refptr<base::RefCountedString>& events_str_ptr, |
51 bool has_more_events); | 51 bool has_more_events); |
52 | 52 |
53 void OnMonitoringTraceDataCollected( | 53 void OnMonitoringTraceDataCollected( |
54 const scoped_refptr<base::RefCountedString>& events_str_ptr, | 54 const scoped_refptr<base::RefCountedString>& events_str_ptr, |
55 bool has_more_events); | 55 bool has_more_events); |
56 | 56 |
57 IPC::Sender* sender_; | 57 IPC::Sender* sender_; |
58 base::MessageLoopProxy* ipc_message_loop_; | 58 base::MessageLoopProxy* ipc_message_loop_; |
59 | 59 |
60 DISALLOW_COPY_AND_ASSIGN(ChildTraceMessageFilter); | 60 DISALLOW_COPY_AND_ASSIGN(ChildTraceMessageFilter); |
61 }; | 61 }; |
62 | 62 |
63 } // namespace tracing | 63 } // namespace tracing |
64 | 64 |
65 #endif // COMPONENTS_TRACING_CHILD_TRACE_MESSAGE_FILTER_H_ | 65 #endif // COMPONENTS_TRACING_CHILD_TRACE_MESSAGE_FILTER_H_ |
OLD | NEW |