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