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

Side by Side Diff: third_party/WebKit/Source/modules/mediastream/UserMediaRequest.cpp

Issue 2945223002: Add deprecation warnings for permission API usage from iframes (Closed)
Patch Set: Depreaction warnings Created 3 years, 6 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 /* 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
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698