Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011 Ericsson AB. All rights reserved. | 2 * Copyright (C) 2011 Ericsson AB. All rights reserved. |
| 3 * Copyright (C) 2012 Google Inc. All rights reserved. | 3 * Copyright (C) 2012 Google Inc. All rights reserved. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
| 7 * are met: | 7 * are met: |
| 8 * | 8 * |
| 9 * 1. Redistributions of source code must retain the above copyright | 9 * 1. Redistributions of source code must retain the above copyright |
| 10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
| (...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 118 { | 118 { |
| 119 return m_video; | 119 return m_video; |
| 120 } | 120 } |
| 121 | 121 |
| 122 bool UserMediaRequest::isSecureContextUse(String& errorMessage) | 122 bool UserMediaRequest::isSecureContextUse(String& errorMessage) |
| 123 { | 123 { |
| 124 Document* document = ownerDocument(); | 124 Document* document = ownerDocument(); |
| 125 | 125 |
| 126 if (document->isSecureContext(errorMessage)) { | 126 if (document->isSecureContext(errorMessage)) { |
| 127 UseCounter::count(document->frame(), UseCounter::GetUserMediaSecureOrigi n); | 127 UseCounter::count(document->frame(), UseCounter::GetUserMediaSecureOrigi n); |
| 128 UseCounter::countCrossOriginIframe(*document, UseCounter::GetUserMediaSe cureOriginIframe); | |
|
mlamouri (slow - plz ping)
2016/01/19 17:54:48
Should you add a GetUserMediaInsecureOriginIframe
raymes
2016/01/20 00:13:12
It's not very useful (for us at least) because it
mlamouri (slow - plz ping)
2016/01/21 13:53:18
You do it for geolocation. I think you should do i
raymes
2016/01/27 06:57:51
Done.
| |
| 128 OriginsUsingFeatures::countAnyWorld(*document, OriginsUsingFeatures::Fea ture::GetUserMediaSecureOrigin); | 129 OriginsUsingFeatures::countAnyWorld(*document, OriginsUsingFeatures::Fea ture::GetUserMediaSecureOrigin); |
| 129 return true; | 130 return true; |
| 130 } | 131 } |
| 131 | 132 |
| 132 // While getUserMedia is blocked on insecure origins, we still want to | 133 // While getUserMedia is blocked on insecure origins, we still want to |
| 133 // count attempts to use it. | 134 // count attempts to use it. |
| 134 UseCounter::countDeprecation(document->frame(), UseCounter::GetUserMediaInse cureOrigin); | 135 UseCounter::countDeprecation(document->frame(), UseCounter::GetUserMediaInse cureOrigin); |
| 135 OriginsUsingFeatures::countAnyWorld(*document, OriginsUsingFeatures::Feature ::GetUserMediaInsecureOrigin); | 136 OriginsUsingFeatures::countAnyWorld(*document, OriginsUsingFeatures::Feature ::GetUserMediaInsecureOrigin); |
| 136 return false; | 137 return false; |
| 137 } | 138 } |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 206 | 207 |
| 207 DEFINE_TRACE(UserMediaRequest) | 208 DEFINE_TRACE(UserMediaRequest) |
| 208 { | 209 { |
| 209 visitor->trace(m_controller); | 210 visitor->trace(m_controller); |
| 210 visitor->trace(m_successCallback); | 211 visitor->trace(m_successCallback); |
| 211 visitor->trace(m_errorCallback); | 212 visitor->trace(m_errorCallback); |
| 212 ContextLifecycleObserver::trace(visitor); | 213 ContextLifecycleObserver::trace(visitor); |
| 213 } | 214 } |
| 214 | 215 |
| 215 } // namespace blink | 216 } // namespace blink |
| OLD | NEW |