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

Unified Diff: content/renderer/media/media_interface_provider.h

Issue 2684103005: Allow media track switching. (Closed)
Patch Set: CR feedback Created 3 years, 9 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
« no previous file with comments | « no previous file | content/renderer/media/media_interface_provider.cc » ('j') | media/renderers/renderer_impl.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/media/media_interface_provider.h
diff --git a/content/renderer/media/media_interface_provider.h b/content/renderer/media/media_interface_provider.h
index d761fdf705214f0e11c4a6a778d3b17d1d0b2625..5194dd455657c7be85f38902d4ebc9133b0b80af 100644
--- a/content/renderer/media/media_interface_provider.h
+++ b/content/renderer/media/media_interface_provider.h
@@ -7,6 +7,7 @@
#include "base/callback.h"
#include "base/macros.h"
+#include "base/single_thread_task_runner.h"
#include "base/threading/thread_checker.h"
#include "content/common/content_export.h"
#include "media/mojo/interfaces/interface_factory.mojom.h"
@@ -21,7 +22,8 @@ namespace content {
// MediaInterfaceProvider is an implementation of mojo InterfaceProvider that
// provides media related services and handles disconnection automatically.
-// This class is single threaded.
+// This class will forward GetInterface calls to the creating thread (i.e. the
+// thread where constructor was called) if necessary.
xhwang 2017/03/29 00:16:47 That's impl detail. You can probably just say "Get
servolk 2017/03/29 01:49:33 Done.
class CONTENT_EXPORT MediaInterfaceProvider
: public service_manager::mojom::InterfaceProvider {
public:
@@ -41,6 +43,10 @@ class CONTENT_EXPORT MediaInterfaceProvider
service_manager::InterfaceProvider* remote_interfaces_;
media::mojom::InterfaceFactoryPtr media_interface_factory_;
+ scoped_refptr<base::SingleThreadTaskRunner> task_runner_;
+ base::WeakPtr<MediaInterfaceProvider> weak_this_;
+ base::WeakPtrFactory<MediaInterfaceProvider> weak_factory_;
+
DISALLOW_COPY_AND_ASSIGN(MediaInterfaceProvider);
};
« no previous file with comments | « no previous file | content/renderer/media/media_interface_provider.cc » ('j') | media/renderers/renderer_impl.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698