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

Unified Diff: content/renderer/media/peer_connection_handler_base.h

Issue 10038009: Revert 131949 (multiple memory leaks) - Adding JSEP PeerConnection glue. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 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 side-by-side diff with in-line comments
Download patch
Index: content/renderer/media/peer_connection_handler_base.h
===================================================================
--- content/renderer/media/peer_connection_handler_base.h (revision 131960)
+++ content/renderer/media/peer_connection_handler_base.h (working copy)
@@ -1,71 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef CONTENT_RENDERER_MEDIA_PEER_CONNECTION_HANDLER_BASE_H_
-#define CONTENT_RENDERER_MEDIA_PEER_CONNECTION_HANDLER_BASE_H_
-
-#include <map>
-#include <string>
-
-#include "base/memory/scoped_ptr.h"
-#include "base/message_loop_proxy.h"
-#include "content/common/content_export.h"
-#include "third_party/libjingle/source/talk/app/webrtc/mediastream.h"
-#include "third_party/libjingle/source/talk/app/webrtc/peerconnection.h"
-#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebMediaStreamDescriptor.h"
-
-class MediaStreamDependencyFactory;
-class MediaStreamImpl;
-
-// PeerConnectionHandlerBase is the base class of a delegate for the
-// PeerConnection (JSEP or ROAP) API messages going between WebKit and native
-// PeerConnection in libjingle. ROAP PeerConnection will be removed soon.
-class CONTENT_EXPORT PeerConnectionHandlerBase
- : NON_EXPORTED_BASE(public webrtc::PeerConnectionObserver) {
- public:
- PeerConnectionHandlerBase(
- MediaStreamImpl* msi,
- MediaStreamDependencyFactory* dependency_factory);
-
- // Checks if a remote stream belongs to this PeerConnection.
- virtual bool HasStream(const std::string& stream_label);
-
- // Set the video renderer for the specified stream.
- virtual void SetVideoRenderer(
- const std::string& stream_label,
- webrtc::VideoRendererWrapperInterface* renderer);
-
- protected:
- virtual ~PeerConnectionHandlerBase();
-
- void AddStream(const WebKit::WebMediaStreamDescriptor& stream);
- void RemoveStream(const WebKit::WebMediaStreamDescriptor& stream);
- WebKit::WebMediaStreamDescriptor CreateWebKitStreamDescriptor(
- webrtc::MediaStreamInterface* stream);
-
- // media_stream_impl_ is a raw pointer, and is valid for the lifetime of this
- // class. Calls to it must be done on the render thread.
- MediaStreamImpl* media_stream_impl_;
-
- // dependency_factory_ is a raw pointer, and is valid for the lifetime of
- // MediaStreamImpl.
- MediaStreamDependencyFactory* dependency_factory_;
-
- // native_peer_connection_ is the native PeerConnection object,
- // it handles the ICE processing and media engine.
- talk_base::scoped_refptr<webrtc::PeerConnectionInterface>
- native_peer_connection_;
-
- typedef std::map<webrtc::MediaStreamInterface*,
- WebKit::WebMediaStreamDescriptor> RemoteStreamMap;
- RemoteStreamMap remote_streams_;
-
- // The message loop we are created on and on which to make calls to WebKit.
- // This should be the render thread message loop.
- scoped_refptr<base::MessageLoopProxy> message_loop_proxy_;
-
- DISALLOW_COPY_AND_ASSIGN(PeerConnectionHandlerBase);
-};
-
-#endif // CONTENT_RENDERER_MEDIA_PEER_CONNECTION_HANDLER_BASE_H_
« no previous file with comments | « content/renderer/media/peer_connection_handler.cc ('k') | content/renderer/media/peer_connection_handler_base.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698