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 384 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
395 } | 395 } |
396 | 396 |
397 bool UserMediaRequest::IsSecureContextUse(String& error_message) { | 397 bool UserMediaRequest::IsSecureContextUse(String& error_message) { |
398 Document* document = OwnerDocument(); | 398 Document* document = OwnerDocument(); |
399 | 399 |
400 if (document->IsSecureContext(error_message)) { | 400 if (document->IsSecureContext(error_message)) { |
401 UseCounter::Count(document->GetFrame(), | 401 UseCounter::Count(document->GetFrame(), |
402 WebFeature::kGetUserMediaSecureOrigin); | 402 WebFeature::kGetUserMediaSecureOrigin); |
403 UseCounter::CountCrossOriginIframe( | 403 UseCounter::CountCrossOriginIframe( |
404 *document, WebFeature::kGetUserMediaSecureOriginIframe); | 404 *document, WebFeature::kGetUserMediaSecureOriginIframe); |
| 405 Deprecation::CountDeprecationCrossOriginIframe( |
| 406 *document, WebFeature::kGetUserMediaDisabledIframe); |
405 HostsUsingFeatures::CountAnyWorld( | 407 HostsUsingFeatures::CountAnyWorld( |
406 *document, HostsUsingFeatures::Feature::kGetUserMediaSecureHost); | 408 *document, HostsUsingFeatures::Feature::kGetUserMediaSecureHost); |
407 return true; | 409 return true; |
408 } | 410 } |
409 | 411 |
410 // While getUserMedia is blocked on insecure origins, we still want to | 412 // While getUserMedia is blocked on insecure origins, we still want to |
411 // count attempts to use it. | 413 // count attempts to use it. |
412 Deprecation::CountDeprecation(document->GetFrame(), | 414 Deprecation::CountDeprecation(document->GetFrame(), |
413 WebFeature::kGetUserMediaInsecureOrigin); | 415 WebFeature::kGetUserMediaInsecureOrigin); |
414 Deprecation::CountDeprecationCrossOriginIframe( | 416 Deprecation::CountDeprecationCrossOriginIframe( |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
490 } | 492 } |
491 | 493 |
492 DEFINE_TRACE(UserMediaRequest) { | 494 DEFINE_TRACE(UserMediaRequest) { |
493 visitor->Trace(controller_); | 495 visitor->Trace(controller_); |
494 visitor->Trace(success_callback_); | 496 visitor->Trace(success_callback_); |
495 visitor->Trace(error_callback_); | 497 visitor->Trace(error_callback_); |
496 ContextLifecycleObserver::Trace(visitor); | 498 ContextLifecycleObserver::Trace(visitor); |
497 } | 499 } |
498 | 500 |
499 } // namespace blink | 501 } // namespace blink |
OLD | NEW |