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

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

Issue 2945223002: Add deprecation warnings for permission API usage from iframes (Closed)
Patch Set: . Created 3 years, 5 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/frame/Deprecation.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #ifndef Deprecation_h 5 #ifndef Deprecation_h
6 #define Deprecation_h 6 #define Deprecation_h
7 7
8 #include "core/CSSPropertyNames.h" 8 #include "core/CSSPropertyNames.h"
9 #include "core/CoreExport.h" 9 #include "core/CoreExport.h"
10 #include "core/frame/UseCounter.h" 10 #include "core/frame/UseCounter.h"
11 #include "platform/wtf/BitVector.h" 11 #include "platform/wtf/BitVector.h"
12 #include "platform/wtf/Noncopyable.h" 12 #include "platform/wtf/Noncopyable.h"
13 13
14 namespace blink { 14 namespace blink {
15 15
16 class LocalFrame; 16 class LocalFrame;
17 enum class WebFeaturePolicyFeature;
17 18
18 class CORE_EXPORT Deprecation { 19 class CORE_EXPORT Deprecation {
19 DISALLOW_NEW(); 20 DISALLOW_NEW();
20 WTF_MAKE_NONCOPYABLE(Deprecation); 21 WTF_MAKE_NONCOPYABLE(Deprecation);
21 22
22 public: 23 public:
23 Deprecation(); 24 Deprecation();
24 ~Deprecation(); 25 ~Deprecation();
25 26
26 static void WarnOnDeprecatedProperties(const LocalFrame*, 27 static void WarnOnDeprecatedProperties(const LocalFrame*,
(...skipping 13 matching lines...) Expand all
40 // For shared workers and service workers, the ExecutionContext* overload 41 // For shared workers and service workers, the ExecutionContext* overload
41 // doesn't count the usage but only sends a console warning. 42 // doesn't count the usage but only sends a console warning.
42 static void CountDeprecation(const LocalFrame*, WebFeature); 43 static void CountDeprecation(const LocalFrame*, WebFeature);
43 static void CountDeprecation(ExecutionContext*, WebFeature); 44 static void CountDeprecation(ExecutionContext*, WebFeature);
44 static void CountDeprecation(const Document&, WebFeature); 45 static void CountDeprecation(const Document&, WebFeature);
45 46
46 // Count only features if they're being used in an iframe which does not 47 // Count only features if they're being used in an iframe which does not
47 // have script access into the top level document. 48 // have script access into the top level document.
48 static void CountDeprecationCrossOriginIframe(const LocalFrame*, WebFeature); 49 static void CountDeprecationCrossOriginIframe(const LocalFrame*, WebFeature);
49 static void CountDeprecationCrossOriginIframe(const Document&, WebFeature); 50 static void CountDeprecationCrossOriginIframe(const Document&, WebFeature);
51
52 static void CountDeprecationFeaturePolicy(const Document&,
53 WebFeaturePolicyFeature);
50 static String DeprecationMessage(WebFeature); 54 static String DeprecationMessage(WebFeature);
51 55
52 // Note: this is only public for tests. 56 // Note: this is only public for tests.
53 bool IsSuppressed(CSSPropertyID unresolved_property); 57 bool IsSuppressed(CSSPropertyID unresolved_property);
54 58
55 protected: 59 protected:
56 void Suppress(CSSPropertyID unresolved_property); 60 void Suppress(CSSPropertyID unresolved_property);
57 // CSSPropertyIDs that aren't deprecated return an empty string. 61 // CSSPropertyIDs that aren't deprecated return an empty string.
58 static String DeprecationMessage(CSSPropertyID unresolved_property); 62 static String DeprecationMessage(CSSPropertyID unresolved_property);
59 63
60 BitVector css_property_deprecation_bits_; 64 BitVector css_property_deprecation_bits_;
61 unsigned mute_count_; 65 unsigned mute_count_;
62 }; 66 };
63 67
64 } // namespace blink 68 } // namespace blink
65 69
66 #endif // Deprecation_h 70 #endif // Deprecation_h
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/frame/Deprecation.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698