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

Side by Side Diff: third_party/WebKit/Source/modules/mediastream/RTCCertificate.h

Issue 1804563002: Refactor WebRTC certificate generation to use WebPassOwnPtr. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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 /* 1 /*
2 * Copyright (C) 2015 Google Inc. All rights reserved. 2 * Copyright (C) 2015 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 16 matching lines...) Expand all
27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 */ 29 */
30 30
31 #ifndef RTCCertificate_h 31 #ifndef RTCCertificate_h
32 #define RTCCertificate_h 32 #define RTCCertificate_h
33 33
34 #include "bindings/core/v8/ScriptWrappable.h" 34 #include "bindings/core/v8/ScriptWrappable.h"
35 #include "core/dom/DOMTimeStamp.h" 35 #include "core/dom/DOMTimeStamp.h"
36 #include "platform/heap/GarbageCollected.h" 36 #include "platform/heap/GarbageCollected.h"
37 #include "public/platform/WebPassOwnPtr.h"
37 #include "public/platform/WebRTCCertificate.h" 38 #include "public/platform/WebRTCCertificate.h"
38 #include "wtf/OwnPtr.h" 39 #include "wtf/OwnPtr.h"
39 40
40 namespace blink { 41 namespace blink {
41 42
42 class RTCCertificate final : public GarbageCollectedFinalized<RTCCertificate>, p ublic ScriptWrappable { 43 class RTCCertificate final : public GarbageCollectedFinalized<RTCCertificate>, p ublic ScriptWrappable {
43 DEFINE_WRAPPERTYPEINFO(); 44 DEFINE_WRAPPERTYPEINFO();
44 public: 45 public:
45 // Takes ownership of the certificate. 46 // Takes ownership of the certificate.
46 RTCCertificate(WebRTCCertificate*); 47 RTCCertificate(WebPassOwnPtr<WebRTCCertificate>);
47 48
48 // Returns a new WebRTCCertificate shallow copy that the caller is 49 // Returns a new WebRTCCertificate shallow copy.
49 // responsible for deleting. 50 WebPassOwnPtr<WebRTCCertificate> certificateShallowCopy() const;
50 WebRTCCertificate* certificateShallowCopy() const;
51 51
52 DEFINE_INLINE_TRACE() {} 52 DEFINE_INLINE_TRACE() {}
53 53
54 // Returns the expiration time in ms relative to epoch, 1970-01-01T00:00:00Z . 54 // Returns the expiration time in ms relative to epoch, 1970-01-01T00:00:00Z .
55 DOMTimeStamp expires() const; 55 DOMTimeStamp expires() const;
56 56
57 private: 57 private:
58 OwnPtr<WebRTCCertificate> m_certificate; 58 OwnPtr<WebRTCCertificate> m_certificate;
59 }; 59 };
60 60
61 } // namespace blink 61 } // namespace blink
62 62
63 #endif // RTCCertificate_h 63 #endif // RTCCertificate_h
OLDNEW
« no previous file with comments | « content/renderer/media/rtc_certificate_generator.cc ('k') | third_party/WebKit/Source/modules/mediastream/RTCCertificate.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698