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

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: merge 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
« no previous file with comments | « Source/core/dom/ResourceProgressEvent.h ('k') | Source/core/dom/ResourceProgressEvent.idl » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/ResourceProgressEvent.cpp
diff --git a/Source/core/html/ime/Composition.cpp b/Source/core/dom/ResourceProgressEvent.cpp
similarity index 71%
copy from Source/core/html/ime/Composition.cpp
copy to Source/core/dom/ResourceProgressEvent.cpp
index e74501bcd8637afa85872dae701e91f04827e1ee..55310bb7dc89afdde8a8794b75f34efb6bb59f45 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,27 +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 String& 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 String& ResourceProgressEvent::url() const
{
- ScriptWrappable::init(this);
+ return m_url;
}
-} // namespace WebCore
+const AtomicString& ResourceProgressEvent::interfaceName() const
+{
+ return eventNames().interfaceForResourceProgressEvent;
+}
+
+}
« no previous file with comments | « Source/core/dom/ResourceProgressEvent.h ('k') | Source/core/dom/ResourceProgressEvent.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698