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 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
110 WebMediaConstraints UserMediaRequest::audioConstraints() const | 110 WebMediaConstraints UserMediaRequest::audioConstraints() const |
111 { | 111 { |
112 return m_audio; | 112 return m_audio; |
113 } | 113 } |
114 | 114 |
115 WebMediaConstraints UserMediaRequest::videoConstraints() const | 115 WebMediaConstraints UserMediaRequest::videoConstraints() const |
116 { | 116 { |
117 return m_video; | 117 return m_video; |
118 } | 118 } |
119 | 119 |
120 bool UserMediaRequest::isPrivilegedContextUse(String& errorMessage) | 120 bool UserMediaRequest::isSecureContextUse(String& errorMessage) |
121 { | 121 { |
122 Document* document = ownerDocument(); | 122 Document* document = ownerDocument(); |
123 | 123 |
124 if (document->isPrivilegedContext(errorMessage)) { | 124 if (document->isSecureContext(errorMessage)) { |
125 UseCounter::count(document->frame(), UseCounter::GetUserMediaSecureOrigi
n); | 125 UseCounter::count(document->frame(), UseCounter::GetUserMediaSecureOrigi
n); |
126 OriginsUsingFeatures::countAnyWorld(*document, OriginsUsingFeatures::Fea
ture::GetUserMediaSecureOrigin); | 126 OriginsUsingFeatures::countAnyWorld(*document, OriginsUsingFeatures::Fea
ture::GetUserMediaSecureOrigin); |
127 return true; | 127 return true; |
128 } | 128 } |
129 | 129 |
130 // While getUserMedia is blocked on insecure origins, we still want to | 130 // While getUserMedia is blocked on insecure origins, we still want to |
131 // count attempts to use it. | 131 // count attempts to use it. |
132 UseCounter::countDeprecation(document->frame(), UseCounter::GetUserMediaInse
cureOrigin); | 132 UseCounter::countDeprecation(document->frame(), UseCounter::GetUserMediaInse
cureOrigin); |
133 OriginsUsingFeatures::countAnyWorld(*document, OriginsUsingFeatures::Feature
::GetUserMediaInsecureOrigin); | 133 OriginsUsingFeatures::countAnyWorld(*document, OriginsUsingFeatures::Feature
::GetUserMediaInsecureOrigin); |
134 return false; | 134 return false; |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
204 | 204 |
205 DEFINE_TRACE(UserMediaRequest) | 205 DEFINE_TRACE(UserMediaRequest) |
206 { | 206 { |
207 visitor->trace(m_controller); | 207 visitor->trace(m_controller); |
208 visitor->trace(m_successCallback); | 208 visitor->trace(m_successCallback); |
209 visitor->trace(m_errorCallback); | 209 visitor->trace(m_errorCallback); |
210 ContextLifecycleObserver::trace(visitor); | 210 ContextLifecycleObserver::trace(visitor); |
211 } | 211 } |
212 | 212 |
213 } // namespace blink | 213 } // namespace blink |
OLD | NEW |