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

Unified Diff: ios/web/webui/resources/timer.js

Issue 2946383002: Support new-style Mojo JS core API on IOS. (Closed)
Patch Set: . Created 3 years, 6 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 | « ios/web/webui/resources/sync_message_channel.js ('k') | ios/web/webui/resources/web_ui_bundle.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/web/webui/resources/timer.js
diff --git a/ios/web/webui/resources/timer.js b/ios/web/webui/resources/timer.js
deleted file mode 100644
index c9f44ebb2472c35175741a618900c4370d49b3e7..0000000000000000000000000000000000000000
--- a/ios/web/webui/resources/timer.js
+++ /dev/null
@@ -1,38 +0,0 @@
-// Copyright 2017 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-// Module "timer"
-//
-// This module provides basic createOneShot, createRepeating support. The
-// reason to define this module is to forward calls to setTimeout, setInterval
-// exposed by the browser. Mojo JS bindings are currently loaded using gin
-// and createOneShot, createRepeating are not always available.
-//
-// TODO(crbug.com/703380): When the Mojo JS bindings move away from gin,
-// this module could be removed.
-
-define("timer", [], function() {
- /**
- * Executes a function once after the set time delay.
- * @param {int} delay Milliseconds to wait before executing the code.
- * @callback callback
- */
- function createOneShot(delay, callback) {
- setTimeout(callback, delay);
- }
-
- /**
- * Repeatedly executes a function with a fixed time delay between each call.
- * @param {int} delay Milliseconds to wait between executions of the code
- * @callback callback
- */
- function createRepeating(delay, callback) {
- setInterval(callback, delay);
- }
-
- var exports = {};
- exports.createOneShot = createOneShot;
- exports.createRepeating = createRepeating;
- return exports;
-});
« no previous file with comments | « ios/web/webui/resources/sync_message_channel.js ('k') | ios/web/webui/resources/web_ui_bundle.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698