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

Unified Diff: content/public/browser/background_sync_controller.h

Issue 1324173002: [Background Sync] Use GcmNetworkManager to start the browser for sync events. (Closed) Base URL: https://chromium.googlesource.com/chromium/src@bgsync-fix-background5
Patch Set: Addressing comments from PS#25 Created 5 years, 2 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
Index: content/public/browser/background_sync_controller.h
diff --git a/content/public/browser/background_sync_controller.h b/content/public/browser/background_sync_controller.h
index 4b2ce636aa5b6701a1c47b42c62f43fe29a49ae0..fccaf4443580f9dd71258c4e6fbd540f5387971a 100644
--- a/content/public/browser/background_sync_controller.h
+++ b/content/public/browser/background_sync_controller.h
@@ -10,6 +10,8 @@
namespace content {
+class BackgroundSyncManager;
+
// An interface that the Background Sync API uses to access services from the
// embedder. Must only be used on the UI thread.
class CONTENT_EXPORT BackgroundSyncController {
@@ -19,6 +21,15 @@ class CONTENT_EXPORT BackgroundSyncController {
// Notification that a service worker registration with origin |origin| just
// registered a background sync event.
virtual void NotifyBackgroundSyncRegistered(const GURL& origin) {}
+
+ // Register the |registrant|'s interest (or disinterest) in starting the
+ // browser the next time the device goes online after the browser has closed.
+ // This only needs to be implemented by browsers; WebView and other embedders
+ // which should not have their application relaunched by Background Sync can
+ // use the default implentation.
+ virtual void LaunchBrowserWhenNextOnline(
+ const BackgroundSyncManager* registrant,
+ bool launch_when_next_online) {}
};
} // namespace content

Powered by Google App Engine
This is Rietveld 408576698