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

Side by Side Diff: chrome/common/render_messages.h

Issue 6717001: Move audio messages to their own file. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 9 years, 9 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 | « no previous file | chrome/common/render_messages.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 // Multiply-included file, no traditional include guard. 5 // Multiply-included file, no traditional include guard.
6 #include <map> 6 #include <map>
7 #include <set> 7 #include <set>
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 28 matching lines...) Expand all
39 #include "chrome/common/window_container_type.h" 39 #include "chrome/common/window_container_type.h"
40 #include "content/common/common_param_traits.h" 40 #include "content/common/common_param_traits.h"
41 #include "content/common/notification_type.h" 41 #include "content/common/notification_type.h"
42 #include "content/common/page_transition_types.h" 42 #include "content/common/page_transition_types.h"
43 #include "content/common/page_zoom.h" 43 #include "content/common/page_zoom.h"
44 #include "content/common/resource_response.h" 44 #include "content/common/resource_response.h"
45 #include "ipc/ipc_channel_handle.h" 45 #include "ipc/ipc_channel_handle.h"
46 #include "ipc/ipc_message_macros.h" 46 #include "ipc/ipc_message_macros.h"
47 #include "ipc/ipc_message_utils.h" 47 #include "ipc/ipc_message_utils.h"
48 #include "ipc/ipc_platform_file.h" // ifdefed typedef. 48 #include "ipc/ipc_platform_file.h" // ifdefed typedef.
49 #include "media/audio/audio_buffers_state.h"
50 #include "third_party/WebKit/Source/WebKit/chromium/public/WebCompositionUnderli ne.h" 49 #include "third_party/WebKit/Source/WebKit/chromium/public/WebCompositionUnderli ne.h"
51 #include "third_party/WebKit/Source/WebKit/chromium/public/WebFindOptions.h" 50 #include "third_party/WebKit/Source/WebKit/chromium/public/WebFindOptions.h"
52 #include "third_party/WebKit/Source/WebKit/chromium/public/WebMediaPlayerAction. h" 51 #include "third_party/WebKit/Source/WebKit/chromium/public/WebMediaPlayerAction. h"
53 #include "third_party/WebKit/Source/WebKit/chromium/public/WebScreenInfo.h" 52 #include "third_party/WebKit/Source/WebKit/chromium/public/WebScreenInfo.h"
54 #include "third_party/skia/include/core/SkBitmap.h" 53 #include "third_party/skia/include/core/SkBitmap.h"
55 #include "ui/gfx/rect.h" 54 #include "ui/gfx/rect.h"
56 #include "webkit/glue/context_menu.h" 55 #include "webkit/glue/context_menu.h"
57 #include "webkit/glue/webaccessibility.h" 56 #include "webkit/glue/webaccessibility.h"
58 #include "webkit/glue/webcookie.h" 57 #include "webkit/glue/webcookie.h"
59 #include "webkit/glue/webcursor.h" 58 #include "webkit/glue/webcursor.h"
(...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after
283 }; 282 };
284 283
285 template <> 284 template <>
286 struct ParamTraits<webkit_glue::WebAccessibility> { 285 struct ParamTraits<webkit_glue::WebAccessibility> {
287 typedef webkit_glue::WebAccessibility param_type; 286 typedef webkit_glue::WebAccessibility param_type;
288 static void Write(Message* m, const param_type& p); 287 static void Write(Message* m, const param_type& p);
289 static bool Read(const Message* m, void** iter, param_type* p); 288 static bool Read(const Message* m, void** iter, param_type* p);
290 static void Log(const param_type& p, std::string* l); 289 static void Log(const param_type& p, std::string* l);
291 }; 290 };
292 291
293 // Traits for AudioBuffersState structure.
294 template <>
295 struct ParamTraits<AudioBuffersState> {
296 typedef AudioBuffersState param_type;
297 static void Write(Message* m, const param_type& p);
298 static bool Read(const Message* m, void** iter, param_type* p);
299 static void Log(const param_type& p, std::string* l);
300 };
301
302 } // namespace IPC 292 } // namespace IPC
303 293
304 #endif // CHROME_COMMON_RENDER_MESSAGES_H_ 294 #endif // CHROME_COMMON_RENDER_MESSAGES_H_
305 295
306 #define IPC_MESSAGE_START ViewMsgStart 296 #define IPC_MESSAGE_START ViewMsgStart
307 297
308 //----------------------------------------------------------------------------- 298 //-----------------------------------------------------------------------------
309 // RenderView messages 299 // RenderView messages
310 // These are messages sent from the browser to the renderer process. 300 // These are messages sent from the browser to the renderer process.
311 301
(...skipping 527 matching lines...) Expand 10 before | Expand all | Expand 10 after
839 // a generated by a user action or because a constrained popup got turned 829 // a generated by a user action or because a constrained popup got turned
840 // into a full window). 830 // into a full window).
841 IPC_MESSAGE_ROUTED0(ViewMsg_DisassociateFromPopupCount) 831 IPC_MESSAGE_ROUTED0(ViewMsg_DisassociateFromPopupCount)
842 832
843 // Sent by the Browser process to alert a window about whether a it should 833 // Sent by the Browser process to alert a window about whether a it should
844 // allow a scripted window.close(). The renderer assumes every new window is a 834 // allow a scripted window.close(). The renderer assumes every new window is a
845 // blocked popup until notified otherwise. 835 // blocked popup until notified otherwise.
846 IPC_MESSAGE_ROUTED1(ViewMsg_AllowScriptToClose, 836 IPC_MESSAGE_ROUTED1(ViewMsg_AllowScriptToClose,
847 bool /* script_can_close */) 837 bool /* script_can_close */)
848 838
849 // Sent by AudioRendererHost to renderer to request an audio packet.
850 IPC_MESSAGE_ROUTED2(ViewMsg_RequestAudioPacket,
851 int /* stream id */,
852 AudioBuffersState)
853
854 // Tell the renderer process that the audio stream has been created, renderer
855 // process would be given a ShareMemoryHandle that it should write to from
856 // then on.
857 IPC_MESSAGE_ROUTED3(ViewMsg_NotifyAudioStreamCreated,
858 int /* stream id */,
859 base::SharedMemoryHandle /* handle */,
860 uint32 /* length */)
861
862 // Tell the renderer process that a low latency audio stream has been created,
863 // renderer process would be given a SyncSocket that it should write to from
864 // then on.
865 #if defined(OS_WIN)
866 IPC_MESSAGE_ROUTED4(ViewMsg_NotifyLowLatencyAudioStreamCreated,
867 int /* stream id */,
868 base::SharedMemoryHandle /* handle */,
869 base::SyncSocket::Handle /* socket handle */,
870 uint32 /* length */)
871 #else
872 IPC_MESSAGE_ROUTED4(ViewMsg_NotifyLowLatencyAudioStreamCreated,
873 int /* stream id */,
874 base::SharedMemoryHandle /* handle */,
875 base::FileDescriptor /* socket handle */,
876 uint32 /* length */)
877 #endif
878
879 // Notification message sent from AudioRendererHost to renderer for state
880 // update after the renderer has requested a Create/Start/Close.
881 IPC_MESSAGE_ROUTED2(ViewMsg_NotifyAudioStreamStateChanged,
882 int /* stream id */,
883 ViewMsg_AudioStreamState_Params /* new state */)
884
885 IPC_MESSAGE_ROUTED2(ViewMsg_NotifyAudioStreamVolume,
886 int /* stream id */,
887 double /* volume */)
888
889 // Notification that a move or resize renderer's containing window has 839 // Notification that a move or resize renderer's containing window has
890 // started. 840 // started.
891 IPC_MESSAGE_ROUTED0(ViewMsg_MoveOrResizeStarted) 841 IPC_MESSAGE_ROUTED0(ViewMsg_MoveOrResizeStarted)
892 842
893 // The browser sends this message in response to all extension api calls. 843 // The browser sends this message in response to all extension api calls.
894 IPC_MESSAGE_ROUTED4(ViewMsg_ExtensionResponse, 844 IPC_MESSAGE_ROUTED4(ViewMsg_ExtensionResponse,
895 int /* request_id */, 845 int /* request_id */,
896 bool /* success */, 846 bool /* success */,
897 std::string /* response */, 847 std::string /* response */,
898 std::string /* error */) 848 std::string /* error */)
(...skipping 992 matching lines...) Expand 10 before | Expand all | Expand 10 after
1891 IPC_MESSAGE_CONTROL1(ViewHostMsg_SuddenTerminationChanged, 1841 IPC_MESSAGE_CONTROL1(ViewHostMsg_SuddenTerminationChanged,
1892 bool /* enabled */) 1842 bool /* enabled */)
1893 1843
1894 // Returns the window location of the window this widget is embeded. 1844 // Returns the window location of the window this widget is embeded.
1895 // TODO(shess): Provide a mapping from reply_msg->routing_id() to 1845 // TODO(shess): Provide a mapping from reply_msg->routing_id() to
1896 // HWND so that we can eliminate the NativeViewId parameter. 1846 // HWND so that we can eliminate the NativeViewId parameter.
1897 IPC_SYNC_MESSAGE_ROUTED1_1(ViewHostMsg_GetRootWindowRect, 1847 IPC_SYNC_MESSAGE_ROUTED1_1(ViewHostMsg_GetRootWindowRect,
1898 gfx::NativeViewId /* window */, 1848 gfx::NativeViewId /* window */,
1899 gfx::Rect /* Out: Window location */) 1849 gfx::Rect /* Out: Window location */)
1900 1850
1901 // Request that got sent to browser for creating an audio output stream
1902 IPC_MESSAGE_ROUTED3(ViewHostMsg_CreateAudioStream,
1903 int /* stream_id */,
1904 ViewHostMsg_Audio_CreateStream_Params,
1905 bool /* low-latency */)
1906
1907 // Tell the browser the audio buffer prepared for stream
1908 // (render_view_id, stream_id) is filled and is ready to be consumed.
1909 IPC_MESSAGE_ROUTED2(ViewHostMsg_NotifyAudioPacketReady,
1910 int /* stream_id */,
1911 uint32 /* packet size */)
1912
1913 // Start buffering and play the audio stream specified by
1914 // (render_view_id, stream_id).
1915 IPC_MESSAGE_ROUTED1(ViewHostMsg_PlayAudioStream,
1916 int /* stream_id */)
1917
1918 // Pause the audio stream specified by (render_view_id, stream_id).
1919 IPC_MESSAGE_ROUTED1(ViewHostMsg_PauseAudioStream,
1920 int /* stream_id */)
1921
1922 // Discard all buffered audio data for the specified audio stream.
1923 IPC_MESSAGE_ROUTED1(ViewHostMsg_FlushAudioStream,
1924 int /* stream_id */)
1925
1926 // Close an audio stream specified by (render_view_id, stream_id).
1927 IPC_MESSAGE_ROUTED1(ViewHostMsg_CloseAudioStream,
1928 int /* stream_id */)
1929
1930 // Get audio volume of the stream specified by (render_view_id, stream_id).
1931 IPC_MESSAGE_ROUTED1(ViewHostMsg_GetAudioVolume,
1932 int /* stream_id */)
1933
1934 // Set audio volume of the stream specified by (render_view_id, stream_id).
1935 // TODO(hclam): change this to vector if we have channel numbers other than 2.
1936 IPC_MESSAGE_ROUTED2(ViewHostMsg_SetAudioVolume,
1937 int /* stream_id */,
1938 double /* volume */)
1939
1940 // A renderer sends this message when an extension process starts an API 1851 // A renderer sends this message when an extension process starts an API
1941 // request. The browser will always respond with a ViewMsg_ExtensionResponse. 1852 // request. The browser will always respond with a ViewMsg_ExtensionResponse.
1942 IPC_MESSAGE_ROUTED1(ViewHostMsg_ExtensionRequest, 1853 IPC_MESSAGE_ROUTED1(ViewHostMsg_ExtensionRequest,
1943 ViewHostMsg_DomMessage_Params) 1854 ViewHostMsg_DomMessage_Params)
1944 1855
1945 // Notify the browser that the given extension added a listener to an event. 1856 // Notify the browser that the given extension added a listener to an event.
1946 IPC_MESSAGE_CONTROL2(ViewHostMsg_ExtensionAddListener, 1857 IPC_MESSAGE_CONTROL2(ViewHostMsg_ExtensionAddListener,
1947 std::string /* extension_id */, 1858 std::string /* extension_id */,
1948 std::string /* name */) 1859 std::string /* name */)
1949 1860
(...skipping 305 matching lines...) Expand 10 before | Expand all | Expand 10 after
2255 IPC_MESSAGE_ROUTED2(ViewMsg_JavaScriptStressTestControl, 2166 IPC_MESSAGE_ROUTED2(ViewMsg_JavaScriptStressTestControl,
2256 int /* cmd */, 2167 int /* cmd */,
2257 int /* param */) 2168 int /* param */)
2258 2169
2259 // Register a new handler for URL requests with the given scheme. 2170 // Register a new handler for URL requests with the given scheme.
2260 IPC_MESSAGE_ROUTED3(ViewHostMsg_RegisterProtocolHandler, 2171 IPC_MESSAGE_ROUTED3(ViewHostMsg_RegisterProtocolHandler,
2261 std::string /* scheme */, 2172 std::string /* scheme */,
2262 GURL /* url */, 2173 GURL /* url */,
2263 string16 /* title */) 2174 string16 /* title */)
2264 2175
OLDNEW
« no previous file with comments | « no previous file | chrome/common/render_messages.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698