| 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" |
| 11 #include "core/frame/LocalFrame.h" | 11 #include "core/frame/LocalFrame.h" |
| 12 #include "core/inspector/ConsoleMessage.h" | 12 #include "core/inspector/ConsoleMessage.h" |
| 13 #include "core/workers/WorkerOrWorkletGlobalScope.h" | 13 #include "core/workers/WorkerOrWorkletGlobalScope.h" |
| 14 | 14 |
| 15 namespace { | 15 namespace { |
| 16 | 16 |
| 17 enum Milestone { | 17 enum Milestone { |
| 18 M56, | 18 M56, |
| 19 M57, | 19 M57, |
| 20 M58, | 20 M58, |
| 21 M59, | 21 M59, |
| 22 M60, |
| 22 }; | 23 }; |
| 23 | 24 |
| 24 const char* milestoneString(Milestone milestone) { | 25 const char* milestoneString(Milestone milestone) { |
| 25 // These are the Estimated Stable Dates: | 26 // These are the Estimated Stable Dates: |
| 26 // https://www.chromium.org/developers/calendar | 27 // https://www.chromium.org/developers/calendar |
| 27 | 28 |
| 28 switch (milestone) { | 29 switch (milestone) { |
| 29 case M56: | 30 case M56: |
| 30 return "M56, around January 2017"; | 31 return "M56, around January 2017"; |
| 31 case M57: | 32 case M57: |
| 32 return "M57, around March 2017"; | 33 return "M57, around March 2017"; |
| 33 case M58: | 34 case M58: |
| 34 return "M58, around April 2017"; | 35 return "M58, around April 2017"; |
| 35 case M59: | 36 case M59: |
| 36 return "M59, around June 2017"; | 37 return "M59, around June 2017"; |
| 38 case M60: |
| 39 return "M60, around August 2017"; |
| 37 } | 40 } |
| 38 | 41 |
| 39 ASSERT_NOT_REACHED(); | 42 ASSERT_NOT_REACHED(); |
| 40 return nullptr; | 43 return nullptr; |
| 41 } | 44 } |
| 42 | 45 |
| 43 String replacedBy(const char* feature, const char* replacement) { | 46 String replacedBy(const char* feature, const char* replacement) { |
| 44 return String::format("%s is deprecated. Please use %s instead.", feature, | 47 return String::format("%s is deprecated. Please use %s instead.", feature, |
| 45 replacement); | 48 replacement); |
| 46 } | 49 } |
| (...skipping 401 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 448 "for more details.", | 451 "for more details.", |
| 449 milestoneString(M60)); | 452 milestoneString(M60)); |
| 450 | 453 |
| 451 // Features that aren't deprecated don't have a deprecation message. | 454 // Features that aren't deprecated don't have a deprecation message. |
| 452 default: | 455 default: |
| 453 return String(); | 456 return String(); |
| 454 } | 457 } |
| 455 } | 458 } |
| 456 | 459 |
| 457 } // namespace blink | 460 } // namespace blink |
| OLD | NEW |