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

Unified Diff: third_party/WebKit/Source/core/frame/LocalDOMWindow.cpp

Issue 2050123002: Remove OwnPtr from Blink. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: First attempt to land. 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/frame/LocalDOMWindow.cpp
diff --git a/third_party/WebKit/Source/core/frame/LocalDOMWindow.cpp b/third_party/WebKit/Source/core/frame/LocalDOMWindow.cpp
index 20a01b9f6b24d98edfe157a16ae76c19f7f7615c..b8654e64feaa78cac66fb22cce269c567ac7bc34 100644
--- a/third_party/WebKit/Source/core/frame/LocalDOMWindow.cpp
+++ b/third_party/WebKit/Source/core/frame/LocalDOMWindow.cpp
@@ -78,7 +78,7 @@
#include "public/platform/Platform.h"
#include "public/platform/WebFrameScheduler.h"
#include "public/platform/WebScreenInfo.h"
-#include "wtf/PassOwnPtr.h"
+#include <memory>
namespace blink {
@@ -127,7 +127,7 @@ private:
class PostMessageTimer final : public GarbageCollectedFinalized<PostMessageTimer>, public SuspendableTimer {
USING_GARBAGE_COLLECTED_MIXIN(PostMessageTimer);
public:
- PostMessageTimer(LocalDOMWindow& window, MessageEvent* event, PassRefPtr<SecurityOrigin> targetOrigin, PassOwnPtr<SourceLocation> location, UserGestureToken* userGestureToken)
+ PostMessageTimer(LocalDOMWindow& window, MessageEvent* event, PassRefPtr<SecurityOrigin> targetOrigin, std::unique_ptr<SourceLocation> location, UserGestureToken* userGestureToken)
: SuspendableTimer(window.document())
, m_event(event)
, m_window(&window)
@@ -141,7 +141,7 @@ public:
MessageEvent* event() const { return m_event; }
SecurityOrigin* targetOrigin() const { return m_targetOrigin.get(); }
- PassOwnPtr<SourceLocation> takeLocation() { return std::move(m_location); }
+ std::unique_ptr<SourceLocation> takeLocation() { return std::move(m_location); }
UserGestureToken* userGestureToken() const { return m_userGestureToken.get(); }
void stop() override
{
@@ -184,7 +184,7 @@ private:
Member<MessageEvent> m_event;
Member<LocalDOMWindow> m_window;
RefPtr<SecurityOrigin> m_targetOrigin;
- OwnPtr<SourceLocation> m_location;
+ std::unique_ptr<SourceLocation> m_location;
RefPtr<UserGestureToken> m_userGestureToken;
bool m_disposalAllowed;
};
@@ -695,7 +695,7 @@ void LocalDOMWindow::removePostMessageTimer(PostMessageTimer* timer)
m_postMessageTimers.remove(timer);
}
-void LocalDOMWindow::dispatchMessageEventWithOriginCheck(SecurityOrigin* intendedTargetOrigin, Event* event, PassOwnPtr<SourceLocation> location)
+void LocalDOMWindow::dispatchMessageEventWithOriginCheck(SecurityOrigin* intendedTargetOrigin, Event* event, std::unique_ptr<SourceLocation> location)
{
if (intendedTargetOrigin) {
// Check target origin now since the target document may have changed since the timer was scheduled.
« no previous file with comments | « third_party/WebKit/Source/core/frame/LocalDOMWindow.h ('k') | third_party/WebKit/Source/core/frame/LocalFrame.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698