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

Side by Side Diff: chrome/renderer/audio_message_filter.h

Issue 99213: Measure IPC latency for audio... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 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 (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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 // MessageFilter that handles audio messages and delegates them to audio 5 // MessageFilter that handles audio messages and delegates them to audio
6 // renderers. Created on render thread, AudioMessageFilter is operated on 6 // renderers. Created on render thread, AudioMessageFilter is operated on
7 // IO thread (main thread of render process), it intercepts audio messages 7 // IO thread (main thread of render process), it intercepts audio messages
8 // and process them on IO thread since these messages are time critical. 8 // and process them on IO thread since these messages are time critical.
9 9
10 #ifndef CHROME_RENDERER_AUDIO_MESSAGE_FILTER_H_ 10 #ifndef CHROME_RENDERER_AUDIO_MESSAGE_FILTER_H_
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 MessageLoop* message_loop() { return message_loop_; } 48 MessageLoop* message_loop() { return message_loop_; }
49 49
50 private: 50 private:
51 // IPC::ChannelProxy::MessageFilter override. Called on IO thread. 51 // IPC::ChannelProxy::MessageFilter override. Called on IO thread.
52 virtual bool OnMessageReceived(const IPC::Message& message); 52 virtual bool OnMessageReceived(const IPC::Message& message);
53 virtual void OnFilterAdded(IPC::Channel* channel); 53 virtual void OnFilterAdded(IPC::Channel* channel);
54 virtual void OnFilterRemoved(); 54 virtual void OnFilterRemoved();
55 virtual void OnChannelClosing(); 55 virtual void OnChannelClosing();
56 56
57 // Received when browser process wants more audio packet. 57 // Received when browser process wants more audio packet.
58 void OnRequestPacket(int stream_id); 58 void OnRequestPacket(const IPC::Message& msg, int stream_id);
59 59
60 // Received when browser process has created an audio output stream. 60 // Received when browser process has created an audio output stream.
61 void OnStreamCreated(int stream_id, base::SharedMemoryHandle handle, 61 void OnStreamCreated(int stream_id, base::SharedMemoryHandle handle,
62 int length); 62 int length);
63 63
64 // Received when internal state of browser process' audio output device has 64 // Received when internal state of browser process' audio output device has
65 // changed. 65 // changed.
66 void OnStreamStateChanged(int stream_id, AudioOutputStream::State state, 66 void OnStreamStateChanged(int stream_id, AudioOutputStream::State state,
67 int info); 67 int info);
68 68
69 // Notification of volume property of an audio output stream. 69 // Notification of volume property of an audio output stream.
70 void OnStreamVolume(int stream_id, double left, double right); 70 void OnStreamVolume(int stream_id, double left, double right);
71 71
72 // A map of stream ids to delegates. 72 // A map of stream ids to delegates.
73 IDMap<Delegate> delegates_; 73 IDMap<Delegate> delegates_;
74 74
75 IPC::Channel* channel_; 75 IPC::Channel* channel_;
76 76
77 int32 route_id_; 77 int32 route_id_;
78 78
79 MessageLoop* message_loop_; 79 MessageLoop* message_loop_;
80 80
81 DISALLOW_COPY_AND_ASSIGN(AudioMessageFilter); 81 DISALLOW_COPY_AND_ASSIGN(AudioMessageFilter);
82 }; 82 };
83 83
84 #endif // CHROME_RENDERER_AUDIO_MESSAGE_FITLER_H_ 84 #endif // CHROME_RENDERER_AUDIO_MESSAGE_FITLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698