OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 MEDIA_MOJO_SERVICES_MOJO_MEDIA_CLIENT_H_ | 5 #ifndef MEDIA_MOJO_SERVICES_MOJO_MEDIA_CLIENT_H_ |
6 #define MEDIA_MOJO_SERVICES_MOJO_MEDIA_CLIENT_H_ | 6 #define MEDIA_MOJO_SERVICES_MOJO_MEDIA_CLIENT_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 | 9 |
10 #include "media/base/audio_decoder.h" | 10 #include "media/base/audio_decoder.h" |
(...skipping 14 matching lines...) Expand all Loading... |
25 } | 25 } |
26 | 26 |
27 namespace media { | 27 namespace media { |
28 | 28 |
29 class MojoMediaClient { | 29 class MojoMediaClient { |
30 public: | 30 public: |
31 virtual ~MojoMediaClient(); | 31 virtual ~MojoMediaClient(); |
32 | 32 |
33 // Called exactly once before any other method. | 33 // Called exactly once before any other method. |
34 virtual void Initialize(); | 34 virtual void Initialize(); |
| 35 // Called before the host application is scheduled to quit. |
| 36 // The application message loop is still valid at this point, so all clean |
| 37 // up tasks requiring the message loop must be completed before returning. |
| 38 virtual void WillQuit(); |
35 | 39 |
36 virtual std::unique_ptr<AudioDecoder> CreateAudioDecoder( | 40 virtual std::unique_ptr<AudioDecoder> CreateAudioDecoder( |
37 scoped_refptr<base::SingleThreadTaskRunner> task_runner); | 41 scoped_refptr<base::SingleThreadTaskRunner> task_runner); |
38 | 42 |
39 // TODO(xhwang): Consider creating Renderer and CDM directly in the client | 43 // TODO(xhwang): Consider creating Renderer and CDM directly in the client |
40 // instead of creating factories. See http://crbug.com/586211 | 44 // instead of creating factories. See http://crbug.com/586211 |
41 | 45 |
42 // Returns the RendererFactory to be used by MojoRendererService. | 46 // Returns the RendererFactory to be used by MojoRendererService. |
43 virtual std::unique_ptr<RendererFactory> CreateRendererFactory( | 47 virtual std::unique_ptr<RendererFactory> CreateRendererFactory( |
44 const scoped_refptr<MediaLog>& media_log); | 48 const scoped_refptr<MediaLog>& media_log); |
(...skipping 10 matching lines...) Expand all Loading... |
55 virtual std::unique_ptr<CdmFactory> CreateCdmFactory( | 59 virtual std::unique_ptr<CdmFactory> CreateCdmFactory( |
56 shell::mojom::InterfaceProvider* interface_provider); | 60 shell::mojom::InterfaceProvider* interface_provider); |
57 | 61 |
58 protected: | 62 protected: |
59 MojoMediaClient(); | 63 MojoMediaClient(); |
60 }; | 64 }; |
61 | 65 |
62 } // namespace media | 66 } // namespace media |
63 | 67 |
64 #endif // MEDIA_MOJO_SERVICES_MOJO_MEDIA_CLIENT_H_ | 68 #endif // MEDIA_MOJO_SERVICES_MOJO_MEDIA_CLIENT_H_ |
OLD | NEW |