Chromium Code Reviews| Index: chrome/android/java/src/org/chromium/chrome/browser/offlinepages/interfaces/SchedulerBridgeInterface.java |
| diff --git a/chrome/android/java/src/org/chromium/chrome/browser/offlinepages/interfaces/SchedulerBridgeInterface.java b/chrome/android/java/src/org/chromium/chrome/browser/offlinepages/interfaces/SchedulerBridgeInterface.java |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..9dc86461532c18dbc59c3f57374526830b8b3c3c |
| --- /dev/null |
| +++ b/chrome/android/java/src/org/chromium/chrome/browser/offlinepages/interfaces/SchedulerBridgeInterface.java |
| @@ -0,0 +1,25 @@ |
| +// 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 SchedulerBridge, which must call static methods. |
| + */ |
| +public abstract interface SchedulerBridgeInterface { |
|
chili
2016/06/02 00:37:25
why are we declaring an interface abstract? Aren'
Pete Williamson
2016/06/02 20:51:33
Done.
|
| + // 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 |
| + // 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. |
| + public abstract boolean startProcessing( |
| + SchedulerBridgeInterface.ProcessingDoneCallback callback); |
| + |
| + /** |
| + * Callback used to determine when request processing is done. |
| + */ |
| + public interface ProcessingDoneCallback { |
| + void onProcessingDone(boolean result); |
| + } |
| + |
| +} |