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

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

Issue 2684103005: Allow media track switching. (Closed)
Patch Set: Fixed comments Created 3 years, 8 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') | no next file with comments »
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..532bb4ca6ffdd9fe452690a6e4e82132d592b584 100644
--- a/content/renderer/media/media_interface_provider.h
+++ b/content/renderer/media/media_interface_provider.h
@@ -7,7 +7,8 @@
#include "base/callback.h"
#include "base/macros.h"
-#include "base/threading/thread_checker.h"
+#include "base/memory/weak_ptr.h"
+#include "base/single_thread_task_runner.h"
#include "content/common/content_export.h"
#include "media/mojo/interfaces/interface_factory.mojom.h"
#include "services/service_manager/public/interfaces/interface_provider.mojom.h"
@@ -21,7 +22,7 @@ namespace content {
// MediaInterfaceProvider is an implementation of mojo InterfaceProvider that
// provides media related services and handles disconnection automatically.
-// This class is single threaded.
+// The GetInterface can be called on any thread.
class CONTENT_EXPORT MediaInterfaceProvider
: public service_manager::mojom::InterfaceProvider {
public:
@@ -37,10 +38,13 @@ class CONTENT_EXPORT MediaInterfaceProvider
media::mojom::InterfaceFactory* GetMediaInterfaceFactory();
void OnConnectionError();
- base::ThreadChecker thread_checker_;
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') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698