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

Side by Side Diff: content/browser/renderer_host/media/media_stream_dispatcher_host_unittest.cc

Issue 185863003: [Media] Add user gesture reporting for API calls to midi and media streams. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 6 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
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 <string> 5 #include <string>
6 #include <queue> 6 #include <queue>
7 7
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/callback_helpers.h" 9 #include "base/callback_helpers.h"
10 #include "base/message_loop/message_loop.h" 10 #include "base/message_loop/message_loop.h"
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 MOCK_METHOD2(OnDeviceOpened, void(int routing_id, int request_id)); 59 MOCK_METHOD2(OnDeviceOpened, void(int routing_id, int request_id));
60 60
61 // Accessor to private functions. 61 // Accessor to private functions.
62 void OnGenerateStream(int render_view_id, 62 void OnGenerateStream(int render_view_id,
63 int page_request_id, 63 int page_request_id,
64 const StreamOptions& components, 64 const StreamOptions& components,
65 const GURL& security_origin, 65 const GURL& security_origin,
66 const base::Closure& quit_closure) { 66 const base::Closure& quit_closure) {
67 quit_closures_.push(quit_closure); 67 quit_closures_.push(quit_closure);
68 MediaStreamDispatcherHost::OnGenerateStream( 68 MediaStreamDispatcherHost::OnGenerateStream(
69 render_view_id, page_request_id, components, security_origin); 69 render_view_id, page_request_id, components, security_origin, false);
70 } 70 }
71 71
72 void OnStopStreamDevice(int render_view_id, 72 void OnStopStreamDevice(int render_view_id,
73 const std::string& device_id) { 73 const std::string& device_id) {
74 MediaStreamDispatcherHost::OnStopStreamDevice(render_view_id, device_id); 74 MediaStreamDispatcherHost::OnStopStreamDevice(render_view_id, device_id);
75 } 75 }
76 76
77 void OnOpenDevice(int render_view_id, 77 void OnOpenDevice(int render_view_id,
78 int page_request_id, 78 int page_request_id,
79 const std::string& device_id, 79 const std::string& device_id,
(...skipping 744 matching lines...) Expand 10 before | Expand all | Expand 10 after
824 EnumerateDevicesAndWaitForResult(kRenderId, kPageRequestId, 824 EnumerateDevicesAndWaitForResult(kRenderId, kPageRequestId,
825 MEDIA_DEVICE_AUDIO_CAPTURE); 825 MEDIA_DEVICE_AUDIO_CAPTURE);
826 } 826 }
827 827
828 TEST_F(MediaStreamDispatcherHostTest, EnumerateVideoDevices) { 828 TEST_F(MediaStreamDispatcherHostTest, EnumerateVideoDevices) {
829 EnumerateDevicesAndWaitForResult(kRenderId, kPageRequestId, 829 EnumerateDevicesAndWaitForResult(kRenderId, kPageRequestId,
830 MEDIA_DEVICE_VIDEO_CAPTURE); 830 MEDIA_DEVICE_VIDEO_CAPTURE);
831 } 831 }
832 832
833 }; // namespace content 833 }; // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698