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

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: Fix test merge Created 6 years, 8 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 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 MOCK_METHOD2(OnDeviceOpened, void(int routing_id, int request_id)); 61 MOCK_METHOD2(OnDeviceOpened, void(int routing_id, int request_id));
62 62
63 // Accessor to private functions. 63 // Accessor to private functions.
64 void OnGenerateStream(int render_view_id, 64 void OnGenerateStream(int render_view_id,
65 int page_request_id, 65 int page_request_id,
66 const StreamOptions& components, 66 const StreamOptions& components,
67 const GURL& security_origin, 67 const GURL& security_origin,
68 const base::Closure& quit_closure) { 68 const base::Closure& quit_closure) {
69 quit_closures_.push(quit_closure); 69 quit_closures_.push(quit_closure);
70 MediaStreamDispatcherHost::OnGenerateStream( 70 MediaStreamDispatcherHost::OnGenerateStream(
71 render_view_id, page_request_id, components, security_origin); 71 render_view_id, page_request_id, components, security_origin, false);
72 } 72 }
73 73
74 void OnStopStreamDevice(int render_view_id, 74 void OnStopStreamDevice(int render_view_id,
75 const std::string& device_id) { 75 const std::string& device_id) {
76 MediaStreamDispatcherHost::OnStopStreamDevice(render_view_id, device_id); 76 MediaStreamDispatcherHost::OnStopStreamDevice(render_view_id, device_id);
77 } 77 }
78 78
79 void OnOpenDevice(int render_view_id, 79 void OnOpenDevice(int render_view_id,
80 int page_request_id, 80 int page_request_id,
81 const std::string& device_id, 81 const std::string& device_id,
(...skipping 766 matching lines...) Expand 10 before | Expand all | Expand 10 after
848 EnumerateDevicesAndWaitForResult(kRenderId, kPageRequestId, 848 EnumerateDevicesAndWaitForResult(kRenderId, kPageRequestId,
849 MEDIA_DEVICE_AUDIO_CAPTURE); 849 MEDIA_DEVICE_AUDIO_CAPTURE);
850 } 850 }
851 851
852 TEST_F(MediaStreamDispatcherHostTest, EnumerateVideoDevices) { 852 TEST_F(MediaStreamDispatcherHostTest, EnumerateVideoDevices) {
853 EnumerateDevicesAndWaitForResult(kRenderId, kPageRequestId, 853 EnumerateDevicesAndWaitForResult(kRenderId, kPageRequestId,
854 MEDIA_DEVICE_VIDEO_CAPTURE); 854 MEDIA_DEVICE_VIDEO_CAPTURE);
855 } 855 }
856 856
857 }; // namespace content 857 }; // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698