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

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

Issue 1928493002: Use url::Origin to represent security origins in MediaStream-related code. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 7 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_MOCK_MEDIA_STREAM_DISPATCHER_H_ 5 #ifndef CONTENT_RENDERER_MEDIA_MOCK_MEDIA_STREAM_DISPATCHER_H_
6 #define CONTENT_RENDERER_MEDIA_MOCK_MEDIA_STREAM_DISPATCHER_H_ 6 #define CONTENT_RENDERER_MEDIA_MOCK_MEDIA_STREAM_DISPATCHER_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
11 #include "content/renderer/media/media_stream_dispatcher.h" 11 #include "content/renderer/media/media_stream_dispatcher.h"
12 #include "url/gurl.h" 12 #include "url/origin.h"
13 13
14 namespace content { 14 namespace content {
15 15
16 // This class is a mock implementation of MediaStreamDispatcher. 16 // This class is a mock implementation of MediaStreamDispatcher.
17 class MockMediaStreamDispatcher : public MediaStreamDispatcher { 17 class MockMediaStreamDispatcher : public MediaStreamDispatcher {
18 public: 18 public:
19 MockMediaStreamDispatcher(); 19 MockMediaStreamDispatcher();
20 ~MockMediaStreamDispatcher() override; 20 ~MockMediaStreamDispatcher() override;
21 21
22 void GenerateStream( 22 void GenerateStream(
23 int request_id, 23 int request_id,
24 const base::WeakPtr<MediaStreamDispatcherEventHandler>& event_handler, 24 const base::WeakPtr<MediaStreamDispatcherEventHandler>& event_handler,
25 const StreamControls& controls, 25 const StreamControls& controls,
26 const GURL& url) override; 26 const url::Origin& url) override;
27 void CancelGenerateStream( 27 void CancelGenerateStream(
28 int request_id, 28 int request_id,
29 const base::WeakPtr<MediaStreamDispatcherEventHandler>& event_handler) 29 const base::WeakPtr<MediaStreamDispatcherEventHandler>& event_handler)
30 override; 30 override;
31 void EnumerateDevices( 31 void EnumerateDevices(
32 int request_id, 32 int request_id,
33 const base::WeakPtr<MediaStreamDispatcherEventHandler>& event_handler, 33 const base::WeakPtr<MediaStreamDispatcherEventHandler>& event_handler,
34 MediaStreamType type, 34 MediaStreamType type,
35 const GURL& security_origin) override; 35 const url::Origin& security_origin) override;
36 void StopStreamDevice(const StreamDeviceInfo& device_info) override; 36 void StopStreamDevice(const StreamDeviceInfo& device_info) override;
37 bool IsStream(const std::string& label) override; 37 bool IsStream(const std::string& label) override;
38 int video_session_id(const std::string& label, int index) override; 38 int video_session_id(const std::string& label, int index) override;
39 int audio_session_id(const std::string& label, int index) override; 39 int audio_session_id(const std::string& label, int index) override;
40 40
41 int audio_input_request_id() const { return audio_input_request_id_; } 41 int audio_input_request_id() const { return audio_input_request_id_; }
42 int audio_output_request_id() const { return audio_output_request_id_; } 42 int audio_output_request_id() const { return audio_output_request_id_; }
43 int video_request_id() const { return video_request_id_; } 43 int video_request_id() const { return video_request_id_; }
44 int request_stream_counter() const { return request_stream_counter_; } 44 int request_stream_counter() const { return request_stream_counter_; }
45 void IncrementSessionId() { ++session_id_; } 45 void IncrementSessionId() { ++session_id_; }
(...skipping 30 matching lines...) Expand all
76 StreamDeviceInfoArray audio_input_array_; 76 StreamDeviceInfoArray audio_input_array_;
77 StreamDeviceInfoArray audio_output_array_; 77 StreamDeviceInfoArray audio_output_array_;
78 StreamDeviceInfoArray video_array_; 78 StreamDeviceInfoArray video_array_;
79 79
80 DISALLOW_COPY_AND_ASSIGN(MockMediaStreamDispatcher); 80 DISALLOW_COPY_AND_ASSIGN(MockMediaStreamDispatcher);
81 }; 81 };
82 82
83 } // namespace content 83 } // namespace content
84 84
85 #endif // CONTENT_RENDERER_MEDIA_MOCK_MEDIA_STREAM_DISPATCHER_H_ 85 #endif // CONTENT_RENDERER_MEDIA_MOCK_MEDIA_STREAM_DISPATCHER_H_
OLDNEW
« no previous file with comments | « content/renderer/media/media_stream_dispatcher_unittest.cc ('k') | content/renderer/media/mock_media_stream_dispatcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698