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

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

Issue 2535483002: Plumb site engagement to the renderer process. (Closed)
Patch Set: Rebase. Fix Win compile 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 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 #include "core/page/PageVisibilityState.h" 57 #include "core/page/PageVisibilityState.h"
58 #include "core/style/ComputedStyle.h" 58 #include "core/style/ComputedStyle.h"
59 #include "platform/Length.h" 59 #include "platform/Length.h"
60 #include "platform/Timer.h" 60 #include "platform/Timer.h"
61 #include "platform/WebTaskRunner.h" 61 #include "platform/WebTaskRunner.h"
62 #include "platform/scroll/ScrollTypes.h" 62 #include "platform/scroll/ScrollTypes.h"
63 #include "platform/weborigin/KURL.h" 63 #include "platform/weborigin/KURL.h"
64 #include "platform/weborigin/ReferrerPolicy.h" 64 #include "platform/weborigin/ReferrerPolicy.h"
65 #include "public/platform/WebFocusType.h" 65 #include "public/platform/WebFocusType.h"
66 #include "public/platform/WebInsecureRequestPolicy.h" 66 #include "public/platform/WebInsecureRequestPolicy.h"
67 #include "public/platform/site_engagement.mojom-blink.h"
67 #include "wtf/Compiler.h" 68 #include "wtf/Compiler.h"
68 #include "wtf/HashSet.h" 69 #include "wtf/HashSet.h"
69 #include "wtf/PassRefPtr.h" 70 #include "wtf/PassRefPtr.h"
70 #include <memory> 71 #include <memory>
71 72
72 namespace blink { 73 namespace blink {
73 74
74 class AnimationClock; 75 class AnimationClock;
75 class DocumentTimeline; 76 class DocumentTimeline;
76 class AXObjectCache; 77 class AXObjectCache;
(...skipping 1121 matching lines...) Expand 10 before | Expand all | Expand 10 after
1198 return m_topLayerElements; 1199 return m_topLayerElements;
1199 } 1200 }
1200 HTMLDialogElement* activeModalDialog() const; 1201 HTMLDialogElement* activeModalDialog() const;
1201 1202
1202 // A non-null m_templateDocumentHost implies that |this| was created by 1203 // A non-null m_templateDocumentHost implies that |this| was created by
1203 // ensureTemplateDocument(). 1204 // ensureTemplateDocument().
1204 bool isTemplateDocument() const { return !!m_templateDocumentHost; } 1205 bool isTemplateDocument() const { return !!m_templateDocumentHost; }
1205 Document& ensureTemplateDocument(); 1206 Document& ensureTemplateDocument();
1206 Document* templateDocumentHost() { return m_templateDocumentHost; } 1207 Document* templateDocumentHost() { return m_templateDocumentHost; }
1207 1208
1209 mojom::blink::EngagementLevel getEngagementLevel() const {
1210 return m_engagementLevel;
1211 }
1212 void setEngagementLevel(mojom::blink::EngagementLevel level) {
1213 m_engagementLevel = level;
1214 }
1215
1208 // TODO(thestig): Rename these and related functions, since we can call them 1216 // TODO(thestig): Rename these and related functions, since we can call them
1209 // for controls outside of forms as well. 1217 // for controls outside of forms as well.
1210 void didAssociateFormControl(Element*); 1218 void didAssociateFormControl(Element*);
1211 1219
1212 void addConsoleMessage(ConsoleMessage*) final; 1220 void addConsoleMessage(ConsoleMessage*) final;
1213 1221
1214 LocalDOMWindow* executingWindow() const final; 1222 LocalDOMWindow* executingWindow() const final;
1215 LocalFrame* executingFrame(); 1223 LocalFrame* executingFrame();
1216 1224
1217 DocumentLifecycle& lifecycle() { return m_lifecycle; } 1225 DocumentLifecycle& lifecycle() { return m_lifecycle; }
(...skipping 445 matching lines...) Expand 10 before | Expand all | Expand 10 after
1663 1671
1664 bool m_mayContainV0Shadow = false; 1672 bool m_mayContainV0Shadow = false;
1665 1673
1666 Member<SnapCoordinator> m_snapCoordinator; 1674 Member<SnapCoordinator> m_snapCoordinator;
1667 1675
1668 WouldLoadReason m_wouldLoadReason; 1676 WouldLoadReason m_wouldLoadReason;
1669 1677
1670 Member<PropertyRegistry> m_propertyRegistry; 1678 Member<PropertyRegistry> m_propertyRegistry;
1671 1679
1672 unsigned m_passwordCount; 1680 unsigned m_passwordCount;
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