Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "core/frame/Deprecation.h" | 5 #include "core/frame/Deprecation.h" |
| 6 | 6 |
| 7 #include "core/dom/Document.h" | 7 #include "core/dom/Document.h" |
| 8 #include "core/dom/ExecutionContext.h" | 8 #include "core/dom/ExecutionContext.h" |
| 9 #include "core/frame/FrameConsole.h" | 9 #include "core/frame/FrameConsole.h" |
| 10 #include "core/frame/LocalFrame.h" | 10 #include "core/frame/LocalFrame.h" |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 63 String replacedWillBeRemoved(const char* feature, | 63 String replacedWillBeRemoved(const char* feature, |
| 64 const char* replacement, | 64 const char* replacement, |
| 65 Milestone milestone, | 65 Milestone milestone, |
| 66 const char* details) { | 66 const char* details) { |
| 67 return String::Format( | 67 return String::Format( |
| 68 "%s is deprecated and will be removed in %s. Please use %s instead. See " | 68 "%s is deprecated and will be removed in %s. Please use %s instead. See " |
| 69 "https://www.chromestatus.com/features/%s for more details.", | 69 "https://www.chromestatus.com/features/%s for more details.", |
| 70 feature, milestoneString(milestone), replacement, details); | 70 feature, milestoneString(milestone), replacement, details); |
| 71 } | 71 } |
| 72 | 72 |
| 73 String iframePermissionsWarning(const char* function, Milestone milestone) { | |
| 74 return String::Format( | |
| 75 "%s usage in cross-origin iframes is deprecated and will be disabled in " | |
| 76 "%s. To continue to use this feature, it must be enabled by the " | |
| 77 "embedding document using Feature Policy. See https://goo.gl/EuHzyv for " | |
| 78 "more details.", | |
| 79 function, milestoneString(milestone)); | |
| 80 } | |
| 81 | |
| 73 } // anonymous namespace | 82 } // anonymous namespace |
| 74 | 83 |
| 75 namespace blink { | 84 namespace blink { |
| 76 | 85 |
| 77 Deprecation::Deprecation() : mute_count_(0) { | 86 Deprecation::Deprecation() : mute_count_(0) { |
| 78 css_property_deprecation_bits_.EnsureSize(numCSSPropertyIDs); | 87 css_property_deprecation_bits_.EnsureSize(numCSSPropertyIDs); |
| 79 } | 88 } |
| 80 | 89 |
| 81 Deprecation::~Deprecation() {} | 90 Deprecation::~Deprecation() {} |
| 82 | 91 |
| (...skipping 359 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 442 case WebFeature::kDeprecatedTimingFunctionStepMiddle: | 451 case WebFeature::kDeprecatedTimingFunctionStepMiddle: |
| 443 return replacedWillBeRemoved( | 452 return replacedWillBeRemoved( |
| 444 "The step timing function with step position 'middle'", | 453 "The step timing function with step position 'middle'", |
| 445 "the frames timing function", M62, "5189363944128512"); | 454 "the frames timing function", M62, "5189363944128512"); |
| 446 case WebFeature::kHTMLImportsHasStyleSheets: | 455 case WebFeature::kHTMLImportsHasStyleSheets: |
| 447 return String::Format( | 456 return String::Format( |
| 448 "Styling master document from stylesheets defined in HTML Imports " | 457 "Styling master document from stylesheets defined in HTML Imports " |
| 449 "is deprecated, and is planned to be removed in %s. Please refer to " | 458 "is deprecated, and is planned to be removed in %s. Please refer to " |
| 450 "https://goo.gl/EGXzpw for possible migration paths.", | 459 "https://goo.gl/EGXzpw for possible migration paths.", |
| 451 milestoneString(M65)); | 460 milestoneString(M65)); |
| 461 case WebFeature::kEncryptedMediaDisabledIframe: | |
| 462 return iframePermissionsWarning("requestMediaKeySystemAccess", M62); | |
|
iclelland
2017/06/22 15:12:48
Should the interfaces in these messages be qualifi
raymes
2017/07/05 01:04:25
Yeah I thought about that. Some things don't seem
iclelland
2017/07/05 04:41:22
Sounds good as long as there's no ambiguity there.
| |
| 463 case WebFeature::kGeolocationDisabledIframe: | |
| 464 return iframePermissionsWarning("getCurrentPosition and watchPosition", M6 2); | |
| 465 case WebFeature::kGetUserMediaDisabledIframe: | |
| 466 return iframePermissionsWarning("getUserMedia", M62); | |
| 467 case WebFeature::kRequestMIDIAccessDisabledIframe: | |
| 468 return iframePermissionsWarning("requestMIDIAccess", M62); | |
| 452 | 469 |
| 453 // Features that aren't deprecated don't have a deprecation message. | 470 // Features that aren't deprecated don't have a deprecation message. |
| 454 default: | 471 default: |
| 455 return String(); | 472 return String(); |
| 456 } | 473 } |
| 457 } | 474 } |
| 458 | 475 |
| 459 } // namespace blink | 476 } // namespace blink |
| OLD | NEW |