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

Side by Side Diff: content/renderer/media/audio_renderer_sink_cache_impl.h

Issue 2566113002: AudioRendererSinKCache: Do not use unhealthy sinks (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
« no previous file with comments | « no previous file | content/renderer/media/audio_renderer_sink_cache_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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_AUDIO_RENDERER_SINK_CACHE_IMPL_H_ 5 #ifndef CONTENT_RENDERER_MEDIA_AUDIO_RENDERER_SINK_CACHE_IMPL_H_
6 #define CONTENT_RENDERER_MEDIA_AUDIO_RENDERER_SINK_CACHE_IMPL_H_ 6 #define CONTENT_RENDERER_MEDIA_AUDIO_RENDERER_SINK_CACHE_IMPL_H_
7 7
8 #include "content/renderer/media/audio_renderer_sink_cache.h" 8 #include "content/renderer/media/audio_renderer_sink_cache.h"
9 9
10 #include <vector> 10 #include <vector>
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 // sink is deleted only if unused. 63 // sink is deleted only if unused.
64 void DeleteSink(const media::AudioRendererSink* sink_ptr, 64 void DeleteSink(const media::AudioRendererSink* sink_ptr,
65 bool force_delete_used); 65 bool force_delete_used);
66 66
67 CacheContainer::iterator FindCacheEntry_Locked( 67 CacheContainer::iterator FindCacheEntry_Locked(
68 int source_render_frame_id, 68 int source_render_frame_id,
69 const std::string& device_id, 69 const std::string& device_id,
70 const url::Origin& security_origin, 70 const url::Origin& security_origin,
71 bool unused_only); 71 bool unused_only);
72 72
73 void CacheUnusedSinkIfHealthy(int source_render_frame_id,
74 const std::string& device_id,
75 const url::Origin& security_origin,
76 scoped_refptr<media::AudioRendererSink> sink);
77
73 // To avoid publishing CacheEntry structure in the header. 78 // To avoid publishing CacheEntry structure in the header.
74 int GetCacheSizeForTesting(); 79 int GetCacheSizeForTesting();
75 80
76 // Task runner for scheduled sink garbage collection. 81 // Task runner for scheduled sink garbage collection.
77 const scoped_refptr<base::SingleThreadTaskRunner> task_runner_; 82 const scoped_refptr<base::SingleThreadTaskRunner> task_runner_;
78 83
79 // Callback used for sink creation. 84 // Callback used for sink creation.
80 const CreateSinkCallback create_sink_cb_; 85 const CreateSinkCallback create_sink_cb_;
81 86
82 // Cached sink deletion timeout. 87 // Cached sink deletion timeout.
(...skipping 18 matching lines...) Expand all
101 106
102 // Used to produce |weak_this_| on AudioRendererSinkCacheImpl construction. 107 // Used to produce |weak_this_| on AudioRendererSinkCacheImpl construction.
103 base::WeakPtrFactory<AudioRendererSinkCacheImpl> weak_ptr_factory_; 108 base::WeakPtrFactory<AudioRendererSinkCacheImpl> weak_ptr_factory_;
104 109
105 DISALLOW_COPY_AND_ASSIGN(AudioRendererSinkCacheImpl); 110 DISALLOW_COPY_AND_ASSIGN(AudioRendererSinkCacheImpl);
106 }; 111 };
107 112
108 } // namespace content 113 } // namespace content
109 114
110 #endif // CONTENT_RENDERER_MEDIA_AUDIO_RENDERER_SINK_CACHE_IMPL_H_ 115 #endif // CONTENT_RENDERER_MEDIA_AUDIO_RENDERER_SINK_CACHE_IMPL_H_
OLDNEW
« no previous file with comments | « no previous file | content/renderer/media/audio_renderer_sink_cache_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698