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

Side by Side Diff: Source/platform/mediastream/MediaStreamDescriptor.h

Issue 827673002: Add MediaStream.active attribute (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: add MediaStream.active attribute Created 5 years, 11 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) 2011 Ericsson AB. All rights reserved. 2 * Copyright (C) 2011 Ericsson AB. All rights reserved.
3 * Copyright (C) 2012 Google Inc. All rights reserved. 3 * Copyright (C) 2012 Google 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 * 8 *
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 73
74 unsigned numberOfVideoComponents() const { return m_videoComponents.size(); } 74 unsigned numberOfVideoComponents() const { return m_videoComponents.size(); }
75 MediaStreamComponent* videoComponent(unsigned index) const { return m_videoC omponents[index].get(); } 75 MediaStreamComponent* videoComponent(unsigned index) const { return m_videoC omponents[index].get(); }
76 76
77 void addComponent(PassRefPtr<MediaStreamComponent>); 77 void addComponent(PassRefPtr<MediaStreamComponent>);
78 void removeComponent(PassRefPtr<MediaStreamComponent>); 78 void removeComponent(PassRefPtr<MediaStreamComponent>);
79 79
80 void addRemoteTrack(MediaStreamComponent*); 80 void addRemoteTrack(MediaStreamComponent*);
81 void removeRemoteTrack(MediaStreamComponent*); 81 void removeRemoteTrack(MediaStreamComponent*);
82 82
83 bool active() const { return m_active; }
84 void setActive(bool active) { m_active = active; }
85
83 bool ended() const { return m_ended; } 86 bool ended() const { return m_ended; }
84 void setEnded() { m_ended = true; } 87 void setEnded() { m_ended = true; }
85 88
86 ExtraData* extraData() const { return m_extraData.get(); } 89 ExtraData* extraData() const { return m_extraData.get(); }
87 void setExtraData(PassOwnPtr<ExtraData> extraData) { m_extraData = extraData ; } 90 void setExtraData(PassOwnPtr<ExtraData> extraData) { m_extraData = extraData ; }
88 91
89 private: 92 private:
90 MediaStreamDescriptor(const String& id, const MediaStreamSourceVector& audio Sources, const MediaStreamSourceVector& videoSources); 93 MediaStreamDescriptor(const String& id, const MediaStreamSourceVector& audio Sources, const MediaStreamSourceVector& videoSources);
91 MediaStreamDescriptor(const String& id, const MediaStreamComponentVector& au dioComponents, const MediaStreamComponentVector& videoComponents); 94 MediaStreamDescriptor(const String& id, const MediaStreamComponentVector& au dioComponents, const MediaStreamComponentVector& videoComponents);
92 95
93 MediaStreamDescriptorClient* m_client; 96 MediaStreamDescriptorClient* m_client;
94 String m_id; 97 String m_id;
95 Vector<RefPtr<MediaStreamComponent> > m_audioComponents; 98 Vector<RefPtr<MediaStreamComponent> > m_audioComponents;
96 Vector<RefPtr<MediaStreamComponent> > m_videoComponents; 99 Vector<RefPtr<MediaStreamComponent> > m_videoComponents;
100 bool m_active;
97 bool m_ended; 101 bool m_ended;
98 102
99 OwnPtr<ExtraData> m_extraData; 103 OwnPtr<ExtraData> m_extraData;
100 }; 104 };
101 105
102 typedef Vector<RefPtr<MediaStreamDescriptor> > MediaStreamDescriptorVector; 106 typedef Vector<RefPtr<MediaStreamDescriptor> > MediaStreamDescriptorVector;
103 107
104 } // namespace blink 108 } // namespace blink
105 109
106 #endif // MediaStreamDescriptor_h 110 #endif // MediaStreamDescriptor_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698