Use PlaybackToMemory for BitmapRasterWorkerPool playback
[chromium-blink-merge.git] / content / browser / profiler_message_filter.h
blobdf4ce53e0617f3758c76ffad2bd42f0f05f4dd85
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.
5 #ifndef CONTENT_BROWSER_PROFILER_MESSAGE_FILTER_H_
6 #define CONTENT_BROWSER_PROFILER_MESSAGE_FILTER_H_
8 #include <string>
10 #include "content/public/browser/browser_message_filter.h"
12 namespace tracked_objects {
13 struct ProcessDataSnapshot;
16 namespace content {
18 // This class sends and receives profiler messages in the browser process.
19 class ProfilerMessageFilter : public BrowserMessageFilter {
20 public:
21 explicit ProfilerMessageFilter(int process_type);
23 // BrowserMessageFilter implementation.
24 void OnChannelConnected(int32 peer_pid) override;
26 // BrowserMessageFilter implementation.
27 bool OnMessageReceived(const IPC::Message& message) override;
29 protected:
30 ~ProfilerMessageFilter() override;
32 private:
33 // Message handlers.
34 void OnChildProfilerData(
35 int sequence_number,
36 const tracked_objects::ProcessDataSnapshot& profiler_data);
38 #if defined(USE_TCMALLOC)
39 void OnTcmallocStats(const std::string& output);
40 #endif
42 int process_type_;
44 DISALLOW_COPY_AND_ASSIGN(ProfilerMessageFilter);
47 } // namespace content
49 #endif // CONTENT_BROWSER_PROFILER_MESSAGE_FILTER_H_