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

Unified Diff: third_party/WebKit/Source/core/dom/Document.h

Issue 2468833002: Count visible password fields on a page (Closed)
Patch Set: dcheng comments Created 4 years, 1 month 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
Index: third_party/WebKit/Source/core/dom/Document.h
diff --git a/third_party/WebKit/Source/core/dom/Document.h b/third_party/WebKit/Source/core/dom/Document.h
index 415c23bb464010b985f6085b69ac62fb1e8245da..f5397a41c0991ef5df0f81d78e57cf38b0bf6c4d 100644
--- a/third_party/WebKit/Source/core/dom/Document.h
+++ b/third_party/WebKit/Source/core/dom/Document.h
@@ -1310,6 +1310,13 @@ class CORE_EXPORT Document : public ContainerNode,
void setHasReceivedUserGesture() { m_hasReceivedUserGesture = true; }
bool hasReceivedUserGesture() const { return m_hasReceivedUserGesture; }
+ // Document maintains a counter of visible non-secure password
+ // fields in the page. Used to notify the embedder when all visible
+ // non-secure passwords fields are no longer visible.
+ void incrementPasswordCount();
+ void decrementPasswordCount();
+ unsigned passwordCount() const;
+
protected:
Document(const DocumentInit&, DocumentClassFlags = DefaultDocumentClass);
@@ -1665,6 +1672,8 @@ class CORE_EXPORT Document : public ContainerNode,
WouldLoadReason m_wouldLoadReason;
Member<PropertyRegistry> m_propertyRegistry;
+
+ unsigned m_passwordCount;
};
extern template class CORE_EXTERN_TEMPLATE_EXPORT Supplement<Document>;

Powered by Google App Engine
This is Rietveld 408576698