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

Side by Side Diff: Source/modules/mediastream/MediaStreamTrack.cpp

Issue 22572005: Remove all uses of the ASCIILiteral class. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rm it from wtf Created 7 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 | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2011 Google Inc. All rights reserved. 2 * Copyright (C) 2011 Google Inc. All rights reserved.
3 * Copyright (C) 2011 Ericsson AB. All rights reserved. 3 * Copyright (C) 2011 Ericsson AB. 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 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 m_component->source()->addObserver(this); 54 m_component->source()->addObserver(this);
55 } 55 }
56 56
57 MediaStreamTrack::~MediaStreamTrack() 57 MediaStreamTrack::~MediaStreamTrack()
58 { 58 {
59 m_component->source()->removeObserver(this); 59 m_component->source()->removeObserver(this);
60 } 60 }
61 61
62 String MediaStreamTrack::kind() const 62 String MediaStreamTrack::kind() const
63 { 63 {
64 DEFINE_STATIC_LOCAL(String, audioKind, (ASCIILiteral("audio"))); 64 DEFINE_STATIC_LOCAL(String, audioKind, ("audio"));
65 DEFINE_STATIC_LOCAL(String, videoKind, (ASCIILiteral("video"))); 65 DEFINE_STATIC_LOCAL(String, videoKind, ("video"));
66 66
67 switch (m_component->source()->type()) { 67 switch (m_component->source()->type()) {
68 case MediaStreamSource::TypeAudio: 68 case MediaStreamSource::TypeAudio:
69 return audioKind; 69 return audioKind;
70 case MediaStreamSource::TypeVideo: 70 case MediaStreamSource::TypeVideo:
71 return videoKind; 71 return videoKind;
72 } 72 }
73 73
74 ASSERT_NOT_REACHED(); 74 ASSERT_NOT_REACHED();
75 return audioKind; 75 return audioKind;
(...skipping 23 matching lines...) Expand all
99 99
100 if (m_component->stream()->ended()) 100 if (m_component->stream()->ended())
101 return; 101 return;
102 102
103 MediaStreamCenter::instance().didSetMediaStreamTrackEnabled(m_component->str eam(), m_component.get()); 103 MediaStreamCenter::instance().didSetMediaStreamTrackEnabled(m_component->str eam(), m_component.get());
104 } 104 }
105 105
106 String MediaStreamTrack::readyState() const 106 String MediaStreamTrack::readyState() const
107 { 107 {
108 if (m_stopped) 108 if (m_stopped)
109 return ASCIILiteral("ended"); 109 return "ended";
110 110
111 switch (m_component->source()->readyState()) { 111 switch (m_component->source()->readyState()) {
112 case MediaStreamSource::ReadyStateLive: 112 case MediaStreamSource::ReadyStateLive:
113 return ASCIILiteral("live"); 113 return "live";
114 case MediaStreamSource::ReadyStateMuted: 114 case MediaStreamSource::ReadyStateMuted:
115 return ASCIILiteral("muted"); 115 return "muted";
116 case MediaStreamSource::ReadyStateEnded: 116 case MediaStreamSource::ReadyStateEnded:
117 return ASCIILiteral("ended"); 117 return "ended";
118 } 118 }
119 119
120 ASSERT_NOT_REACHED(); 120 ASSERT_NOT_REACHED();
121 return String(); 121 return String();
122 } 122 }
123 123
124 void MediaStreamTrack::getSources(ScriptExecutionContext* context, PassRefPtr<Me diaStreamTrackSourcesCallback> callback, ExceptionState& es) 124 void MediaStreamTrack::getSources(ScriptExecutionContext* context, PassRefPtr<Me diaStreamTrackSourcesCallback> callback, ExceptionState& es)
125 { 125 {
126 RefPtr<MediaStreamTrackSourcesRequest> request = MediaStreamTrackSourcesRequ est::create(context, callback); 126 RefPtr<MediaStreamTrackSourcesRequest> request = MediaStreamTrackSourcesRequ est::create(context, callback);
127 bool ok = MediaStreamCenter::instance().getMediaStreamTrackSources(request.r elease()); 127 bool ok = MediaStreamCenter::instance().getMediaStreamTrackSources(request.r elease());
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
186 { 186 {
187 return &m_eventTargetData; 187 return &m_eventTargetData;
188 } 188 }
189 189
190 EventTargetData* MediaStreamTrack::ensureEventTargetData() 190 EventTargetData* MediaStreamTrack::ensureEventTargetData()
191 { 191 {
192 return &m_eventTargetData; 192 return &m_eventTargetData;
193 } 193 }
194 194
195 } // namespace WebCore 195 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/modules/mediastream/MediaConstraintsImpl.cpp ('k') | Source/modules/mediastream/RTCDataChannel.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698