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

Side by Side Diff: Source/modules/encryptedmedia/MediaKeyMessageEvent.h

Issue 397463005: Change EME WebIDL to use ArrayBuffer/ArrayBufferView. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: rebase Created 6 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 Google Inc. All rights reserved.
3 * Copyright (C) 2013 Apple Inc. All rights reserved. 3 * Copyright (C) 2013 Apple Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
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 11 matching lines...) Expand all
22 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 22 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
23 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 23 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
24 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25 */ 25 */
26 26
27 #ifndef MediaKeyMessageEvent_h 27 #ifndef MediaKeyMessageEvent_h
28 #define MediaKeyMessageEvent_h 28 #define MediaKeyMessageEvent_h
29 29
30 #include "core/html/MediaKeyError.h" 30 #include "core/html/MediaKeyError.h"
31 #include "modules/EventModules.h" 31 #include "modules/EventModules.h"
32 #include "wtf/ArrayBuffer.h"
32 33
33 namespace blink { 34 namespace blink {
34 35
35 struct MediaKeyMessageEventInit : public EventInit { 36 struct MediaKeyMessageEventInit : public EventInit {
36 MediaKeyMessageEventInit(); 37 MediaKeyMessageEventInit();
37 38
38 RefPtr<Uint8Array> message; 39 RefPtr<ArrayBuffer> message;
39 String destinationURL; 40 String destinationURL;
40 }; 41 };
41 42
42 class MediaKeyMessageEvent FINAL : public Event { 43 class MediaKeyMessageEvent FINAL : public Event {
43 public: 44 public:
44 virtual ~MediaKeyMessageEvent(); 45 virtual ~MediaKeyMessageEvent();
45 46
46 static PassRefPtrWillBeRawPtr<MediaKeyMessageEvent> create() 47 static PassRefPtrWillBeRawPtr<MediaKeyMessageEvent> create()
47 { 48 {
48 return adoptRefWillBeNoop(new MediaKeyMessageEvent); 49 return adoptRefWillBeNoop(new MediaKeyMessageEvent);
49 } 50 }
50 51
51 static PassRefPtrWillBeRawPtr<MediaKeyMessageEvent> create(const AtomicStrin g& type, const MediaKeyMessageEventInit& initializer) 52 static PassRefPtrWillBeRawPtr<MediaKeyMessageEvent> create(const AtomicStrin g& type, const MediaKeyMessageEventInit& initializer)
52 { 53 {
53 return adoptRefWillBeNoop(new MediaKeyMessageEvent(type, initializer)); 54 return adoptRefWillBeNoop(new MediaKeyMessageEvent(type, initializer));
54 } 55 }
55 56
56 virtual const AtomicString& interfaceName() const OVERRIDE; 57 virtual const AtomicString& interfaceName() const OVERRIDE;
57 58
58 Uint8Array* message() const { return m_message.get(); } 59 ArrayBuffer* message() const { return m_message.get(); }
59 String destinationURL() const { return m_destinationURL; } 60 String destinationURL() const { return m_destinationURL; }
60 61
61 virtual void trace(Visitor*) OVERRIDE; 62 virtual void trace(Visitor*) OVERRIDE;
62 63
63 private: 64 private:
64 MediaKeyMessageEvent(); 65 MediaKeyMessageEvent();
65 MediaKeyMessageEvent(const AtomicString& type, const MediaKeyMessageEventIni t& initializer); 66 MediaKeyMessageEvent(const AtomicString& type, const MediaKeyMessageEventIni t& initializer);
66 67
67 RefPtr<Uint8Array> m_message; 68 RefPtr<ArrayBuffer> m_message;
68 String m_destinationURL; 69 String m_destinationURL;
69 }; 70 };
70 71
71 } // namespace blink 72 } // namespace blink
72 73
73 #endif 74 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698