Chromium Code Reviews| Index: chrome/android/java/src/org/chromium/chrome/browser/offlinepages/interfaces/SchedulerBridge.java |
| diff --git a/chrome/android/java/src/org/chromium/chrome/browser/offlinepages/interfaces/SchedulerBridge.java b/chrome/android/java/src/org/chromium/chrome/browser/offlinepages/interfaces/SchedulerBridge.java |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..b37bd784798de96123415fa322498bb8b5f93369 |
| --- /dev/null |
| +++ b/chrome/android/java/src/org/chromium/chrome/browser/offlinepages/interfaces/SchedulerBridge.java |
| @@ -0,0 +1,29 @@ |
| +// Copyright 2016 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. |
| + |
| +package org.chromium.chrome.browser.offlinepages.interfaces; |
| + |
| +/** |
| + * Interface to allow mocking out the BackgroundSchedulerBridge, which must call static methods. |
| + */ |
| +public interface SchedulerBridge { |
| + // Starts processing of one or more queued background requests. Returns whether processing was |
| + // started and that caller should expect a callback (once processing has completed or |
|
chili
2016/06/03 21:24:17
should this be in javadoc instead?
Pete Williamson
2016/06/03 22:14:18
Done.
|
| + // terminated). If processing was already active or not able to process for some other reason, |
| + // returns false and this calling instance will not receive a callback. |
| + boolean startProcessing( |
| + SchedulerBridge.ProcessingDoneCallback callback); |
|
dewittj
2016/06/03 21:21:49
nit: I think you can omit the SchedulerBridge. her
Pete Williamson
2016/06/03 22:14:18
Done.
|
| + |
| + /** |
| + * Callback used to determine when request processing is done. |
| + */ |
| + public interface ProcessingDoneCallback { |
| + /** |
| + * Callback which is called when the RequestCoordinator is done processing outstanding |
| + * requests for the current wakeup and activation. |
| + */ |
| + void onProcessingDone(boolean result); |
| + } |
| + |
| +} |