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

Unified Diff: third_party/WebKit/Source/core/dom/ContextFeatures.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/ContextFeatures.h
diff --git a/third_party/WebKit/Source/core/dom/ContextFeatures.h b/third_party/WebKit/Source/core/dom/ContextFeatures.h
index 16ea1954269a215f3d1f73255bf14fc401c19585..78766a60811612a09566ba38d393c13ed47c3cc5 100644
--- a/third_party/WebKit/Source/core/dom/ContextFeatures.h
+++ b/third_party/WebKit/Source/core/dom/ContextFeatures.h
@@ -30,7 +30,6 @@
#include "core/CoreExport.h"
#include "core/page/Page.h"
#include "platform/heap/Handle.h"
-#include <memory>
namespace blink {
@@ -49,7 +48,7 @@ public:
static const char* supplementName();
static ContextFeatures& defaultSwitch();
- static ContextFeatures* create(std::unique_ptr<ContextFeaturesClient>);
+ static ContextFeatures* create(PassOwnPtr<ContextFeaturesClient>);
static bool pagePopupEnabled(Document*);
static bool mutationEventsEnabled(Document*);
@@ -58,27 +57,27 @@ public:
void urlDidChange(Document*);
private:
- explicit ContextFeatures(std::unique_ptr<ContextFeaturesClient> client)
+ explicit ContextFeatures(PassOwnPtr<ContextFeaturesClient> client)
: m_client(std::move(client))
{ }
- std::unique_ptr<ContextFeaturesClient> m_client;
+ OwnPtr<ContextFeaturesClient> m_client;
};
class ContextFeaturesClient {
USING_FAST_MALLOC(ContextFeaturesClient);
public:
- static std::unique_ptr<ContextFeaturesClient> empty();
+ static PassOwnPtr<ContextFeaturesClient> empty();
virtual ~ContextFeaturesClient() { }
virtual bool isEnabled(Document*, ContextFeatures::FeatureType, bool defaultValue) { return defaultValue; }
virtual void urlDidChange(Document*) { }
};
-CORE_EXPORT void provideContextFeaturesTo(Page&, std::unique_ptr<ContextFeaturesClient>);
+CORE_EXPORT void provideContextFeaturesTo(Page&, PassOwnPtr<ContextFeaturesClient>);
void provideContextFeaturesToDocumentFrom(Document&, Page&);
-inline ContextFeatures* ContextFeatures::create(std::unique_ptr<ContextFeaturesClient> client)
+inline ContextFeatures* ContextFeatures::create(PassOwnPtr<ContextFeaturesClient> client)
{
return new ContextFeatures(std::move(client));
}
« no previous file with comments | « third_party/WebKit/Source/core/dom/ContainerNode.h ('k') | third_party/WebKit/Source/core/dom/ContextFeatures.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698