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

Side by Side Diff: content/renderer/media/media_stream_dispatcher.h

Issue 670683003: Standardize usage of virtual/override/final in content/renderer/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 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 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_RENDERER_MEDIA_MEDIA_STREAM_DISPATCHER_H_ 5 #ifndef CONTENT_RENDERER_MEDIA_MEDIA_STREAM_DISPATCHER_H_
6 #define CONTENT_RENDERER_MEDIA_MEDIA_STREAM_DISPATCHER_H_ 6 #define CONTENT_RENDERER_MEDIA_MEDIA_STREAM_DISPATCHER_H_
7 7
8 #include <list> 8 #include <list>
9 #include <map> 9 #include <map>
10 #include <string> 10 #include <string>
(...skipping 17 matching lines...) Expand all
28 // MediaStreamDispatcher is a delegate for the Media Stream API messages. 28 // MediaStreamDispatcher is a delegate for the Media Stream API messages.
29 // MediaStreams are used by WebKit to open media devices such as Video Capture 29 // MediaStreams are used by WebKit to open media devices such as Video Capture
30 // and Audio input devices. 30 // and Audio input devices.
31 // It's the complement of MediaStreamDispatcherHost (owned by 31 // It's the complement of MediaStreamDispatcherHost (owned by
32 // BrowserRenderProcessHost). 32 // BrowserRenderProcessHost).
33 class CONTENT_EXPORT MediaStreamDispatcher 33 class CONTENT_EXPORT MediaStreamDispatcher
34 : public RenderFrameObserver, 34 : public RenderFrameObserver,
35 public base::SupportsWeakPtr<MediaStreamDispatcher> { 35 public base::SupportsWeakPtr<MediaStreamDispatcher> {
36 public: 36 public:
37 explicit MediaStreamDispatcher(RenderFrame* render_frame); 37 explicit MediaStreamDispatcher(RenderFrame* render_frame);
38 virtual ~MediaStreamDispatcher(); 38 ~MediaStreamDispatcher() override;
39 39
40 // Request a new media stream to be created. 40 // Request a new media stream to be created.
41 // This can be used either by WebKit or a plugin. 41 // This can be used either by WebKit or a plugin.
42 // Note: The event_handler must be valid for as long as the stream exists. 42 // Note: The event_handler must be valid for as long as the stream exists.
43 virtual void GenerateStream( 43 virtual void GenerateStream(
44 int request_id, 44 int request_id,
45 const base::WeakPtr<MediaStreamDispatcherEventHandler>& event_handler, 45 const base::WeakPtr<MediaStreamDispatcherEventHandler>& event_handler,
46 const StreamOptions& components, 46 const StreamOptions& components,
47 const GURL& security_origin); 47 const GURL& security_origin);
48 48
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 FRIEND_TEST_ALL_PREFIXES(MediaStreamDispatcherTest, CancelGenerateStream); 104 FRIEND_TEST_ALL_PREFIXES(MediaStreamDispatcherTest, CancelGenerateStream);
105 FRIEND_TEST_ALL_PREFIXES(MediaStreamDispatcherTest, CheckDuckingState); 105 FRIEND_TEST_ALL_PREFIXES(MediaStreamDispatcherTest, CheckDuckingState);
106 106
107 struct Request; 107 struct Request;
108 108
109 // Private class for keeping track of opened devices and who have 109 // Private class for keeping track of opened devices and who have
110 // opened it. 110 // opened it.
111 struct Stream; 111 struct Stream;
112 112
113 // RenderFrameObserver override. 113 // RenderFrameObserver override.
114 virtual void OnDestruct() override; 114 void OnDestruct() override;
115 virtual bool Send(IPC::Message* message) override; 115 bool Send(IPC::Message* message) override;
116 virtual bool OnMessageReceived(const IPC::Message& message) override; 116 bool OnMessageReceived(const IPC::Message& message) override;
117 117
118 // Messages from the browser. 118 // Messages from the browser.
119 void OnStreamGenerated( 119 void OnStreamGenerated(
120 int request_id, 120 int request_id,
121 const std::string& label, 121 const std::string& label,
122 const StreamDeviceInfoArray& audio_array, 122 const StreamDeviceInfoArray& audio_array,
123 const StreamDeviceInfoArray& video_array); 123 const StreamDeviceInfoArray& video_array);
124 void OnStreamGenerationFailed( 124 void OnStreamGenerationFailed(
125 int request_id, 125 int request_id,
126 content::MediaStreamRequestResult result); 126 content::MediaStreamRequestResult result);
(...skipping 19 matching lines...) Expand all
146 // been canceled. 146 // been canceled.
147 typedef std::list<Request> RequestList; 147 typedef std::list<Request> RequestList;
148 RequestList requests_; 148 RequestList requests_;
149 149
150 DISALLOW_COPY_AND_ASSIGN(MediaStreamDispatcher); 150 DISALLOW_COPY_AND_ASSIGN(MediaStreamDispatcher);
151 }; 151 };
152 152
153 } // namespace content 153 } // namespace content
154 154
155 #endif // CONTENT_RENDERER_MEDIA_MEDIA_STREAM_DISPATCHER_H_ 155 #endif // CONTENT_RENDERER_MEDIA_MEDIA_STREAM_DISPATCHER_H_
OLDNEW
« no previous file with comments | « content/renderer/media/media_stream_audio_source.h ('k') | content/renderer/media/media_stream_dispatcher_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698