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

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

Issue 2080623002: Revert "Remove OwnPtr from Blink." (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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
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 15ac30448e4ff43714c38889990b47d2dee218cc..19878dc0069e27e82654fd4f25454f88e3144e2a 100644
--- a/third_party/WebKit/Source/core/dom/Document.h
+++ b/third_party/WebKit/Source/core/dom/Document.h
@@ -55,8 +55,9 @@
#include "public/platform/WebFocusType.h"
#include "public/platform/WebInsecureRequestPolicy.h"
#include "wtf/HashSet.h"
+#include "wtf/OwnPtr.h"
+#include "wtf/PassOwnPtr.h"
#include "wtf/PassRefPtr.h"
-#include <memory>
namespace blink {
@@ -671,7 +672,7 @@ public:
void setWindowAttributeEventListener(const AtomicString& eventType, EventListener*);
EventListener* getWindowAttributeEventListener(const AtomicString& eventType);
- static void registerEventFactory(std::unique_ptr<EventFactoryBase>);
+ static void registerEventFactory(PassOwnPtr<EventFactoryBase>);
static Event* createEvent(ExecutionContext*, const String& eventType, ExceptionState&);
// keep track of what types of event listeners are registered, so we don't
@@ -812,7 +813,7 @@ public:
void pushCurrentScript(Element*);
void popCurrentScript();
- void setTransformSource(std::unique_ptr<TransformSource>);
+ void setTransformSource(PassOwnPtr<TransformSource>);
TransformSource* transformSource() const { return m_transformSource.get(); }
void incDOMTreeVersion() { DCHECK(m_lifecycle.stateAllowsTreeMutations()); m_domTreeVersion = ++s_globalTreeVersion; }
@@ -949,7 +950,7 @@ public:
void cancelIdleCallback(int id);
EventTarget* errorEventTarget() final;
- void logExceptionToConsole(const String& errorMessage, std::unique_ptr<SourceLocation>) final;
+ void logExceptionToConsole(const String& errorMessage, PassOwnPtr<SourceLocation>) final;
void initDNSPrefetch();
@@ -1177,7 +1178,7 @@ private:
void setHoverNode(Node*);
- using EventFactorySet = HashSet<std::unique_ptr<EventFactoryBase>>;
+ using EventFactorySet = HashSet<OwnPtr<EventFactoryBase>>;
static EventFactorySet& eventFactories();
void setNthIndexCache(NthIndexCache* nthIndexCache) { DCHECK(!m_nthIndexCache || !nthIndexCache); m_nthIndexCache = nthIndexCache; }
@@ -1210,7 +1211,7 @@ private:
KURL m_baseURLOverride; // An alternative base URL that takes precedence over m_baseURL (but not m_baseElementURL).
KURL m_baseElementURL; // The URL set by the <base> element.
KURL m_cookieURL; // The URL to use for cookie access.
- std::unique_ptr<OriginAccessEntry> m_accessEntryFromURL;
+ OwnPtr<OriginAccessEntry> m_accessEntryFromURL;
AtomicString m_baseTarget;
@@ -1229,7 +1230,7 @@ private:
CompatibilityMode m_compatibilityMode;
bool m_compatibilityModeLocked; // This is cheaper than making setCompatibilityMode virtual.
- std::unique_ptr<CancellableTaskFactory> m_executeScriptsWaitingForResourcesTask;
+ OwnPtr<CancellableTaskFactory> m_executeScriptsWaitingForResourcesTask;
bool m_hasAutofocused;
Timer<Document> m_clearFocusedElementTimer;
@@ -1296,7 +1297,7 @@ private:
HeapVector<Member<Element>> m_currentScriptStack;
- std::unique_ptr<TransformSource> m_transformSource;
+ OwnPtr<TransformSource> m_transformSource;
String m_xmlEncoding;
String m_xmlVersion;
@@ -1322,7 +1323,7 @@ private:
bool m_hasAnnotatedRegions;
bool m_annotatedRegionsDirty;
- std::unique_ptr<SelectorQueryCache> m_selectorQueryCache;
+ OwnPtr<SelectorQueryCache> m_selectorQueryCache;
// It is safe to keep a raw, untraced pointer to this stack-allocated
// cache object: it is set upon the cache object being allocated on
@@ -1366,7 +1367,7 @@ private:
Member<ScriptedAnimationController> m_scriptedAnimationController;
Member<ScriptedIdleTaskController> m_scriptedIdleTaskController;
- std::unique_ptr<MainThreadTaskRunner> m_taskRunner;
+ OwnPtr<MainThreadTaskRunner> m_taskRunner;
Member<TextAutosizer> m_textAutosizer;
Member<V0CustomElementRegistrationContext> m_registrationContext;
@@ -1377,7 +1378,7 @@ private:
Member<ElementDataCache> m_elementDataCache;
- using LocaleIdentifierToLocaleMap = HashMap<AtomicString, std::unique_ptr<Locale>>;
+ using LocaleIdentifierToLocaleMap = HashMap<AtomicString, OwnPtr<Locale>>;
LocaleIdentifierToLocaleMap m_localeCache;
Member<AnimationTimeline> m_timeline;
« no previous file with comments | « third_party/WebKit/Source/core/dom/DecodedDataDocumentParser.cpp ('k') | third_party/WebKit/Source/core/dom/Document.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698