OLD | NEW |
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 Loading... |
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_ |
OLD | NEW |