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(); | |
39 | 35 |
40 virtual std::unique_ptr<AudioDecoder> CreateAudioDecoder( | 36 virtual std::unique_ptr<AudioDecoder> CreateAudioDecoder( |
41 scoped_refptr<base::SingleThreadTaskRunner> task_runner); | 37 scoped_refptr<base::SingleThreadTaskRunner> task_runner); |
42 | 38 |
43 // TODO(xhwang): Consider creating Renderer and CDM directly in the client | 39 // TODO(xhwang): Consider creating Renderer and CDM directly in the client |
44 // instead of creating factories. See http://crbug.com/586211 | 40 // instead of creating factories. See http://crbug.com/586211 |
45 | 41 |
46 // Returns the RendererFactory to be used by MojoRendererService. | 42 // Returns the RendererFactory to be used by MojoRendererService. |
47 virtual std::unique_ptr<RendererFactory> CreateRendererFactory( | 43 virtual std::unique_ptr<RendererFactory> CreateRendererFactory( |
48 const scoped_refptr<MediaLog>& media_log); | 44 const scoped_refptr<MediaLog>& media_log); |
(...skipping 10 matching lines...) Expand all Loading... |
59 virtual std::unique_ptr<CdmFactory> CreateCdmFactory( | 55 virtual std::unique_ptr<CdmFactory> CreateCdmFactory( |
60 shell::mojom::InterfaceProvider* interface_provider); | 56 shell::mojom::InterfaceProvider* interface_provider); |
61 | 57 |
62 protected: | 58 protected: |
63 MojoMediaClient(); | 59 MojoMediaClient(); |
64 }; | 60 }; |
65 | 61 |
66 } // namespace media | 62 } // namespace media |
67 | 63 |
68 #endif // MEDIA_MOJO_SERVICES_MOJO_MEDIA_CLIENT_H_ | 64 #endif // MEDIA_MOJO_SERVICES_MOJO_MEDIA_CLIENT_H_ |
OLD | NEW |