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

Side by Side Diff: content/child/background_sync/background_sync_provider_thread_proxy.h

Issue 1282013004: BackgroundSyncManager tracks client registrations (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Clean up Created 5 years, 4 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_CHILD_BACKGROUND_SYNC_BACKGROUND_SYNC_PROVIDER_THREAD_PROXY_H_ 5 #ifndef CONTENT_CHILD_BACKGROUND_SYNC_BACKGROUND_SYNC_PROVIDER_THREAD_PROXY_H_
6 #define CONTENT_CHILD_BACKGROUND_SYNC_BACKGROUND_SYNC_PROVIDER_THREAD_PROXY_H_ 6 #define CONTENT_CHILD_BACKGROUND_SYNC_BACKGROUND_SYNC_PROVIDER_THREAD_PROXY_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "content/child/worker_task_runner.h" 9 #include "content/child/worker_task_runner.h"
10 #include "third_party/WebKit/public/platform/modules/background_sync/WebSyncProv ider.h" 10 #include "third_party/WebKit/public/platform/modules/background_sync/WebSyncProv ider.h"
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 blink::WebServiceWorkerRegistration* service_worker_registration, 48 blink::WebServiceWorkerRegistration* service_worker_registration,
49 blink::WebSyncRegistrationCallbacks* callbacks); 49 blink::WebSyncRegistrationCallbacks* callbacks);
50 void getRegistrations( 50 void getRegistrations(
51 blink::WebSyncRegistration::Periodicity periodicity, 51 blink::WebSyncRegistration::Periodicity periodicity,
52 blink::WebServiceWorkerRegistration* service_worker_registration, 52 blink::WebServiceWorkerRegistration* service_worker_registration,
53 blink::WebSyncGetRegistrationsCallbacks* callbacks); 53 blink::WebSyncGetRegistrationsCallbacks* callbacks);
54 void getPermissionStatus( 54 void getPermissionStatus(
55 blink::WebSyncRegistration::Periodicity periodicity, 55 blink::WebSyncRegistration::Periodicity periodicity,
56 blink::WebServiceWorkerRegistration* service_worker_registration, 56 blink::WebServiceWorkerRegistration* service_worker_registration,
57 blink::WebSyncGetPermissionStatusCallbacks* callbacks); 57 blink::WebSyncGetPermissionStatusCallbacks* callbacks);
58 void trackRegistration(blink::WebSyncRegistration* registration) override;
59 void releaseRegistration(int64_t sync_id) override;
58 60
59 // WorkerTaskRunner::Observer implementation. 61 // WorkerTaskRunner::Observer implementation.
60 void OnWorkerRunLoopStopped() override; 62 void OnWorkerRunLoopStopped() override;
61 63
62 private: 64 private:
63 BackgroundSyncProviderThreadProxy( 65 BackgroundSyncProviderThreadProxy(
64 base::SingleThreadTaskRunner* main_thread_task_runner, 66 base::SingleThreadTaskRunner* main_thread_task_runner,
65 BackgroundSyncProvider* sync_provider); 67 BackgroundSyncProvider* sync_provider);
66 68
67 virtual ~BackgroundSyncProviderThreadProxy(); 69 virtual ~BackgroundSyncProviderThreadProxy();
68 70
69 scoped_refptr<base::SingleThreadTaskRunner> main_thread_task_runner_; 71 scoped_refptr<base::SingleThreadTaskRunner> main_thread_task_runner_;
70 72
71 // This belongs to the renderer main thread, (created by BlinkPlatformImpl) 73 // This belongs to the renderer main thread, (created by BlinkPlatformImpl)
72 // and so should outlive the BackgroundSyncProviderThreadProxy, which is 74 // and so should outlive the BackgroundSyncProviderThreadProxy, which is
73 // created for a worker thread. 75 // created for a worker thread.
74 BackgroundSyncProvider* sync_provider_; 76 BackgroundSyncProvider* sync_provider_;
75 77
76 DISALLOW_COPY_AND_ASSIGN(BackgroundSyncProviderThreadProxy); 78 DISALLOW_COPY_AND_ASSIGN(BackgroundSyncProviderThreadProxy);
77 }; 79 };
78 80
79 } // namespace content 81 } // namespace content
80 82
81 #endif // CONTENT_CHILD_BACKGROUND_SYNC_BACKGROUND_SYNC_PROVIDER_THREAD_PROXY_H _ 83 #endif // CONTENT_CHILD_BACKGROUND_SYNC_BACKGROUND_SYNC_PROVIDER_THREAD_PROXY_H _
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698