OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2007 Apple Inc. All rights reserved. | 2 * Copyright (C) 2007 Apple 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 19 matching lines...) Expand all Loading... |
30 #include <wtf/RefCounted.h> | 30 #include <wtf/RefCounted.h> |
31 | 31 |
32 namespace WebCore { | 32 namespace WebCore { |
33 | 33 |
34 class MediaError : public RefCounted<MediaError> { | 34 class MediaError : public RefCounted<MediaError> { |
35 public: | 35 public: |
36 enum Code { | 36 enum Code { |
37 MEDIA_ERR_ABORTED = 1, | 37 MEDIA_ERR_ABORTED = 1, |
38 MEDIA_ERR_NETWORK, | 38 MEDIA_ERR_NETWORK, |
39 MEDIA_ERR_DECODE, | 39 MEDIA_ERR_DECODE, |
40 MEDIA_ERR_SRC_NOT_SUPPORTED | 40 MEDIA_ERR_SRC_NOT_SUPPORTED, |
41 #if ENABLE(ENCRYPTED_MEDIA) || ENABLE(ENCRYPTED_MEDIA_V2) | 41 MEDIA_ERR_ENCRYPTED |
42 , MEDIA_ERR_ENCRYPTED | |
43 #endif | |
44 }; | 42 }; |
45 | 43 |
46 static PassRefPtr<MediaError> create(Code code) { return adoptRef(new MediaE
rror(code)); } | 44 static PassRefPtr<MediaError> create(Code code) { return adoptRef(new MediaE
rror(code)); } |
47 | 45 |
48 Code code() const { return m_code; } | 46 Code code() const { return m_code; } |
49 | 47 |
50 private: | 48 private: |
51 MediaError(Code code) : m_code(code) { } | 49 MediaError(Code code) : m_code(code) { } |
52 | 50 |
53 Code m_code; | 51 Code m_code; |
54 }; | 52 }; |
55 | 53 |
56 } // namespace WebCore | 54 } // namespace WebCore |
57 | 55 |
58 #endif | 56 #endif |
OLD | NEW |