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

Unified Diff: Source/core/page/PageConsole.h

Issue 14320022: Warn developers about deprecated features only once per page-load. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: OwnPtr<BitVector> -> BitVector Created 7 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/page/ContentSecurityPolicy.cpp ('k') | Source/core/page/PageConsole.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/page/PageConsole.h
diff --git a/Source/core/page/PageConsole.h b/Source/core/page/PageConsole.h
index 5fb29045bd35df976ebc4576dbce20a1ebf44b65..a26c4432853cf497376197d43810b1201298a612 100644
--- a/Source/core/page/PageConsole.h
+++ b/Source/core/page/PageConsole.h
@@ -32,6 +32,7 @@
#include "ConsoleTypes.h"
#include "ScriptCallStack.h"
#include "ScriptState.h"
+#include <wtf/BitVector.h>
#include <wtf/Forward.h>
#include <wtf/PassOwnPtr.h>
@@ -42,6 +43,13 @@ class Page;
class PageConsole {
public:
+ enum DeprecatedFeature {
+ PrefixedContentSecurityPolicyHeader,
+
+ // Add newly deprecated features above this line.
+ NumberOfFeatures, // Sentinel.
+ };
+
static PassOwnPtr<PageConsole> create(Page* page) { return adoptPtr(new PageConsole(page)); }
virtual ~PageConsole();
@@ -49,15 +57,20 @@ public:
void addMessage(MessageSource, MessageLevel, const String& message, PassRefPtr<ScriptCallStack>);
void addMessage(MessageSource, MessageLevel, const String& message, unsigned long requestIdentifier = 0, Document* = 0);
+ static void reportDeprecation(Document*, DeprecatedFeature);
+
static void mute();
static void unmute();
private:
PageConsole(Page*);
+ void addDeprecationMessage(DeprecatedFeature);
+
Page* page() { return m_page; };
Page* m_page;
+ BitVector m_deprecationNotifications;
};
} // namespace WebCore
« no previous file with comments | « Source/core/page/ContentSecurityPolicy.cpp ('k') | Source/core/page/PageConsole.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698