Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(183)

Side by Side Diff: content/browser/trace_message_filter.h

Issue 12149003: Move tracing code in content\browser to content\browser\tracing now that there's a separate directo… (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: fix android and sync Created 7 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « content/browser/trace_controller_impl.cc ('k') | content/browser/trace_message_filter.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef CONTENT_BROWSER_TRACE_MESSAGE_FILTER_H_
6 #define CONTENT_BROWSER_TRACE_MESSAGE_FILTER_H_
7
8 #include <string>
9 #include <vector>
10
11 #include "content/public/browser/browser_message_filter.h"
12
13 namespace content {
14
15 // This class sends and receives trace messages on the browser process.
16 // See also: trace_controller.h
17 // See also: child_trace_message_filter.h
18 class TraceMessageFilter : public BrowserMessageFilter {
19 public:
20 TraceMessageFilter();
21
22 // BrowserMessageFilter override.
23 virtual void OnFilterAdded(IPC::Channel* channel) OVERRIDE;
24
25 // BrowserMessageFilter implementation.
26 virtual void OnChannelClosing() OVERRIDE;
27 virtual bool OnMessageReceived(const IPC::Message& message,
28 bool* message_was_ok) OVERRIDE;
29
30 void SendBeginTracing(const std::vector<std::string>& included_categories,
31 const std::vector<std::string>& excluded_categories);
32 void SendEndTracing();
33 void SendGetTraceBufferPercentFull();
34 void SendSetWatchEvent(const std::string& category_name,
35 const std::string& event_name);
36 void SendCancelWatchEvent();
37
38 protected:
39 virtual ~TraceMessageFilter();
40
41 private:
42 // Message handlers.
43 void OnChildSupportsTracing();
44 void OnEndTracingAck(const std::vector<std::string>& known_categories);
45 void OnTraceNotification(int notification);
46 void OnTraceBufferPercentFullReply(float percent_full);
47 void OnTraceDataCollected(const std::string& data);
48
49 // ChildTraceMessageFilter exists:
50 bool has_child_;
51
52 // Awaiting ack for previously sent SendEndTracing
53 bool is_awaiting_end_ack_;
54 // Awaiting ack for previously sent SendGetTraceBufferPercentFull
55 bool is_awaiting_buffer_percent_full_ack_;
56
57 DISALLOW_COPY_AND_ASSIGN(TraceMessageFilter);
58 };
59
60 } // namespace content
61
62 #endif // CONTENT_BROWSER_TRACE_MESSAGE_FILTER_H_
OLDNEW
« no previous file with comments | « content/browser/trace_controller_impl.cc ('k') | content/browser/trace_message_filter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698