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

Side by Side Diff: third_party/WebKit/Source/core/frame/Deprecation.cpp

Issue 1745103002: Renew deprecation messages for Web Audio doppler effects (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove cruft Created 4 years, 9 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 // 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 12 matching lines...) Expand all
23 case 50: 23 case 50:
24 return "M50, around April 2016"; 24 return "M50, around April 2016";
25 case 51: 25 case 51:
26 return "M51, around May 2016"; 26 return "M51, around May 2016";
27 case 52: 27 case 52:
28 return "M52, around July 2016"; 28 return "M52, around July 2016";
29 case 53: 29 case 53:
30 return "M53, around September 2016"; 30 return "M53, around September 2016";
31 case 54: 31 case 54:
32 return "M54, around October 2016"; 32 return "M54, around October 2016";
33 case 55:
34 return "M55, around November 2016";
33 } 35 }
34 36
35 ASSERT_NOT_REACHED(); 37 ASSERT_NOT_REACHED();
36 return nullptr; 38 return nullptr;
37 } 39 }
38 40
39 String replacedBy(const char* feature, const char* replacement) 41 String replacedBy(const char* feature, const char* replacement)
40 { 42 {
41 return String::format("%s is deprecated. Please use %s instead.", feature, r eplacement); 43 return String::format("%s is deprecated. Please use %s instead.", feature, r eplacement);
42 } 44 }
43 45
44 String willBeRemoved(const char* feature, int milestone, const char* details) 46 String willBeRemoved(const char* feature, int milestone, const char* details)
45 { 47 {
46 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); 48 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);
47 } 49 }
48 50
51 String dopplerWillBeRemoved(const char* feature, int milestone, const char* deta ils)
52 {
53 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);
54 }
55
49 String replacedWillBeRemoved(const char* feature, const char* replacement, int m ilestone, const char* details) 56 String replacedWillBeRemoved(const char* feature, const char* replacement, int m ilestone, const char* details)
50 { 57 {
51 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); 58 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);
52 } 59 }
53 60
54 } // anonymous namespace 61 } // anonymous namespace
55 62
56 namespace blink { 63 namespace blink {
57 64
58 Deprecation::Deprecation() 65 Deprecation::Deprecation()
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
229 case UseCounter::XMLHttpRequestSynchronousInNonWorkerOutsideBeforeUnload: 236 case UseCounter::XMLHttpRequestSynchronousInNonWorkerOutsideBeforeUnload:
230 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/."; 237 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/.";
231 238
232 case UseCounter::GetMatchedCSSRules: 239 case UseCounter::GetMatchedCSSRules:
233 return "'getMatchedCSSRules()' is deprecated. For more help, check https ://code.google.com/p/chromium/issues/detail?id=437569#c2"; 240 return "'getMatchedCSSRules()' is deprecated. For more help, check https ://code.google.com/p/chromium/issues/detail?id=437569#c2";
234 241
235 case UseCounter::PrefixedImageSmoothingEnabled: 242 case UseCounter::PrefixedImageSmoothingEnabled:
236 return replacedBy("'CanvasRenderingContext2D.webkitImageSmoothingEnabled '", "'CanvasRenderingContext2D.imageSmoothingEnabled'"); 243 return replacedBy("'CanvasRenderingContext2D.webkitImageSmoothingEnabled '", "'CanvasRenderingContext2D.imageSmoothingEnabled'");
237 244
238 case UseCounter::AudioListenerDopplerFactor: 245 case UseCounter::AudioListenerDopplerFactor:
239 return "dopplerFactor is deprecated and will be removed in M45 when all doppler effects are removed"; 246 return dopplerWillBeRemoved("'AudioListener.dopplerFactor'", 55, "523892 6818148352");
240 247
241 case UseCounter::AudioListenerSpeedOfSound: 248 case UseCounter::AudioListenerSpeedOfSound:
242 return "speedOfSound is deprecated and will be removed in M45 when all d oppler effects are removed"; 249 return dopplerWillBeRemoved("'AudioListener.speedOfSound'", 55, "5238926 818148352");
243 250
244 case UseCounter::AudioListenerSetVelocity: 251 case UseCounter::AudioListenerSetVelocity:
245 return "setVelocity() is deprecated and will be removed in M45 when all doppler effects are removed"; 252 return dopplerWillBeRemoved("'AudioListener.setVelocity()'", 55, "523892 6818148352");
253
254 case UseCounter::PannerNodeSetVelocity:
255 return dopplerWillBeRemoved("'PannerNode.setVelocity()'", 55, "523892681 8148352");
246 256
247 case UseCounter::PrefixedWindowURL: 257 case UseCounter::PrefixedWindowURL:
248 return replacedBy("'webkitURL'", "'URL'"); 258 return replacedBy("'webkitURL'", "'URL'");
249 259
250 case UseCounter::PrefixedAudioContext: 260 case UseCounter::PrefixedAudioContext:
251 return replacedBy("'webkitAudioContext'", "'AudioContext'"); 261 return replacedBy("'webkitAudioContext'", "'AudioContext'");
252 262
253 case UseCounter::PrefixedOfflineAudioContext: 263 case UseCounter::PrefixedOfflineAudioContext:
254 return replacedBy("'webkitOfflineAudioContext'", "'OfflineAudioContext'" ); 264 return replacedBy("'webkitOfflineAudioContext'", "'OfflineAudioContext'" );
255 265
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
347 case UseCounter::ResultsAttribute: 357 case UseCounter::ResultsAttribute:
348 return willBeRemoved("'results' attribute", 53, "5738199536107520"); 358 return willBeRemoved("'results' attribute", 53, "5738199536107520");
349 359
350 // Features that aren't deprecated don't have a deprecation message. 360 // Features that aren't deprecated don't have a deprecation message.
351 default: 361 default:
352 return String(); 362 return String();
353 } 363 }
354 } 364 }
355 365
356 } // namespace blink 366 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698