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

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

Issue 14773025: Create ResourceProgressEvent, expose as Chromium API (Closed) Base URL: https://chromium.googlesource.com/chromium/blink@master
Patch Set: pre-review cleanup Created 7 years, 7 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/ResourceProgressEvent.cpp
diff --git a/Source/core/html/ime/Composition.cpp b/Source/core/dom/ResourceProgressEvent.cpp
similarity index 69%
copy from Source/core/html/ime/Composition.cpp
copy to Source/core/dom/ResourceProgressEvent.cpp
index 49b0bf119ebebe9c2904d5fd22f22b064b84ee90..92418f46b64dfe94430dec49694888ba81935e5f 100644
--- a/Source/core/html/ime/Composition.cpp
+++ b/Source/core/dom/ResourceProgressEvent.cpp
@@ -7,10 +7,6 @@
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above
- * copyright notice, this list of conditions and the following disclaimer
- * in the documentation and/or other materials provided with the
- * distribution.
* * Neither the name of Google Inc. nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
@@ -29,26 +25,30 @@
*/
#include "config.h"
-#include "core/html/ime/Composition.h"
-
-#include "core/dom/Node.h"
-#include "core/dom/Range.h"
+#include "core/dom/ResourceProgressEvent.h"
namespace WebCore {
-Composition::~Composition()
+ResourceProgressEvent::ResourceProgressEvent()
{
+ ScriptWrappable::init(this);
}
-PassRefPtr<Composition> Composition::create(Node* text, Range* caret)
+ResourceProgressEvent::ResourceProgressEvent(const AtomicString& type, bool lengthComputable, unsigned long long loaded, unsigned long long total, const AtomicString& url)
+ : ProgressEvent(type, lengthComputable, loaded, total)
+ , m_url(url)
{
- return adoptRef(new Composition(text, caret));
+ ScriptWrappable::init(this);
}
-Composition::Composition(Node* text, Range* caret)
- : m_text(text)
- , m_caret(caret)
+const AtomicString& ResourceProgressEvent::url() const
{
+ return m_url;
}
-} // namespace WebCore
+const AtomicString& ResourceProgressEvent::interfaceName() const
+{
+ return eventNames().interfaceForResourceProgressEvent;
+}
+
+}

Powered by Google App Engine
This is Rietveld 408576698