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

Unified Diff: Source/core/dom/BeforeUnloadEvent.cpp

Issue 22893051: Add support for BeforeUnloadEvent (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 4 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: Source/core/dom/BeforeUnloadEvent.cpp
diff --git a/Source/core/dom/BeforeUnloadEvent.cpp b/Source/core/dom/BeforeUnloadEvent.cpp
index 25f7b0e99c1be90f85edfd7b23aab1c806b84555..43ec98dc7f068797d1badd92b046606bd533be40 100644
--- a/Source/core/dom/BeforeUnloadEvent.cpp
+++ b/Source/core/dom/BeforeUnloadEvent.cpp
@@ -1,8 +1,9 @@
-/**
+/*
* Copyright (C) 2001 Peter Kelly (pmk@post.com)
* Copyright (C) 2001 Tobias Anton (anton@stud.fbi.fh-darmstadt.de)
* Copyright (C) 2006 Samuel Weinig (sam.weinig@gmail.com)
* Copyright (C) 2003, 2005, 2006 Apple Computer, Inc.
+ * Copyright (C) 2013 Samsung Electronics.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
@@ -30,20 +31,16 @@ namespace WebCore {
BeforeUnloadEvent::BeforeUnloadEvent()
: Event(eventNames().beforeunloadEvent, false, true)
{
+ ScriptWrappable::init(this);
arv (Not doing code reviews) 2013/08/23 13:56:49 I'm curious why it didn't have this before?
do-not-use 2013/08/23 14:20:40 According to the doc for ScriptWrappable::init():
}
BeforeUnloadEvent::~BeforeUnloadEvent()
{
}
-bool BeforeUnloadEvent::storesResultAsString() const
+void BeforeUnloadEvent::setReturnValue(const String& returnValue)
{
- return true;
-}
-
-void BeforeUnloadEvent::storeResult(const String& s)
-{
- m_result = s;
+ m_returnValue = returnValue;
}
} // namespace WebCore

Powered by Google App Engine
This is Rietveld 408576698