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

Side by Side Diff: content/renderer/media/media_interface_provider.h

Issue 2771553003: Allow mojo media interfaces to be obtained from other threads. (Closed)
Patch Set: Use base::Passed 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 unified diff | Download patch
« no previous file with comments | « no previous file | content/renderer/media/media_interface_provider.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CONTENT_RENDERER_MEDIA_MEDIA_INTERFACE_PROVIDER_H_ 5 #ifndef CONTENT_RENDERER_MEDIA_MEDIA_INTERFACE_PROVIDER_H_
6 #define CONTENT_RENDERER_MEDIA_MEDIA_INTERFACE_PROVIDER_H_ 6 #define CONTENT_RENDERER_MEDIA_MEDIA_INTERFACE_PROVIDER_H_
7 7
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "base/single_thread_task_runner.h"
10 #include "base/threading/thread_checker.h" 11 #include "base/threading/thread_checker.h"
11 #include "content/common/content_export.h" 12 #include "content/common/content_export.h"
12 #include "media/mojo/interfaces/interface_factory.mojom.h" 13 #include "media/mojo/interfaces/interface_factory.mojom.h"
13 #include "services/service_manager/public/interfaces/interface_provider.mojom.h" 14 #include "services/service_manager/public/interfaces/interface_provider.mojom.h"
14 #include "url/gurl.h" 15 #include "url/gurl.h"
15 16
16 namespace service_manager { 17 namespace service_manager {
17 class InterfaceProvider; 18 class InterfaceProvider;
18 } 19 }
19 20
(...skipping 14 matching lines...) Expand all
34 mojo::ScopedMessagePipeHandle pipe) final; 35 mojo::ScopedMessagePipeHandle pipe) final;
35 36
36 private: 37 private:
37 media::mojom::InterfaceFactory* GetMediaInterfaceFactory(); 38 media::mojom::InterfaceFactory* GetMediaInterfaceFactory();
38 void OnConnectionError(); 39 void OnConnectionError();
39 40
40 base::ThreadChecker thread_checker_; 41 base::ThreadChecker thread_checker_;
41 service_manager::InterfaceProvider* remote_interfaces_; 42 service_manager::InterfaceProvider* remote_interfaces_;
42 media::mojom::InterfaceFactoryPtr media_interface_factory_; 43 media::mojom::InterfaceFactoryPtr media_interface_factory_;
43 44
45 // Task runner bound to the main mojo thread.
46 scoped_refptr<base::SingleThreadTaskRunner> task_runner_;
47 base::WeakPtrFactory<MediaInterfaceProvider> weak_factory_;
48
44 DISALLOW_COPY_AND_ASSIGN(MediaInterfaceProvider); 49 DISALLOW_COPY_AND_ASSIGN(MediaInterfaceProvider);
45 }; 50 };
46 51
47 } // namespace content 52 } // namespace content
48 53
49 #endif // CONTENT_RENDERER_MEDIA_MEDIA_INTERFACE_PROVIDER_H_ 54 #endif // CONTENT_RENDERER_MEDIA_MEDIA_INTERFACE_PROVIDER_H_
OLDNEW
« 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