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

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

Issue 1723753002: Make Document::isSecureContext() work for OOPIFs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: more rebase fixups Created 4 years, 9 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
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>
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 // Report the origin from where the media player is created. 125 // Report the origin from where the media player is created.
126 if (GetMediaClient()) { 126 if (GetMediaClient()) {
127 GURL security_origin_url( 127 GURL security_origin_url(
128 blink::WebStringToGURL(security_origin.toString())); 128 blink::WebStringToGURL(security_origin.toString()));
129 129
130 GetMediaClient()->RecordRapporURL( 130 GetMediaClient()->RecordRapporURL(
131 "Media.OriginUrl." + LoadTypeToString(load_type), security_origin_url); 131 "Media.OriginUrl." + LoadTypeToString(load_type), security_origin_url);
132 132
133 // For MSE, also report usage by secure/insecure origin. 133 // For MSE, also report usage by secure/insecure origin.
134 if (load_type == blink::WebMediaPlayer::LoadTypeMediaSource) { 134 if (load_type == blink::WebMediaPlayer::LoadTypeMediaSource) {
135 blink::WebString error_message; 135 if (security_origin.isPotentiallyTrustworthy()) {
136 if (security_origin.isPotentiallyTrustworthy(error_message)) {
137 GetMediaClient()->RecordRapporURL("Media.OriginUrl.MSE.Secure", 136 GetMediaClient()->RecordRapporURL("Media.OriginUrl.MSE.Secure",
138 security_origin_url); 137 security_origin_url);
139 } else { 138 } else {
140 GetMediaClient()->RecordRapporURL("Media.OriginUrl.MSE.Insecure", 139 GetMediaClient()->RecordRapporURL("Media.OriginUrl.MSE.Insecure",
141 security_origin_url); 140 security_origin_url);
142 } 141 }
143 } 142 }
144 } 143 }
145 } 144 }
146 145
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
240 239
241 } // namespace 240 } // namespace
242 241
243 SwitchOutputDeviceCB ConvertToSwitchOutputDeviceCB( 242 SwitchOutputDeviceCB ConvertToSwitchOutputDeviceCB(
244 blink::WebSetSinkIdCallbacks* web_callbacks) { 243 blink::WebSetSinkIdCallbacks* web_callbacks) {
245 return media::BindToCurrentLoop( 244 return media::BindToCurrentLoop(
246 base::Bind(RunSetSinkIdCallback, SetSinkIdCallback(web_callbacks))); 245 base::Bind(RunSetSinkIdCallback, SetSinkIdCallback(web_callbacks)));
247 } 246 }
248 247
249 } // namespace media 248 } // namespace media
OLDNEW
« no previous file with comments | « media/blink/webencryptedmediaclient_impl.cc ('k') | third_party/WebKit/LayoutTests/FlagExpectations/site-per-process » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698