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/FrameHost.h" | 10 #include "core/frame/FrameHost.h" |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 48 String willBeRemoved(const char* feature, int milestone, const char* details) | 48 String willBeRemoved(const char* feature, int milestone, const char* details) |
| 49 { | 49 { |
| 50 return String::format("%s is deprecated and will be removed in %s. See https ://www.chromestatus.com/features/%s for more details.", feature, milestoneString (milestone), details); | 50 return String::format("%s is deprecated and will be removed in %s. See https ://www.chromestatus.com/features/%s for more details.", feature, milestoneString (milestone), details); |
| 51 } | 51 } |
| 52 | 52 |
| 53 String dopplerWillBeRemoved(const char* feature, int milestone, const char* deta ils) | 53 String dopplerWillBeRemoved(const char* feature, int milestone, const char* deta ils) |
| 54 { | 54 { |
| 55 return String::format("%s is deprecated and will be removed in %s. It has no effect as the Web Audio doppler effects have already been removed internally. S ee https://www.chromestatus.com/features/%s for more details.", feature, milesto neString(milestone), details); | 55 return String::format("%s is deprecated and will be removed in %s. It has no effect as the Web Audio doppler effects have already been removed internally. S ee https://www.chromestatus.com/features/%s for more details.", feature, milesto neString(milestone), details); |
| 56 } | 56 } |
| 57 | 57 |
| 58 String replacedWillBeRemovedWithoutDetails(const char* feature, const char* repl acement, int milestone) | |
|
foolip
2016/07/12 10:36:26
Can you add a chromestatus.com entry instead? Joe
| |
| 59 { | |
| 60 return String::format("%s is deprecated and will be removed in %s. Please us e %s instead.", feature, milestoneString(milestone), replacement); | |
| 61 } | |
| 62 | |
| 58 String replacedWillBeRemoved(const char* feature, const char* replacement, int m ilestone, const char* details) | 63 String replacedWillBeRemoved(const char* feature, const char* replacement, int m ilestone, const char* details) |
| 59 { | 64 { |
| 60 return String::format("%s is deprecated and will be removed in %s. Please us e %s instead. See https://www.chromestatus.com/features/%s for more details.", f eature, milestoneString(milestone), replacement, details); | 65 return String::format("%s is deprecated and will be removed in %s. Please us e %s instead. See https://www.chromestatus.com/features/%s for more details.", f eature, milestoneString(milestone), replacement, details); |
| 61 } | 66 } |
| 62 | 67 |
| 63 } // anonymous namespace | 68 } // anonymous namespace |
| 64 | 69 |
| 65 namespace blink { | 70 namespace blink { |
| 66 | 71 |
| 67 Deprecation::Deprecation() | 72 Deprecation::Deprecation() |
| (...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 248 case UseCounter::ConsoleTimelineEnd: | 253 case UseCounter::ConsoleTimelineEnd: |
| 249 return replacedBy("'console.timelineEnd'", "'console.timeEnd'"); | 254 return replacedBy("'console.timelineEnd'", "'console.timeEnd'"); |
| 250 | 255 |
| 251 case UseCounter::XMLHttpRequestSynchronousInNonWorkerOutsideBeforeUnload: | 256 case UseCounter::XMLHttpRequestSynchronousInNonWorkerOutsideBeforeUnload: |
| 252 return "Synchronous XMLHttpRequest on the main thread is deprecated beca use of its detrimental effects to the end user's experience. For more help, chec k https://xhr.spec.whatwg.org/."; | 257 return "Synchronous XMLHttpRequest on the main thread is deprecated beca use of its detrimental effects to the end user's experience. For more help, chec k https://xhr.spec.whatwg.org/."; |
| 253 | 258 |
| 254 case UseCounter::GetMatchedCSSRules: | 259 case UseCounter::GetMatchedCSSRules: |
| 255 return "'getMatchedCSSRules()' is deprecated. For more help, check https ://code.google.com/p/chromium/issues/detail?id=437569#c2"; | 260 return "'getMatchedCSSRules()' is deprecated. For more help, check https ://code.google.com/p/chromium/issues/detail?id=437569#c2"; |
| 256 | 261 |
| 257 case UseCounter::PrefixedImageSmoothingEnabled: | 262 case UseCounter::PrefixedImageSmoothingEnabled: |
| 258 return replacedBy("'CanvasRenderingContext2D.webkitImageSmoothingEnabled '", "'CanvasRenderingContext2D.imageSmoothingEnabled'"); | 263 return replacedWillBeRemovedWithoutDetails("'CanvasRenderingContext2D.we bkitImageSmoothingEnabled'", "'CanvasRenderingContext2D.imageSmoothingEnabled'", 55); |
| 259 | 264 |
| 260 case UseCounter::AudioListenerDopplerFactor: | 265 case UseCounter::AudioListenerDopplerFactor: |
| 261 return dopplerWillBeRemoved("'AudioListener.dopplerFactor'", 55, "523892 6818148352"); | 266 return dopplerWillBeRemoved("'AudioListener.dopplerFactor'", 55, "523892 6818148352"); |
| 262 | 267 |
| 263 case UseCounter::AudioListenerSpeedOfSound: | 268 case UseCounter::AudioListenerSpeedOfSound: |
| 264 return dopplerWillBeRemoved("'AudioListener.speedOfSound'", 55, "5238926 818148352"); | 269 return dopplerWillBeRemoved("'AudioListener.speedOfSound'", 55, "5238926 818148352"); |
| 265 | 270 |
| 266 case UseCounter::AudioListenerSetVelocity: | 271 case UseCounter::AudioListenerSetVelocity: |
| 267 return dopplerWillBeRemoved("'AudioListener.setVelocity()'", 55, "523892 6818148352"); | 272 return dopplerWillBeRemoved("'AudioListener.setVelocity()'", 55, "523892 6818148352"); |
| 268 | 273 |
| (...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 388 case UseCounter::MIDIMessageEventReceivedTime: | 393 case UseCounter::MIDIMessageEventReceivedTime: |
| 389 return willBeRemoved("MIDIMessageEvent.receivedTime", 56, "5665772797952 000"); | 394 return willBeRemoved("MIDIMessageEvent.receivedTime", 56, "5665772797952 000"); |
| 390 | 395 |
| 391 // Features that aren't deprecated don't have a deprecation message. | 396 // Features that aren't deprecated don't have a deprecation message. |
| 392 default: | 397 default: |
| 393 return String(); | 398 return String(); |
| 394 } | 399 } |
| 395 } | 400 } |
| 396 | 401 |
| 397 } // namespace blink | 402 } // namespace blink |
| OLD | NEW |