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

Unified Diff: Source/core/platform/mediastream/MediaStreamComponent.h

Issue 14989002: Splitting MediaStreamDescriptor.h and MediaStreamComponent.h into .h and .cpp (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: Source/core/platform/mediastream/MediaStreamComponent.h
diff --git a/Source/core/platform/mediastream/MediaStreamComponent.h b/Source/core/platform/mediastream/MediaStreamComponent.h
index 733a182464cb5703e5ab3a7f02051c368e8af96c..24cd068e432df8cabab50632f4280d9c02802194 100644
--- a/Source/core/platform/mediastream/MediaStreamComponent.h
+++ b/Source/core/platform/mediastream/MediaStreamComponent.h
@@ -1,5 +1,6 @@
/*
* Copyright (C) 2011 Ericsson AB. All rights reserved.
+ * Copyright (C) 2013 Google Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -31,29 +32,20 @@
#ifndef MediaStreamComponent_h
#define MediaStreamComponent_h
-#include "core/platform/UUID.h"
-#include "core/platform/mediastream/MediaStreamSource.h"
+#include <wtf/PassRefPtr.h>
+#include <wtf/RefCounted.h>
+#include <wtf/text/WTFString.h>
namespace WebCore {
class MediaStreamDescriptor;
+class MediaStreamSource;
class MediaStreamComponent : public RefCounted<MediaStreamComponent> {
public:
- static PassRefPtr<MediaStreamComponent> create(PassRefPtr<MediaStreamSource> source)
- {
- return adoptRef(new MediaStreamComponent(createCanonicalUUIDString(), 0, source));
- }
-
- static PassRefPtr<MediaStreamComponent> create(const String& id, PassRefPtr<MediaStreamSource> source)
- {
- return adoptRef(new MediaStreamComponent(id, 0, source));
- }
-
- static PassRefPtr<MediaStreamComponent> create(MediaStreamDescriptor* stream, PassRefPtr<MediaStreamSource> source)
- {
- return adoptRef(new MediaStreamComponent(createCanonicalUUIDString(), stream, source));
- }
+ static PassRefPtr<MediaStreamComponent> create(PassRefPtr<MediaStreamSource>);
+ static PassRefPtr<MediaStreamComponent> create(const String& id, PassRefPtr<MediaStreamSource>);
+ static PassRefPtr<MediaStreamComponent> create(MediaStreamDescriptor*, PassRefPtr<MediaStreamSource>);
MediaStreamDescriptor* stream() const { return m_stream; }
void setStream(MediaStreamDescriptor* stream) { ASSERT(!m_stream && stream); m_stream = stream; }
@@ -65,14 +57,7 @@ public:
void setEnabled(bool enabled) { m_enabled = enabled; }
private:
- MediaStreamComponent(const String& id, MediaStreamDescriptor* stream, PassRefPtr<MediaStreamSource> source)
- : m_stream(stream)
- , m_source(source)
- , m_id(id)
- , m_enabled(true)
- {
- ASSERT(m_id.length());
- }
+ MediaStreamComponent(const String& id, MediaStreamDescriptor*, PassRefPtr<MediaStreamSource>);
MediaStreamDescriptor* m_stream;
RefPtr<MediaStreamSource> m_source;

Powered by Google App Engine
This is Rietveld 408576698