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

Side by Side Diff: trunk/src/content/browser/renderer_host/media/media_stream_dispatcher_host.cc

Issue 74753005: Revert 235139 "Fix cancelling of device enumeration requests." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 7 years, 1 month 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 | no next file » | 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) 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 #include "content/browser/renderer_host/media/media_stream_dispatcher_host.h" 5 #include "content/browser/renderer_host/media/media_stream_dispatcher_host.h"
6 6
7 #include "content/browser/browser_main_loop.h" 7 #include "content/browser/browser_main_loop.h"
8 #include "content/browser/renderer_host/media/web_contents_capture_util.h" 8 #include "content/browser/renderer_host/media/web_contents_capture_util.h"
9 #include "content/common/media/media_stream_messages.h" 9 #include "content/common/media/media_stream_messages.h"
10 #include "content/common/media/media_stream_options.h" 10 #include "content/common/media/media_stream_options.h"
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 const IPC::Message& message, bool* message_was_ok) { 88 const IPC::Message& message, bool* message_was_ok) {
89 bool handled = true; 89 bool handled = true;
90 IPC_BEGIN_MESSAGE_MAP_EX(MediaStreamDispatcherHost, message, *message_was_ok) 90 IPC_BEGIN_MESSAGE_MAP_EX(MediaStreamDispatcherHost, message, *message_was_ok)
91 IPC_MESSAGE_HANDLER(MediaStreamHostMsg_GenerateStream, OnGenerateStream) 91 IPC_MESSAGE_HANDLER(MediaStreamHostMsg_GenerateStream, OnGenerateStream)
92 IPC_MESSAGE_HANDLER(MediaStreamHostMsg_CancelGenerateStream, 92 IPC_MESSAGE_HANDLER(MediaStreamHostMsg_CancelGenerateStream,
93 OnCancelGenerateStream) 93 OnCancelGenerateStream)
94 IPC_MESSAGE_HANDLER(MediaStreamHostMsg_StopStreamDevice, 94 IPC_MESSAGE_HANDLER(MediaStreamHostMsg_StopStreamDevice,
95 OnStopStreamDevice) 95 OnStopStreamDevice)
96 IPC_MESSAGE_HANDLER(MediaStreamHostMsg_EnumerateDevices, 96 IPC_MESSAGE_HANDLER(MediaStreamHostMsg_EnumerateDevices,
97 OnEnumerateDevices) 97 OnEnumerateDevices)
98 IPC_MESSAGE_HANDLER(MediaStreamHostMsg_CancelEnumerateDevices,
99 OnCancelEnumerateDevices);
100 IPC_MESSAGE_HANDLER(MediaStreamHostMsg_OpenDevice, 98 IPC_MESSAGE_HANDLER(MediaStreamHostMsg_OpenDevice,
101 OnOpenDevice) 99 OnOpenDevice)
102 IPC_MESSAGE_HANDLER(MediaStreamHostMsg_CloseDevice, 100 IPC_MESSAGE_HANDLER(MediaStreamHostMsg_CloseDevice,
103 OnCloseDevice) 101 OnCloseDevice)
104 IPC_MESSAGE_UNHANDLED(handled = false) 102 IPC_MESSAGE_UNHANDLED(handled = false)
105 IPC_END_MESSAGE_MAP_EX() 103 IPC_END_MESSAGE_MAP_EX()
106 return handled; 104 return handled;
107 } 105 }
108 106
109 void MediaStreamDispatcherHost::OnChannelClosing() { 107 void MediaStreamDispatcherHost::OnChannelClosing() {
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
239 MediaStreamDispatcherHost::StreamRequest 237 MediaStreamDispatcherHost::StreamRequest
240 MediaStreamDispatcherHost::PopRequest(const std::string& label) { 238 MediaStreamDispatcherHost::PopRequest(const std::string& label) {
241 StreamMap::iterator it = streams_.find(label); 239 StreamMap::iterator it = streams_.find(label);
242 CHECK(it != streams_.end()); 240 CHECK(it != streams_.end());
243 StreamRequest request = it->second; 241 StreamRequest request = it->second;
244 streams_.erase(it); 242 streams_.erase(it);
245 return request; 243 return request;
246 } 244 }
247 245
248 } // namespace content 246 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698