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

Side by Side Diff: public/platform/WebRTCSessionDescription.h

Issue 1010393002: Fix issue of localDescription and remoteDescription getter. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fix test case crash. Created 5 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
« no previous file with comments | « Source/modules/mediastream/RTCVoidRequestImpl.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 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 are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * 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 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 public: 56 public:
57 WebRTCSessionDescription() { } 57 WebRTCSessionDescription() { }
58 WebRTCSessionDescription(const WebRTCSessionDescription& other) { assign(oth er); } 58 WebRTCSessionDescription(const WebRTCSessionDescription& other) { assign(oth er); }
59 ~WebRTCSessionDescription() { reset(); } 59 ~WebRTCSessionDescription() { reset(); }
60 60
61 WebRTCSessionDescription& operator=(const WebRTCSessionDescription& other) 61 WebRTCSessionDescription& operator=(const WebRTCSessionDescription& other)
62 { 62 {
63 assign(other); 63 assign(other);
64 return *this; 64 return *this;
65 } 65 }
66 bool operator==(const WebRTCSessionDescription& other)
67 {
68 return sdp() == other.sdp() && type() == other.type();
69 }
70 bool operator!=(const WebRTCSessionDescription& other)
71 {
72 return !(*this == other);
73 }
66 74
67 BLINK_PLATFORM_EXPORT void assign(const WebRTCSessionDescription&); 75 BLINK_PLATFORM_EXPORT void assign(const WebRTCSessionDescription&);
68 76
69 BLINK_PLATFORM_EXPORT void initialize(const WebString& type, const WebString & sdp); 77 BLINK_PLATFORM_EXPORT void initialize(const WebString& type, const WebString & sdp);
70 BLINK_PLATFORM_EXPORT void reset(); 78 BLINK_PLATFORM_EXPORT void reset();
71 bool isNull() const { return m_private.isNull(); } 79 bool isNull() const { return m_private.isNull(); }
72 80
73 BLINK_PLATFORM_EXPORT WebString type() const; 81 BLINK_PLATFORM_EXPORT WebString type() const;
74 BLINK_PLATFORM_EXPORT void setType(const WebString&); 82 BLINK_PLATFORM_EXPORT void setType(const WebString&);
75 BLINK_PLATFORM_EXPORT WebString sdp() const; 83 BLINK_PLATFORM_EXPORT WebString sdp() const;
76 BLINK_PLATFORM_EXPORT void setSDP(const WebString&); 84 BLINK_PLATFORM_EXPORT void setSDP(const WebString&);
77 85
78 #if BLINK_IMPLEMENTATION 86 #if BLINK_IMPLEMENTATION
79 WebRTCSessionDescription(WebString type, WebString sdp) 87 WebRTCSessionDescription(WebString type, WebString sdp)
80 { 88 {
81 this->initialize(type, sdp); 89 this->initialize(type, sdp);
82 } 90 }
83 #endif 91 #endif
84 92
85 private: 93 private:
86 WebPrivatePtr<WebRTCSessionDescriptionPrivate> m_private; 94 WebPrivatePtr<WebRTCSessionDescriptionPrivate> m_private;
87 }; 95 };
88 96
89 } // namespace blink 97 } // namespace blink
90 98
91 #endif // WebRTCSessionDescription_h 99 #endif // WebRTCSessionDescription_h
OLDNEW
« no previous file with comments | « Source/modules/mediastream/RTCVoidRequestImpl.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698