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

Side by Side Diff: Source/core/html/MediaKeyError.h

Issue 1306613002: Keep auxilliary media objects on the heap always. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: 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 unified diff | Download patch
« no previous file with comments | « Source/core/html/MediaError.idl ('k') | Source/core/html/MediaKeyError.idl » ('j') | 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 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 11 matching lines...) Expand all
22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
23 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 23 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
24 */ 24 */
25 25
26 #ifndef MediaKeyError_h 26 #ifndef MediaKeyError_h
27 #define MediaKeyError_h 27 #define MediaKeyError_h
28 28
29 #include "bindings/core/v8/ScriptWrappable.h" 29 #include "bindings/core/v8/ScriptWrappable.h"
30 #include "core/CoreExport.h" 30 #include "core/CoreExport.h"
31 #include "platform/heap/Handle.h" 31 #include "platform/heap/Handle.h"
32 #include "wtf/PassRefPtr.h"
33 #include "wtf/RefCounted.h"
34 32
35 namespace blink { 33 namespace blink {
36 34
37 class CORE_EXPORT MediaKeyError final : public RefCountedWillBeGarbageCollectedF inalized<MediaKeyError>, public ScriptWrappable { 35 class CORE_EXPORT MediaKeyError final : public GarbageCollected<MediaKeyError>, public ScriptWrappable {
38 DEFINE_WRAPPERTYPEINFO(); 36 DEFINE_WRAPPERTYPEINFO();
39 public: 37 public:
40 enum { 38 enum {
41 MEDIA_KEYERR_UNKNOWN = 1, 39 MEDIA_KEYERR_UNKNOWN = 1,
42 MEDIA_KEYERR_CLIENT, 40 MEDIA_KEYERR_CLIENT,
43 MEDIA_KEYERR_SERVICE, 41 MEDIA_KEYERR_SERVICE,
44 MEDIA_KEYERR_OUTPUT, 42 MEDIA_KEYERR_OUTPUT,
45 MEDIA_KEYERR_HARDWARECHANGE, 43 MEDIA_KEYERR_HARDWARECHANGE,
46 MEDIA_KEYERR_DOMAIN 44 MEDIA_KEYERR_DOMAIN
47 }; 45 };
48 typedef unsigned short Code; 46 typedef unsigned short Code;
49 47
50 static PassRefPtrWillBeRawPtr<MediaKeyError> create(Code code, unsigned syst emCode = 0) 48 static MediaKeyError* create(Code code, unsigned systemCode = 0)
51 { 49 {
52 return adoptRefWillBeNoop(new MediaKeyError(code, systemCode)); 50 return new MediaKeyError(code, systemCode);
53 } 51 }
54 52
55 Code code() const { return m_code; } 53 Code code() const { return m_code; }
56 unsigned systemCode() { return m_systemCode; } 54 unsigned systemCode() { return m_systemCode; }
57 55
58 DEFINE_INLINE_TRACE() { } 56 DEFINE_INLINE_TRACE() { }
59 57
60 private: 58 private:
61 MediaKeyError(Code code, unsigned systemCode) 59 MediaKeyError(Code code, unsigned systemCode)
62 : m_code(code) 60 : m_code(code)
63 , m_systemCode(systemCode) 61 , m_systemCode(systemCode)
64 { 62 {
65 } 63 }
66 64
67 Code m_code; 65 Code m_code;
68 unsigned m_systemCode; 66 unsigned m_systemCode;
69 }; 67 };
70 68
71 } // namespace blink 69 } // namespace blink
72 70
73 #endif // MediaKeyError_h 71 #endif // MediaKeyError_h
OLDNEW
« no previous file with comments | « Source/core/html/MediaError.idl ('k') | Source/core/html/MediaKeyError.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698