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 #include "content/renderer/media/render_media_client.h" | 5 #include "content/renderer/media/render_media_client.h" |
6 | 6 |
7 #include "base/lazy_instance.h" | 7 #include "base/lazy_instance.h" |
8 #include "base/logging.h" | 8 #include "base/logging.h" |
9 #include "base/time/default_tick_clock.h" | 9 #include "base/time/default_tick_clock.h" |
10 #include "content/public/common/content_client.h" | 10 #include "content/public/common/content_client.h" |
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
108 case media::kCodecMPEG2: | 108 case media::kCodecMPEG2: |
109 case media::kCodecMPEG4: | 109 case media::kCodecMPEG4: |
110 case media::kCodecHEVC: | 110 case media::kCodecHEVC: |
111 return false; | 111 return false; |
112 } | 112 } |
113 | 113 |
114 NOTREACHED(); | 114 NOTREACHED(); |
115 return false; | 115 return false; |
116 } | 116 } |
117 | 117 |
| 118 bool RenderMediaClient::IsSupportedPassthroughAudio(::media::AudioCodec codec) { |
| 119 return false; |
| 120 } |
| 121 |
118 void RenderMediaClient::SetTickClockForTesting( | 122 void RenderMediaClient::SetTickClockForTesting( |
119 std::unique_ptr<base::TickClock> tick_clock) { | 123 std::unique_ptr<base::TickClock> tick_clock) { |
120 tick_clock_.swap(tick_clock); | 124 tick_clock_.swap(tick_clock); |
121 } | 125 } |
122 | 126 |
123 // This functions is for testing purpose only. The declaration in the | 127 // This functions is for testing purpose only. The declaration in the |
124 // header file is guarded by "#if defined(UNIT_TEST)" so that it can be used | 128 // header file is guarded by "#if defined(UNIT_TEST)" so that it can be used |
125 // by tests but not non-test code. However, this .cc file is compiled as part of | 129 // by tests but not non-test code. However, this .cc file is compiled as part of |
126 // "content" where "UNIT_TEST" is not defined. So we need to specify | 130 // "content" where "UNIT_TEST" is not defined. So we need to specify |
127 // "CONTENT_EXPORT" here again so that it is visible to tests. | 131 // "CONTENT_EXPORT" here again so that it is visible to tests. |
128 CONTENT_EXPORT RenderMediaClient* GetRenderMediaClientInstanceForTesting() { | 132 CONTENT_EXPORT RenderMediaClient* GetRenderMediaClientInstanceForTesting() { |
129 return g_render_media_client.Pointer(); | 133 return g_render_media_client.Pointer(); |
130 } | 134 } |
131 | 135 |
132 } // namespace content | 136 } // namespace content |
OLD | NEW |