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

Side by Side Diff: media/blink/webmediaplayer_util.cc

Issue 1712903002: Remove prefixed EME. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix isRenewalMessage() in browser tests. Created 4 years, 10 months 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 | « media/blink/webmediaplayer_util.h ('k') | media/cdm/proxy_decryptor.h » ('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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "media/blink/webmediaplayer_util.h" 5 #include "media/blink/webmediaplayer_util.h"
6 6
7 #include <math.h> 7 #include <math.h>
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <string> 9 #include <string>
10 #include <utility> 10 #include <utility>
11 11
12 #include "base/metrics/histogram.h" 12 #include "base/metrics/histogram.h"
13 #include "media/base/bind_to_current_loop.h" 13 #include "media/base/bind_to_current_loop.h"
14 #include "media/base/media_client.h" 14 #include "media/base/media_client.h"
15 #include "media/base/media_keys.h"
16 #include "third_party/WebKit/public/platform/WebMediaPlayerEncryptedMediaClient. h" 15 #include "third_party/WebKit/public/platform/WebMediaPlayerEncryptedMediaClient. h"
17 16
18 namespace media { 17 namespace media {
19 18
20 // Compile asserts shared by all platforms.
21
22 #define STATIC_ASSERT_MATCHING_ENUM(name) \
23 static_assert(static_cast<int>(blink::WebMediaPlayerEncryptedMediaClient:: \
24 MediaKeyErrorCode##name) == \
25 static_cast<int>(MediaKeys::k##name##Error), \
26 "mismatching enum values: " #name)
27 STATIC_ASSERT_MATCHING_ENUM(Unknown);
28 STATIC_ASSERT_MATCHING_ENUM(Client);
29 #undef STATIC_ASSERT_MATCHING_ENUM
30
31 blink::WebTimeRanges ConvertToWebTimeRanges( 19 blink::WebTimeRanges ConvertToWebTimeRanges(
32 const Ranges<base::TimeDelta>& ranges) { 20 const Ranges<base::TimeDelta>& ranges) {
33 blink::WebTimeRanges result(ranges.size()); 21 blink::WebTimeRanges result(ranges.size());
34 for (size_t i = 0; i < ranges.size(); ++i) { 22 for (size_t i = 0; i < ranges.size(); ++i) {
35 result[i].start = ranges.start(i).InSecondsF(); 23 result[i].start = ranges.start(i).InSecondsF();
36 result[i].end = ranges.end(i).InSecondsF(); 24 result[i].end = ranges.end(i).InSecondsF();
37 } 25 }
38 return result; 26 return result;
39 } 27 }
40 28
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after
236 224
237 } // namespace 225 } // namespace
238 226
239 SwitchOutputDeviceCB ConvertToSwitchOutputDeviceCB( 227 SwitchOutputDeviceCB ConvertToSwitchOutputDeviceCB(
240 blink::WebSetSinkIdCallbacks* web_callbacks) { 228 blink::WebSetSinkIdCallbacks* web_callbacks) {
241 return media::BindToCurrentLoop( 229 return media::BindToCurrentLoop(
242 base::Bind(RunSetSinkIdCallback, SetSinkIdCallback(web_callbacks))); 230 base::Bind(RunSetSinkIdCallback, SetSinkIdCallback(web_callbacks)));
243 } 231 }
244 232
245 } // namespace media 233 } // namespace media
OLDNEW
« no previous file with comments | « media/blink/webmediaplayer_util.h ('k') | media/cdm/proxy_decryptor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698