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

Side by Side 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CONTENT_PUBLIC_BROWSER_BACKGROUND_SYNC_CONTROLLER_H_ 5 #ifndef CONTENT_PUBLIC_BROWSER_BACKGROUND_SYNC_CONTROLLER_H_
6 #define CONTENT_PUBLIC_BROWSER_BACKGROUND_SYNC_CONTROLLER_H_ 6 #define CONTENT_PUBLIC_BROWSER_BACKGROUND_SYNC_CONTROLLER_H_
7 7
8 #include "content/common/content_export.h" 8 #include "content/common/content_export.h"
9 #include "url/gurl.h" 9 #include "url/gurl.h"
10 10
11 namespace content { 11 namespace content {
12 12
13 class BackgroundSyncManager;
14
13 // An interface that the Background Sync API uses to access services from the 15 // An interface that the Background Sync API uses to access services from the
14 // embedder. Must only be used on the UI thread. 16 // embedder. Must only be used on the UI thread.
15 class CONTENT_EXPORT BackgroundSyncController { 17 class CONTENT_EXPORT BackgroundSyncController {
16 public: 18 public:
17 virtual ~BackgroundSyncController() {} 19 virtual ~BackgroundSyncController() {}
18 20
19 // Notification that a service worker registration with origin |origin| just 21 // Notification that a service worker registration with origin |origin| just
20 // registered a background sync event. 22 // registered a background sync event.
21 virtual void NotifyBackgroundSyncRegistered(const GURL& origin) {} 23 virtual void NotifyBackgroundSyncRegistered(const GURL& origin) {}
24
25 // Register the |registrant|'s interest (or disinterest) in starting the
26 // browser the next time the device goes online after the browser has closed.
27 // This only needs to be implemented by browsers; WebView and other embedders
28 // which should not have their application relaunched by Background Sync can
29 // use the default implentation.
30 virtual void LaunchBrowserWhenNextOnline(
31 const BackgroundSyncManager* registrant,
32 bool launch_when_next_online) {}
22 }; 33 };
23 34
24 } // namespace content 35 } // namespace content
25 36
26 #endif // CONTENT_PUBLIC_BROWSER_BACKGROUND_SYNC_CONTROLLER_H_ 37 #endif // CONTENT_PUBLIC_BROWSER_BACKGROUND_SYNC_CONTROLLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698