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

Side by Side Diff: media/mojo/services/mojo_renderer_service.h

Issue 2530613003: media: Fix lifetime of InterfaceFactoryImpl and created impls (Closed)
Patch Set: Created 4 years 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
OLDNEW
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_RENDERER_SERVICE_H_ 5 #ifndef MEDIA_MOJO_SERVICES_MOJO_RENDERER_SERVICE_H_
6 #define MEDIA_MOJO_SERVICES_MOJO_RENDERER_SERVICE_H_ 6 #define MEDIA_MOJO_SERVICES_MOJO_RENDERER_SERVICE_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 #include <memory> 9 #include <memory>
10 10
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 71
72 private: 72 private:
73 enum State { 73 enum State {
74 STATE_UNINITIALIZED, 74 STATE_UNINITIALIZED,
75 STATE_INITIALIZING, 75 STATE_INITIALIZING,
76 STATE_FLUSHING, 76 STATE_FLUSHING,
77 STATE_PLAYING, 77 STATE_PLAYING,
78 STATE_ERROR 78 STATE_ERROR
79 }; 79 };
80 80
81 public:
xhwang 2016/11/23 22:27:09 This is a hack, I'll fix it.
xhwang 2016/11/29 10:20:57 Done.
81 MojoRendererService( 82 MojoRendererService(
82 base::WeakPtr<MojoCdmServiceContext> mojo_cdm_service_context, 83 base::WeakPtr<MojoCdmServiceContext> mojo_cdm_service_context,
83 scoped_refptr<AudioRendererSink> audio_sink, 84 scoped_refptr<AudioRendererSink> audio_sink,
84 std::unique_ptr<VideoRendererSink> video_sink, 85 std::unique_ptr<VideoRendererSink> video_sink,
85 std::unique_ptr<media::Renderer> renderer, 86 std::unique_ptr<media::Renderer> renderer,
86 InitiateSurfaceRequestCB initiate_surface_request_cb); 87 InitiateSurfaceRequestCB initiate_surface_request_cb);
87 88
89 private:
88 // RendererClient implementation. 90 // RendererClient implementation.
89 void OnError(PipelineStatus status) final; 91 void OnError(PipelineStatus status) final;
90 void OnEnded() final; 92 void OnEnded() final;
91 void OnStatisticsUpdate(const PipelineStatistics& stats) final; 93 void OnStatisticsUpdate(const PipelineStatistics& stats) final;
92 void OnBufferingStateChange(BufferingState state) final; 94 void OnBufferingStateChange(BufferingState state) final;
93 void OnWaitingForDecryptionKey() final; 95 void OnWaitingForDecryptionKey() final;
94 void OnVideoNaturalSizeChange(const gfx::Size& size) final; 96 void OnVideoNaturalSizeChange(const gfx::Size& size) final;
95 void OnVideoOpacityChange(bool opaque) final; 97 void OnVideoOpacityChange(bool opaque) final;
96 void OnDurationChange(base::TimeDelta duration) final; 98 void OnDurationChange(base::TimeDelta duration) final;
97 99
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
156 158
157 base::WeakPtr<MojoRendererService> weak_this_; 159 base::WeakPtr<MojoRendererService> weak_this_;
158 base::WeakPtrFactory<MojoRendererService> weak_factory_; 160 base::WeakPtrFactory<MojoRendererService> weak_factory_;
159 161
160 DISALLOW_COPY_AND_ASSIGN(MojoRendererService); 162 DISALLOW_COPY_AND_ASSIGN(MojoRendererService);
161 }; 163 };
162 164
163 } // namespace media 165 } // namespace media
164 166
165 #endif // MEDIA_MOJO_SERVICES_MOJO_RENDERER_SERVICE_H_ 167 #endif // MEDIA_MOJO_SERVICES_MOJO_RENDERER_SERVICE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698