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

Side by Side Diff: third_party/WebKit/Source/modules/background_fetch/BackgroundFetchBridge.h

Issue 2775923002: Add origins to the Background Fetch Mojo calls. (Closed)
Patch Set: Created 3 years, 9 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 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 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 BackgroundFetchBridge_h 5 #ifndef BackgroundFetchBridge_h
6 #define BackgroundFetchBridge_h 6 #define BackgroundFetchBridge_h
7 7
8 #include <memory> 8 #include <memory>
9 #include "modules/serviceworkers/ServiceWorkerRegistration.h" 9 #include "modules/serviceworkers/ServiceWorkerRegistration.h"
10 #include "platform/Supplementable.h" 10 #include "platform/Supplementable.h"
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 void getRegistration(const String& tag, 68 void getRegistration(const String& tag,
69 std::unique_ptr<RegistrationCallback>); 69 std::unique_ptr<RegistrationCallback>);
70 70
71 // Gets the sequence of tags for active Background Fetch registrations. Will 71 // Gets the sequence of tags for active Background Fetch registrations. Will
72 // invoke the |callback| with the tags when the Mojo call has completed. 72 // invoke the |callback| with the tags when the Mojo call has completed.
73 void getTags(std::unique_ptr<GetTagsCallback>); 73 void getTags(std::unique_ptr<GetTagsCallback>);
74 74
75 private: 75 private:
76 explicit BackgroundFetchBridge(ServiceWorkerRegistration&); 76 explicit BackgroundFetchBridge(ServiceWorkerRegistration&);
77 77
78 // Returns the security origin for the Service Worker registration this bridge
79 // is servicing, which is to be included in the Mojo calls.
80 SecurityOrigin* getSecurityOrigin();
81
78 // Returns an initialized BackgroundFetchServicePtr. A connection will be 82 // Returns an initialized BackgroundFetchServicePtr. A connection will be
79 // established after the first call to this method. 83 // established after the first call to this method.
80 mojom::blink::BackgroundFetchServicePtr& getService(); 84 mojom::blink::BackgroundFetchServicePtr& getService();
81 85
82 void didGetRegistration(std::unique_ptr<RegistrationCallback>, 86 void didGetRegistration(std::unique_ptr<RegistrationCallback>,
83 mojom::blink::BackgroundFetchError, 87 mojom::blink::BackgroundFetchError,
84 mojom::blink::BackgroundFetchRegistrationPtr); 88 mojom::blink::BackgroundFetchRegistrationPtr);
85 89
86 mojom::blink::BackgroundFetchServicePtr m_backgroundFetchService; 90 mojom::blink::BackgroundFetchServicePtr m_backgroundFetchService;
87 }; 91 };
88 92
89 } // namespace blink 93 } // namespace blink
90 94
91 #endif // BackgroundFetchBridge_h 95 #endif // BackgroundFetchBridge_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698