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

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

Issue 2928033002: Move GetDocument method from WebFrame to WebLocalFrame. (Closed)
Patch Set: Split a DCHECK in two as suggested by boliu@. Created 3 years, 6 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) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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_PEER_CONNECTION_TRACKER_H_ 5 #ifndef CONTENT_RENDERER_MEDIA_PEER_CONNECTION_TRACKER_H_
6 #define CONTENT_RENDERER_MEDIA_PEER_CONNECTION_TRACKER_H_ 6 #define CONTENT_RENDERER_MEDIA_PEER_CONNECTION_TRACKER_H_
7 7
8 #include <map> 8 #include <map>
9 9
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
11 #include "base/macros.h" 11 #include "base/macros.h"
12 #include "base/memory/weak_ptr.h" 12 #include "base/memory/weak_ptr.h"
13 #include "base/threading/thread_checker.h" 13 #include "base/threading/thread_checker.h"
14 #include "content/public/renderer/render_thread_observer.h" 14 #include "content/public/renderer/render_thread_observer.h"
15 #include "ipc/ipc_platform_file.h" 15 #include "ipc/ipc_platform_file.h"
16 #include "third_party/WebKit/public/platform/WebMediaStream.h" 16 #include "third_party/WebKit/public/platform/WebMediaStream.h"
17 #include "third_party/WebKit/public/platform/WebRTCPeerConnectionHandlerClient.h " 17 #include "third_party/WebKit/public/platform/WebRTCPeerConnectionHandlerClient.h "
18 #include "third_party/WebKit/public/platform/WebRTCSessionDescription.h" 18 #include "third_party/WebKit/public/platform/WebRTCSessionDescription.h"
19 #include "third_party/webrtc/api/peerconnectioninterface.h" 19 #include "third_party/webrtc/api/peerconnectioninterface.h"
20 20
21 namespace blink { 21 namespace blink {
22 class WebFrame; 22 class WebLocalFrame;
23 class WebMediaConstraints; 23 class WebMediaConstraints;
24 class WebRTCAnswerOptions; 24 class WebRTCAnswerOptions;
25 class WebRTCICECandidate; 25 class WebRTCICECandidate;
26 class WebRTCOfferOptions; 26 class WebRTCOfferOptions;
27 class WebRTCSessionDescription; 27 class WebRTCSessionDescription;
28 class WebUserMediaRequest; 28 class WebUserMediaRequest;
29 } // namespace blink 29 } // namespace blink
30 30
31 namespace webrtc { 31 namespace webrtc {
32 class DataChannelInterface; 32 class DataChannelInterface;
(...skipping 28 matching lines...) Expand all
61 // RenderThreadObserver implementation. 61 // RenderThreadObserver implementation.
62 bool OnControlMessageReceived(const IPC::Message& message) override; 62 bool OnControlMessageReceived(const IPC::Message& message) override;
63 63
64 // 64 //
65 // The following methods send an update to the browser process when a 65 // The following methods send an update to the browser process when a
66 // PeerConnection update happens. The caller should call the Track* methods 66 // PeerConnection update happens. The caller should call the Track* methods
67 // after calling RegisterPeerConnection and before calling 67 // after calling RegisterPeerConnection and before calling
68 // UnregisterPeerConnection, otherwise the Track* call has no effect. 68 // UnregisterPeerConnection, otherwise the Track* call has no effect.
69 // 69 //
70 70
71 // Sends an update when a PeerConnection has been created in Javascript. 71 // Sends an update when a PeerConnection has been created in Javascript. This
72 // This should be called once and only once for each PeerConnection. 72 // should be called once and only once for each PeerConnection. The
73 // The |pc_handler| is the handler object associated with the PeerConnection, 73 // |pc_handler| is the handler object associated with the PeerConnection, the
74 // the |servers| are the server configurations used to establish the 74 // |servers| are the server configurations used to establish the connection,
75 // connection, the |constraints| are the media constraints used to initialize 75 // the |constraints| are the media constraints used to initialize the
76 // the PeerConnection, the |frame| is the WebFrame object representing the 76 // PeerConnection, the |frame| is the WebLocalFrame object representing the
77 // page in which the PeerConnection is created. 77 // page in which the PeerConnection is created.
78 void RegisterPeerConnection( 78 void RegisterPeerConnection(
79 RTCPeerConnectionHandler* pc_handler, 79 RTCPeerConnectionHandler* pc_handler,
80 const webrtc::PeerConnectionInterface::RTCConfiguration& config, 80 const webrtc::PeerConnectionInterface::RTCConfiguration& config,
81 const blink::WebMediaConstraints& constraints, 81 const blink::WebMediaConstraints& constraints,
82 const blink::WebFrame* frame); 82 const blink::WebLocalFrame* frame);
83 83
84 // Sends an update when a PeerConnection has been destroyed. 84 // Sends an update when a PeerConnection has been destroyed.
85 virtual void UnregisterPeerConnection(RTCPeerConnectionHandler* pc_handler); 85 virtual void UnregisterPeerConnection(RTCPeerConnectionHandler* pc_handler);
86 86
87 // Sends an update when createOffer/createAnswer has been called. 87 // Sends an update when createOffer/createAnswer has been called.
88 // The |pc_handler| is the handler object associated with the PeerConnection, 88 // The |pc_handler| is the handler object associated with the PeerConnection,
89 // the |constraints| is the media constraints used to create the offer/answer. 89 // the |constraints| is the media constraints used to create the offer/answer.
90 virtual void TrackCreateOffer(RTCPeerConnectionHandler* pc_handler, 90 virtual void TrackCreateOffer(RTCPeerConnectionHandler* pc_handler,
91 const blink::WebRTCOfferOptions& options); 91 const blink::WebRTCOfferOptions& options);
92 // TODO(hta): Get rid of the version below. 92 // TODO(hta): Get rid of the version below.
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
218 int next_local_id_; 218 int next_local_id_;
219 base::ThreadChecker main_thread_; 219 base::ThreadChecker main_thread_;
220 RenderThread* send_target_for_test_; 220 RenderThread* send_target_for_test_;
221 221
222 DISALLOW_COPY_AND_ASSIGN(PeerConnectionTracker); 222 DISALLOW_COPY_AND_ASSIGN(PeerConnectionTracker);
223 }; 223 };
224 224
225 } // namespace content 225 } // namespace content
226 226
227 #endif // CONTENT_RENDERER_MEDIA_PEER_CONNECTION_TRACKER_H_ 227 #endif // CONTENT_RENDERER_MEDIA_PEER_CONNECTION_TRACKER_H_
OLDNEW
« no previous file with comments | « content/renderer/media/android/media_info_loader_unittest.cc ('k') | content/renderer/media/peer_connection_tracker.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698