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

Unified Diff: Source/core/page/DOMWindowTimers.cpp

Issue 19801002: Drop [LegacyImplementedInBaseClass] attribute from WindowTimers (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Attempt to make the try bots happy Created 7 years, 5 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/page/DOMWindowTimers.h ('k') | Source/core/page/WindowTimers.idl » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/page/DOMWindowTimers.cpp
diff --git a/Source/core/page/DOMWindowBase64.cpp b/Source/core/page/DOMWindowTimers.cpp
similarity index 66%
copy from Source/core/page/DOMWindowBase64.cpp
copy to Source/core/page/DOMWindowTimers.cpp
index 7d3252ba2b935162078a5703378344a8d8e6a764..499a7981588b53667b198322dfdde02062f07e74 100644
--- a/Source/core/page/DOMWindowBase64.cpp
+++ b/Source/core/page/DOMWindowTimers.cpp
@@ -31,46 +31,37 @@
*/
#include "config.h"
-#include "core/page/DOMWindowBase64.h"
+#include "core/page/DOMWindowTimers.h"
-#include "wtf/text/Base64.h"
+#include "core/dom/EventTarget.h"
+#include "core/page/DOMTimer.h"
namespace WebCore {
-namespace DOMWindowBase64 {
+namespace DOMWindowTimers {
-String btoa(void*, const String& stringToEncode, ExceptionCode& ec)
+int setTimeout(EventTarget* eventTarget, PassOwnPtr<ScheduledAction> action, int timeout)
{
- if (stringToEncode.isNull())
- return String();
-
- if (!stringToEncode.containsOnlyLatin1()) {
- ec = InvalidCharacterError;
- return String();
- }
-
- return base64Encode(stringToEncode.latin1());
+ return DOMTimer::install(eventTarget->scriptExecutionContext(), action, timeout, true);
}
-String atob(void*, const String& encodedString, ExceptionCode& ec)
+int setInterval(EventTarget* eventTarget, PassOwnPtr<ScheduledAction> action, int timeout)
{
- if (encodedString.isNull())
- return String();
-
- if (!encodedString.containsOnlyLatin1()) {
- ec = InvalidCharacterError;
- return String();
- }
+ return DOMTimer::install(eventTarget->scriptExecutionContext(), action, timeout, false);
+}
- Vector<char> out;
- if (!base64Decode(encodedString, out, Base64FailOnInvalidCharacter, Base64StrictPaddingValidation)) {
- ec = InvalidCharacterError;
- return String();
- }
+void clearTimeout(EventTarget* eventTarget, int timeoutID)
+{
+ if (ScriptExecutionContext* context = eventTarget->scriptExecutionContext())
+ DOMTimer::removeByID(context, timeoutID);
+}
- return String(out.data(), out.size());
+void clearInterval(EventTarget* eventTarget, int timeoutID)
+{
+ if (ScriptExecutionContext* context = eventTarget->scriptExecutionContext())
+ DOMTimer::removeByID(context, timeoutID);
}
-} // namespace DOMWindowBase64
+} // namespace DOMWindowTimers
} // namespace WebCore
« no previous file with comments | « Source/core/page/DOMWindowTimers.h ('k') | Source/core/page/WindowTimers.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698