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

Unified Diff: talk/app/webrtc/dtlscertificate.h

Issue 1269843005: Added DtlsCertificate, a ref counted object owning an SSLIdentity (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Merge with master Created 5 years, 4 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
« no previous file with comments | « no previous file | talk/app/webrtc/dtlscertificate.cc » ('j') | talk/app/webrtc/java/jni/peerconnection_jni.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: talk/app/webrtc/dtlscertificate.h
diff --git a/talk/media/webrtc/webrtcvideodecoderfactory.h b/talk/app/webrtc/dtlscertificate.h
similarity index 66%
copy from talk/media/webrtc/webrtcvideodecoderfactory.h
copy to talk/app/webrtc/dtlscertificate.h
index 6055a236a49c149303b0b66627198f28ce56630d..580825db219065057e3a84a1c5f87d37c645f917 100644
--- a/talk/media/webrtc/webrtcvideodecoderfactory.h
+++ b/talk/app/webrtc/dtlscertificate.h
@@ -1,6 +1,6 @@
/*
* libjingle
- * Copyright 2013 Google Inc.
+ * Copyright 2015 Google Inc.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
@@ -25,29 +25,34 @@
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef TALK_MEDIA_WEBRTC_WEBRTCVIDEODECODERFACTORY_H_
-#define TALK_MEDIA_WEBRTC_WEBRTCVIDEODECODERFACTORY_H_
+#ifndef TALK_APP_WEBRTC_DTLSCERTIFICATE_H_
+#define TALK_APP_WEBRTC_DTLSCERTIFICATE_H_
+
+#include <string>
#include "webrtc/base/refcount.h"
-#include "webrtc/common_types.h"
+#include "webrtc/base/scoped_ptr.h"
+#include "webrtc/base/scoped_ref_ptr.h"
+#include "webrtc/base/sslidentity.h"
namespace webrtc {
-class VideoDecoder;
-}
-
-namespace cricket {
-class WebRtcVideoDecoderFactory {
+class DtlsCertificate : public rtc::RefCountInterface {
public:
- // Caller takes the ownership of the returned object and it should be released
- // by calling DestroyVideoDecoder().
- virtual webrtc::VideoDecoder* CreateVideoDecoder(
- webrtc::VideoCodecType type) = 0;
- virtual ~WebRtcVideoDecoderFactory() {}
+ static rtc::scoped_refptr<DtlsCertificate> Create(
+ rtc::scoped_ptr<rtc::SSLIdentity> identity);
+
+ // The identity is owned by the DtlsCertificate.
+ rtc::SSLIdentity* identity() const { return identity_.get(); }
+
+ protected:
+ explicit DtlsCertificate(rtc::SSLIdentity* identity);
tommi (sloooow) - chröme 2015/08/18 14:49:35 use scoped_ptr here too?
+ ~DtlsCertificate() override;
- virtual void DestroyVideoDecoder(webrtc::VideoDecoder* decoder) = 0;
+ private:
+ rtc::scoped_ptr<rtc::SSLIdentity> identity_;
};
-} // namespace cricket
+} // namespace webrtc
-#endif // TALK_MEDIA_WEBRTC_WEBRTCVIDEODECODERFACTORY_H_
+#endif // TALK_APP_WEBRTC_DTLSCERTIFICATE_H_
« no previous file with comments | « no previous file | talk/app/webrtc/dtlscertificate.cc » ('j') | talk/app/webrtc/java/jni/peerconnection_jni.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698