| 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_TRACING_TRACE_MESSAGE_FILTER_H_ | 5 #ifndef CONTENT_BROWSER_TRACING_TRACE_MESSAGE_FILTER_H_ |
| 6 #define CONTENT_BROWSER_TRACING_TRACE_MESSAGE_FILTER_H_ | 6 #define CONTENT_BROWSER_TRACING_TRACE_MESSAGE_FILTER_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| 11 #include "base/debug/trace_event.h" |
| 11 #include "content/public/browser/browser_message_filter.h" | 12 #include "content/public/browser/browser_message_filter.h" |
| 12 | 13 |
| 13 namespace content { | 14 namespace content { |
| 14 | 15 |
| 15 // This class sends and receives trace messages on the browser process. | 16 // This class sends and receives trace messages on the browser process. |
| 16 // See also: trace_controller.h | 17 // See also: trace_controller.h |
| 17 // See also: child_trace_message_filter.h | 18 // See also: child_trace_message_filter.h |
| 18 class TraceMessageFilter : public BrowserMessageFilter { | 19 class TraceMessageFilter : public BrowserMessageFilter { |
| 19 public: | 20 public: |
| 20 TraceMessageFilter(); | 21 TraceMessageFilter(); |
| 21 | 22 |
| 22 // BrowserMessageFilter override. | 23 // BrowserMessageFilter override. |
| 23 virtual void OnFilterAdded(IPC::Channel* channel) OVERRIDE; | 24 virtual void OnFilterAdded(IPC::Channel* channel) OVERRIDE; |
| 24 | 25 |
| 25 // BrowserMessageFilter implementation. | 26 // BrowserMessageFilter implementation. |
| 26 virtual void OnChannelClosing() OVERRIDE; | 27 virtual void OnChannelClosing() OVERRIDE; |
| 27 virtual bool OnMessageReceived(const IPC::Message& message, | 28 virtual bool OnMessageReceived(const IPC::Message& message, |
| 28 bool* message_was_ok) OVERRIDE; | 29 bool* message_was_ok) OVERRIDE; |
| 29 | 30 |
| 30 void SendBeginTracing(const std::vector<std::string>& included_categories, | 31 void SendBeginTracing(const std::vector<std::string>& included_categories, |
| 31 const std::vector<std::string>& excluded_categories); | 32 const std::vector<std::string>& excluded_categories, |
| 33 base::debug::TraceLog::Options options); |
| 32 void SendEndTracing(); | 34 void SendEndTracing(); |
| 33 void SendGetTraceBufferPercentFull(); | 35 void SendGetTraceBufferPercentFull(); |
| 34 void SendSetWatchEvent(const std::string& category_name, | 36 void SendSetWatchEvent(const std::string& category_name, |
| 35 const std::string& event_name); | 37 const std::string& event_name); |
| 36 void SendCancelWatchEvent(); | 38 void SendCancelWatchEvent(); |
| 37 | 39 |
| 38 protected: | 40 protected: |
| 39 virtual ~TraceMessageFilter(); | 41 virtual ~TraceMessageFilter(); |
| 40 | 42 |
| 41 private: | 43 private: |
| (...skipping 11 matching lines...) Expand all Loading... |
| 53 bool is_awaiting_end_ack_; | 55 bool is_awaiting_end_ack_; |
| 54 // Awaiting ack for previously sent SendGetTraceBufferPercentFull | 56 // Awaiting ack for previously sent SendGetTraceBufferPercentFull |
| 55 bool is_awaiting_buffer_percent_full_ack_; | 57 bool is_awaiting_buffer_percent_full_ack_; |
| 56 | 58 |
| 57 DISALLOW_COPY_AND_ASSIGN(TraceMessageFilter); | 59 DISALLOW_COPY_AND_ASSIGN(TraceMessageFilter); |
| 58 }; | 60 }; |
| 59 | 61 |
| 60 } // namespace content | 62 } // namespace content |
| 61 | 63 |
| 62 #endif // CONTENT_BROWSER_TRACING_TRACE_MESSAGE_FILTER_H_ | 64 #endif // CONTENT_BROWSER_TRACING_TRACE_MESSAGE_FILTER_H_ |
| OLD | NEW |