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); |
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); |
| 136 UseCounter::countCrossOriginIframe(*document, UseCounter::GetUserMediaInsecu
reOriginIframe); |
135 OriginsUsingFeatures::countAnyWorld(*document, OriginsUsingFeatures::Feature
::GetUserMediaInsecureOrigin); | 137 OriginsUsingFeatures::countAnyWorld(*document, OriginsUsingFeatures::Feature
::GetUserMediaInsecureOrigin); |
136 return false; | 138 return false; |
137 } | 139 } |
138 | 140 |
139 Document* UserMediaRequest::ownerDocument() | 141 Document* UserMediaRequest::ownerDocument() |
140 { | 142 { |
141 if (ExecutionContext* context = executionContext()) { | 143 if (ExecutionContext* context = executionContext()) { |
142 return toDocument(context); | 144 return toDocument(context); |
143 } | 145 } |
144 | 146 |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
206 | 208 |
207 DEFINE_TRACE(UserMediaRequest) | 209 DEFINE_TRACE(UserMediaRequest) |
208 { | 210 { |
209 visitor->trace(m_controller); | 211 visitor->trace(m_controller); |
210 visitor->trace(m_successCallback); | 212 visitor->trace(m_successCallback); |
211 visitor->trace(m_errorCallback); | 213 visitor->trace(m_errorCallback); |
212 ContextLifecycleObserver::trace(visitor); | 214 ContextLifecycleObserver::trace(visitor); |
213 } | 215 } |
214 | 216 |
215 } // namespace blink | 217 } // namespace blink |
OLD | NEW |