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

Side by Side Diff: content/browser/renderer_host/media/media_stream_track_metrics_host.h

Issue 292443004: Remove IPC_BEGIN_MESSAGE_MAP_EX macro since r270839 made all bad IPCs kill their child processes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 6 years, 7 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_RENDERER_HOST_MEDIA_MEDIA_STREAM_TRACK_METRICS_HOST_H_ 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_MEDIA_MEDIA_STREAM_TRACK_METRICS_HOST_H_
6 #define CONTENT_BROWSER_RENDERER_HOST_MEDIA_MEDIA_STREAM_TRACK_METRICS_HOST_H_ 6 #define CONTENT_BROWSER_RENDERER_HOST_MEDIA_MEDIA_STREAM_TRACK_METRICS_HOST_H_
7 7
8 #include <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 10
(...skipping 16 matching lines...) Expand all
27 // removed. 27 // removed.
28 class MediaStreamTrackMetricsHost 28 class MediaStreamTrackMetricsHost
29 : public BrowserMessageFilter { 29 : public BrowserMessageFilter {
30 public: 30 public:
31 explicit MediaStreamTrackMetricsHost(); 31 explicit MediaStreamTrackMetricsHost();
32 32
33 protected: 33 protected:
34 virtual ~MediaStreamTrackMetricsHost(); 34 virtual ~MediaStreamTrackMetricsHost();
35 35
36 // BrowserMessageFilter override. 36 // BrowserMessageFilter override.
37 virtual bool OnMessageReceived(const IPC::Message& message, 37 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE;
38 bool* message_was_ok) OVERRIDE;
39 38
40 private: 39 private:
41 void OnAddTrack(uint64 id, bool is_audio, bool is_remote); 40 void OnAddTrack(uint64 id, bool is_audio, bool is_remote);
42 void OnRemoveTrack(uint64 id); 41 void OnRemoveTrack(uint64 id);
43 42
44 // Information for a track we're keeping in |tracks_|. |is_audio| 43 // Information for a track we're keeping in |tracks_|. |is_audio|
45 // specifies whether it's an audio or video track, |is_remote| 44 // specifies whether it's an audio or video track, |is_remote|
46 // specifies whether it's remote (received over a PeerConnection) or 45 // specifies whether it's remote (received over a PeerConnection) or
47 // local (sent over a PeerConnection). |timestamp| specifies when 46 // local (sent over a PeerConnection). |timestamp| specifies when
48 // the track was connected. 47 // the track was connected.
49 struct TrackInfo { 48 struct TrackInfo {
50 bool is_audio; 49 bool is_audio;
51 bool is_remote; 50 bool is_remote;
52 base::TimeTicks timestamp; 51 base::TimeTicks timestamp;
53 }; 52 };
54 53
55 void ReportDuration(const TrackInfo& info); 54 void ReportDuration(const TrackInfo& info);
56 55
57 // Values are unique (per renderer) track IDs. 56 // Values are unique (per renderer) track IDs.
58 typedef std::map<uint64, TrackInfo> TrackMap; 57 typedef std::map<uint64, TrackInfo> TrackMap;
59 TrackMap tracks_; 58 TrackMap tracks_;
60 }; 59 };
61 60
62 } // namespace content 61 } // namespace content
63 62
64 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_MEDIA_STREAM_TRACK_METRICS_HOST_H _ 63 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_MEDIA_STREAM_TRACK_METRICS_HOST_H _
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698