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

Unified Diff: Source/platform/SharedTimer.cpp

Issue 1162753003: Revert "Implement timers by posting delayed tasks" (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 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/platform/SharedTimer.h ('k') | Source/platform/ThreadTimers.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/SharedTimer.cpp
diff --git a/Source/core/editing/UnlinkCommand.cpp b/Source/platform/SharedTimer.cpp
similarity index 77%
copy from Source/core/editing/UnlinkCommand.cpp
copy to Source/platform/SharedTimer.cpp
index 46ac828048dcfff149ac244b24d4e7f06a20862e..09efb4911476fa2b9d454bbe04f2331ba23dea4e 100644
--- a/Source/core/editing/UnlinkCommand.cpp
+++ b/Source/platform/SharedTimer.cpp
@@ -24,24 +24,25 @@
*/
#include "config.h"
-#include "core/editing/UnlinkCommand.h"
+#include "platform/SharedTimer.h"
-#include "core/html/HTMLAnchorElement.h"
+#include "public/platform/Platform.h"
namespace blink {
-UnlinkCommand::UnlinkCommand(Document& document)
- : CompositeEditCommand(document)
+void setSharedTimerFiredFunction(void (*f)())
{
+ Platform::current()->setSharedTimerFiredFunction(f);
}
-void UnlinkCommand::doApply()
+void setSharedTimerFireInterval(double fireTime)
{
- // FIXME: If a caret is inside a link, we should remove it, but currently we don't.
- if (!endingSelection().isNonOrphanedRange())
- return;
-
- removeStyledElement(HTMLAnchorElement::create(document()));
+ Platform::current()->setSharedTimerFireInterval(fireTime);
}
+void stopSharedTimer()
+{
+ Platform::current()->stopSharedTimer();
}
+
+} // namespace blink
« no previous file with comments | « Source/platform/SharedTimer.h ('k') | Source/platform/ThreadTimers.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698