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

Unified Diff: third_party/WebKit/public/web/WebHelperPlugin.h

Issue 2041263002: Remove the use of OwnedPtrDeleter in WebHelperPlugin. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Revert to PS1. 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
« no previous file with comments | « third_party/WebKit/Source/web/tests/WebHelperPluginTest.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/public/web/WebHelperPlugin.h
diff --git a/third_party/WebKit/public/web/WebHelperPlugin.h b/third_party/WebKit/public/web/WebHelperPlugin.h
index 57ec1fd2f1b6309b7c1528167aec3d278d994cb0..5a7de5a10f62da5840b3993cdc19337d873a34ab 100644
--- a/third_party/WebKit/public/web/WebHelperPlugin.h
+++ b/third_party/WebKit/public/web/WebHelperPlugin.h
@@ -34,6 +34,10 @@
#include "../platform/WebCommon.h"
#include "WebFrame.h"
+#if INSIDE_BLINK
+#include <memory>
+#endif
+
namespace blink {
class WebPlugin;
@@ -56,19 +60,18 @@ protected:
virtual ~WebHelperPlugin() { }
};
-} // namespace blink
-
-namespace WTF {
-
-template<typename T> struct OwnedPtrDeleter;
-template<> struct OwnedPtrDeleter<blink::WebHelperPlugin> {
- static void deletePtr(blink::WebHelperPlugin* plugin)
+#if INSIDE_BLINK
+struct WebHelperPluginDeleter {
+ void operator()(WebHelperPlugin* plugin)
{
if (plugin)
plugin->destroy();
}
};
-} // namespace WTF
+using WebHelperPluginUniquePtr = std::unique_ptr<WebHelperPlugin, WebHelperPluginDeleter>;
+#endif
+
+} // namespace blink
#endif
« no previous file with comments | « third_party/WebKit/Source/web/tests/WebHelperPluginTest.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698