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

Side by Side Diff: Source/core/streams/Stream.cpp

Issue 540283003: bindings: Retires ScriptWrappable::init, etc. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Addressed a review comment. Created 6 years, 3 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/streams/ReadableStream.cpp ('k') | Source/core/svg/SVGAElement.cpp » ('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) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 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 24 matching lines...) Expand all
35 #include "platform/blob/BlobRegistry.h" 35 #include "platform/blob/BlobRegistry.h"
36 #include "platform/blob/BlobURL.h" 36 #include "platform/blob/BlobURL.h"
37 37
38 namespace blink { 38 namespace blink {
39 39
40 Stream::Stream(ExecutionContext* context, const String& mediaType) 40 Stream::Stream(ExecutionContext* context, const String& mediaType)
41 : ActiveDOMObject(context) 41 : ActiveDOMObject(context)
42 , m_mediaType(mediaType) 42 , m_mediaType(mediaType)
43 , m_isNeutered(false) 43 , m_isNeutered(false)
44 { 44 {
45 ScriptWrappable::init(this);
46
47 // Create a new internal URL for a stream and register it with the provided 45 // Create a new internal URL for a stream and register it with the provided
48 // media type. 46 // media type.
49 m_internalURL = BlobURL::createInternalStreamURL(); 47 m_internalURL = BlobURL::createInternalStreamURL();
50 BlobRegistry::registerStreamURL(m_internalURL, m_mediaType); 48 BlobRegistry::registerStreamURL(m_internalURL, m_mediaType);
51 } 49 }
52 50
53 void Stream::addData(const char* data, size_t len) 51 void Stream::addData(const char* data, size_t len)
54 { 52 {
55 RefPtr<RawData> buffer(RawData::create()); 53 RefPtr<RawData> buffer(RawData::create());
56 buffer->mutableData()->resize(len); 54 buffer->mutableData()->resize(len);
(...skipping 24 matching lines...) Expand all
81 { 79 {
82 } 80 }
83 81
84 void Stream::stop() 82 void Stream::stop()
85 { 83 {
86 neuter(); 84 neuter();
87 abort(); 85 abort();
88 } 86 }
89 87
90 } // namespace blink 88 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/streams/ReadableStream.cpp ('k') | Source/core/svg/SVGAElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698