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

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

Issue 2567913002: Rename ActiveDOMObject to SuspendableObject (Closed)
Patch Set: Created 4 years 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) 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 19 matching lines...) Expand all
30 30
31 #include "core/streams/Stream.h" 31 #include "core/streams/Stream.h"
32 32
33 #include "platform/blob/BlobData.h" 33 #include "platform/blob/BlobData.h"
34 #include "platform/blob/BlobRegistry.h" 34 #include "platform/blob/BlobRegistry.h"
35 #include "platform/blob/BlobURL.h" 35 #include "platform/blob/BlobURL.h"
36 36
37 namespace blink { 37 namespace blink {
38 38
39 Stream::Stream(ExecutionContext* context, const String& mediaType) 39 Stream::Stream(ExecutionContext* context, const String& mediaType)
40 : ActiveDOMObject(context), m_mediaType(mediaType), m_isNeutered(false) { 40 : SuspendableObject(context), m_mediaType(mediaType), m_isNeutered(false) {
41 // Create a new internal URL for a stream and register it with the provided 41 // Create a new internal URL for a stream and register it with the provided
42 // media type. 42 // media type.
43 m_internalURL = BlobURL::createInternalStreamURL(); 43 m_internalURL = BlobURL::createInternalStreamURL();
44 BlobRegistry::registerStreamURL(m_internalURL, m_mediaType); 44 BlobRegistry::registerStreamURL(m_internalURL, m_mediaType);
45 } 45 }
46 46
47 void Stream::addData(const char* data, size_t len) { 47 void Stream::addData(const char* data, size_t len) {
48 RefPtr<RawData> buffer(RawData::create()); 48 RefPtr<RawData> buffer(RawData::create());
49 buffer->mutableData()->resize(len); 49 buffer->mutableData()->resize(len);
50 memcpy(buffer->mutableData()->data(), data, len); 50 memcpy(buffer->mutableData()->data(), data, len);
(...skipping 19 matching lines...) Expand all
70 void Stream::suspend() {} 70 void Stream::suspend() {}
71 71
72 void Stream::resume() {} 72 void Stream::resume() {}
73 73
74 void Stream::contextDestroyed() { 74 void Stream::contextDestroyed() {
75 neuter(); 75 neuter();
76 abort(); 76 abort();
77 } 77 }
78 78
79 DEFINE_TRACE(Stream) { 79 DEFINE_TRACE(Stream) {
80 ActiveDOMObject::trace(visitor); 80 SuspendableObject::trace(visitor);
81 } 81 }
82 82
83 } // namespace blink 83 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698