| 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/command_line.h" | 7 #include "base/command_line.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 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 86 #else | 86 #else |
| 87 is_update_needed_ = false; | 87 is_update_needed_ = false; |
| 88 #endif | 88 #endif |
| 89 } | 89 } |
| 90 | 90 |
| 91 void RenderMediaClient::RecordRapporURL(const std::string& metric, | 91 void RenderMediaClient::RecordRapporURL(const std::string& metric, |
| 92 const GURL& url) { | 92 const GURL& url) { |
| 93 GetContentClient()->renderer()->RecordRapporURL(metric, url); | 93 GetContentClient()->renderer()->RecordRapporURL(metric, url); |
| 94 } | 94 } |
| 95 | 95 |
| 96 bool RenderMediaClient::IsSupportedAudioConfig( |
| 97 const media::AudioConfig& config) { |
| 98 // Render media client does not customize decoder support. Defer to media/. |
| 99 return ::media::IsSupportedAudioConfig(config); |
| 100 } |
| 101 |
| 96 bool RenderMediaClient::IsSupportedVideoConfig( | 102 bool RenderMediaClient::IsSupportedVideoConfig( |
| 97 const media::VideoConfig& config) { | 103 const media::VideoConfig& config) { |
| 98 // Render media client does not customize decoder support. Defer to media/. | 104 // Render media client does not customize decoder support. Defer to media/. |
| 99 return ::media::IsSupportedVideoConfig(config); | 105 return ::media::IsSupportedVideoConfig(config); |
| 100 } | 106 } |
| 101 | 107 |
| 102 void RenderMediaClient::SetTickClockForTesting( | 108 void RenderMediaClient::SetTickClockForTesting( |
| 103 std::unique_ptr<base::TickClock> tick_clock) { | 109 std::unique_ptr<base::TickClock> tick_clock) { |
| 104 tick_clock_.swap(tick_clock); | 110 tick_clock_.swap(tick_clock); |
| 105 } | 111 } |
| 106 | 112 |
| 107 // static | 113 // static |
| 108 RenderMediaClient* RenderMediaClient::GetInstance() { | 114 RenderMediaClient* RenderMediaClient::GetInstance() { |
| 109 static RenderMediaClient* client = new RenderMediaClient(); | 115 static RenderMediaClient* client = new RenderMediaClient(); |
| 110 return client; | 116 return client; |
| 111 } | 117 } |
| 112 | 118 |
| 113 } // namespace content | 119 } // namespace content |
| OLD | NEW |