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 CONTENT_BROWSER_TRACE_MESSAGE_FILTER_H_ | 5 #ifndef CONTENT_BROWSER_TRACE_MESSAGE_FILTER_H_ |
6 #define CONTENT_BROWSER_TRACE_MESSAGE_FILTER_H_ | 6 #define CONTENT_BROWSER_TRACE_MESSAGE_FILTER_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 11 matching lines...) Expand all Loading... |
22 | 22 |
23 // content::BrowserMessageFilter implementation. | 23 // content::BrowserMessageFilter implementation. |
24 virtual void OnChannelClosing() OVERRIDE; | 24 virtual void OnChannelClosing() OVERRIDE; |
25 virtual bool OnMessageReceived(const IPC::Message& message, | 25 virtual bool OnMessageReceived(const IPC::Message& message, |
26 bool* message_was_ok) OVERRIDE; | 26 bool* message_was_ok) OVERRIDE; |
27 | 27 |
28 void SendBeginTracing(const std::vector<std::string>& included_categories, | 28 void SendBeginTracing(const std::vector<std::string>& included_categories, |
29 const std::vector<std::string>& excluded_categories); | 29 const std::vector<std::string>& excluded_categories); |
30 void SendEndTracing(); | 30 void SendEndTracing(); |
31 void SendGetTraceBufferPercentFull(); | 31 void SendGetTraceBufferPercentFull(); |
| 32 void SendSetWatchEvent(const std::string& category_name, |
| 33 const std::string& event_name); |
| 34 void SendCancelWatchEvent(); |
32 | 35 |
33 protected: | 36 protected: |
34 virtual ~TraceMessageFilter(); | 37 virtual ~TraceMessageFilter(); |
35 | 38 |
36 private: | 39 private: |
37 // Message handlers. | 40 // Message handlers. |
38 void OnChildSupportsTracing(); | 41 void OnChildSupportsTracing(); |
39 void OnEndTracingAck(const std::vector<std::string>& known_categories); | 42 void OnEndTracingAck(const std::vector<std::string>& known_categories); |
40 void OnTraceBufferFull(); | 43 void OnTraceNotification(int notification); |
41 void OnTraceBufferPercentFullReply(float percent_full); | 44 void OnTraceBufferPercentFullReply(float percent_full); |
42 void OnTraceDataCollected(const std::string& data); | 45 void OnTraceDataCollected(const std::string& data); |
43 | 46 |
44 // ChildTraceMessageFilter exists: | 47 // ChildTraceMessageFilter exists: |
45 bool has_child_; | 48 bool has_child_; |
46 | 49 |
47 // Awaiting ack for previously sent SendEndTracing | 50 // Awaiting ack for previously sent SendEndTracing |
48 bool is_awaiting_end_ack_; | 51 bool is_awaiting_end_ack_; |
49 // Awaiting ack for previously sent SendGetTraceBufferPercentFull | 52 // Awaiting ack for previously sent SendGetTraceBufferPercentFull |
50 bool is_awaiting_buffer_percent_full_ack_; | 53 bool is_awaiting_buffer_percent_full_ack_; |
51 | 54 |
52 DISALLOW_COPY_AND_ASSIGN(TraceMessageFilter); | 55 DISALLOW_COPY_AND_ASSIGN(TraceMessageFilter); |
53 }; | 56 }; |
54 | 57 |
55 #endif // CONTENT_BROWSER_TRACE_MESSAGE_FILTER_H_ | 58 #endif // CONTENT_BROWSER_TRACE_MESSAGE_FILTER_H_ |
56 | 59 |
OLD | NEW |