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

Side by Side Diff: third_party/WebKit/Source/core/dom/Document.h

Issue 2535483002: Plumb site engagement to the renderer process. (Closed)
Patch Set: Address comments Created 4 years 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 /* 1 /*
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * (C) 2001 Dirk Mueller (mueller@kde.org) 4 * (C) 2001 Dirk Mueller (mueller@kde.org)
5 * (C) 2006 Alexey Proskuryakov (ap@webkit.org) 5 * (C) 2006 Alexey Proskuryakov (ap@webkit.org)
6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012 Apple Inc. All 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012 Apple Inc. All
7 * rights reserved. 7 * rights reserved.
8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. 8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved.
9 * (http://www.torchmobile.com/) 9 * (http://www.torchmobile.com/)
10 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) 10 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies)
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 #include "core/html/parser/ParserSynchronizationPolicy.h" 56 #include "core/html/parser/ParserSynchronizationPolicy.h"
57 #include "core/page/PageVisibilityState.h" 57 #include "core/page/PageVisibilityState.h"
58 #include "platform/Length.h" 58 #include "platform/Length.h"
59 #include "platform/Timer.h" 59 #include "platform/Timer.h"
60 #include "platform/WebTaskRunner.h" 60 #include "platform/WebTaskRunner.h"
61 #include "platform/scroll/ScrollTypes.h" 61 #include "platform/scroll/ScrollTypes.h"
62 #include "platform/weborigin/KURL.h" 62 #include "platform/weborigin/KURL.h"
63 #include "platform/weborigin/ReferrerPolicy.h" 63 #include "platform/weborigin/ReferrerPolicy.h"
64 #include "public/platform/WebFocusType.h" 64 #include "public/platform/WebFocusType.h"
65 #include "public/platform/WebInsecureRequestPolicy.h" 65 #include "public/platform/WebInsecureRequestPolicy.h"
66 #include "public/platform/site_engagement.mojom-blink.h"
66 #include "wtf/Compiler.h" 67 #include "wtf/Compiler.h"
67 #include "wtf/HashSet.h" 68 #include "wtf/HashSet.h"
68 #include "wtf/PassRefPtr.h" 69 #include "wtf/PassRefPtr.h"
69 #include <memory> 70 #include <memory>
70 71
71 namespace blink { 72 namespace blink {
72 73
73 class AnimationClock; 74 class AnimationClock;
74 class DocumentTimeline; 75 class DocumentTimeline;
75 class AXObjectCache; 76 class AXObjectCache;
(...skipping 1119 matching lines...) Expand 10 before | Expand all | Expand 10 after
1195 return m_topLayerElements; 1196 return m_topLayerElements;
1196 } 1197 }
1197 HTMLDialogElement* activeModalDialog() const; 1198 HTMLDialogElement* activeModalDialog() const;
1198 1199
1199 // A non-null m_templateDocumentHost implies that |this| was created by 1200 // A non-null m_templateDocumentHost implies that |this| was created by
1200 // ensureTemplateDocument(). 1201 // ensureTemplateDocument().
1201 bool isTemplateDocument() const { return !!m_templateDocumentHost; } 1202 bool isTemplateDocument() const { return !!m_templateDocumentHost; }
1202 Document& ensureTemplateDocument(); 1203 Document& ensureTemplateDocument();
1203 Document* templateDocumentHost() { return m_templateDocumentHost; } 1204 Document* templateDocumentHost() { return m_templateDocumentHost; }
1204 1205
1206 mojom::blink::EngagementLevel getEngagementLevel() const {
1207 return m_engagementLevel;
1208 }
1209 void setEngagementLevel(mojom::blink::EngagementLevel level) {
1210 m_engagementLevel = level;
1211 }
1212
1205 // TODO(thestig): Rename these and related functions, since we can call them 1213 // TODO(thestig): Rename these and related functions, since we can call them
1206 // for controls outside of forms as well. 1214 // for controls outside of forms as well.
1207 void didAssociateFormControl(Element*); 1215 void didAssociateFormControl(Element*);
1208 1216
1209 void addConsoleMessage(ConsoleMessage*) final; 1217 void addConsoleMessage(ConsoleMessage*) final;
1210 1218
1211 LocalDOMWindow* executingWindow() const final; 1219 LocalDOMWindow* executingWindow() const final;
1212 LocalFrame* executingFrame(); 1220 LocalFrame* executingFrame();
1213 1221
1214 DocumentLifecycle& lifecycle() { return m_lifecycle; } 1222 DocumentLifecycle& lifecycle() { return m_lifecycle; }
(...skipping 448 matching lines...) Expand 10 before | Expand all | Expand 10 after
1663 1671
1664 Member<SnapCoordinator> m_snapCoordinator; 1672 Member<SnapCoordinator> m_snapCoordinator;
1665 1673
1666 WouldLoadReason m_wouldLoadReason; 1674 WouldLoadReason m_wouldLoadReason;
1667 1675
1668 Member<PropertyRegistry> m_propertyRegistry; 1676 Member<PropertyRegistry> m_propertyRegistry;
1669 1677
1670 unsigned m_passwordCount; 1678 unsigned m_passwordCount;
1671 1679
1672 TaskHandle m_sensitiveInputVisibilityTask; 1680 TaskHandle m_sensitiveInputVisibilityTask;
1681
1682 mojom::EngagementLevel m_engagementLevel;
1673 }; 1683 };
1674 1684
1675 extern template class CORE_EXTERN_TEMPLATE_EXPORT Supplement<Document>; 1685 extern template class CORE_EXTERN_TEMPLATE_EXPORT Supplement<Document>;
1676 1686
1677 inline bool Document::shouldOverrideLegacyDescription( 1687 inline bool Document::shouldOverrideLegacyDescription(
1678 ViewportDescription::Type origin) const { 1688 ViewportDescription::Type origin) const {
1679 // The different (legacy) meta tags have different priorities based on the 1689 // The different (legacy) meta tags have different priorities based on the
1680 // type regardless of which order they appear in the DOM. The priority is 1690 // type regardless of which order they appear in the DOM. The priority is
1681 // given by the ViewportDescription::Type enum. 1691 // given by the ViewportDescription::Type enum.
1682 return origin >= m_legacyViewportDescription.type; 1692 return origin >= m_legacyViewportDescription.type;
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
1717 DEFINE_TYPE_CASTS(TreeScope, Document, document, true, true); 1727 DEFINE_TYPE_CASTS(TreeScope, Document, document, true, true);
1718 1728
1719 } // namespace blink 1729 } // namespace blink
1720 1730
1721 #ifndef NDEBUG 1731 #ifndef NDEBUG
1722 // Outside the WebCore namespace for ease of invocation from gdb. 1732 // Outside the WebCore namespace for ease of invocation from gdb.
1723 CORE_EXPORT void showLiveDocumentInstances(); 1733 CORE_EXPORT void showLiveDocumentInstances();
1724 #endif 1734 #endif
1725 1735
1726 #endif // Document_h 1736 #endif // Document_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698