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

Side by Side Diff: third_party/WebKit/Source/web/ServiceWorkerGlobalScopeProxy.h

Issue 2618313003: Use WebURLResponse to pass the navigation preload response from SWContextClient to FetchEvent. (Closed)
Patch Set: incorporated falken's comment Created 3 years, 11 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 /* 1 /*
2 * Copyright (C) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 namespace blink { 43 namespace blink {
44 44
45 class Document; 45 class Document;
46 class FetchEvent; 46 class FetchEvent;
47 class ServiceWorkerGlobalScope; 47 class ServiceWorkerGlobalScope;
48 class WebDataConsumerHandle; 48 class WebDataConsumerHandle;
49 class WebEmbeddedWorkerImpl; 49 class WebEmbeddedWorkerImpl;
50 class WebServiceWorkerContextClient; 50 class WebServiceWorkerContextClient;
51 struct WebServiceWorkerError; 51 struct WebServiceWorkerError;
52 class WebServiceWorkerRequest; 52 class WebServiceWorkerRequest;
53 class WebServiceWorkerResponse; 53 class WebURLResponse;
54 54
55 // This class is created and destructed on the main thread, but live most 55 // This class is created and destructed on the main thread, but live most
56 // of its time as a resident of the worker thread. 56 // of its time as a resident of the worker thread.
57 // All methods other than its ctor/dtor are called on the worker thread. 57 // All methods other than its ctor/dtor are called on the worker thread.
58 // 58 //
59 // This implements WebServiceWorkerContextProxy, which connects ServiceWorker's 59 // This implements WebServiceWorkerContextProxy, which connects ServiceWorker's
60 // WorkerGlobalScope and embedder/chrome, and implements ServiceWorker-specific 60 // WorkerGlobalScope and embedder/chrome, and implements ServiceWorker-specific
61 // events/upcall methods that are to be called by embedder/chromium, 61 // events/upcall methods that are to be called by embedder/chromium,
62 // e.g. onfetch. 62 // e.g. onfetch.
63 // 63 //
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 void dispatchNotificationCloseEvent(int, 106 void dispatchNotificationCloseEvent(int,
107 const WebString& notificationID, 107 const WebString& notificationID,
108 const WebNotificationData&) override; 108 const WebNotificationData&) override;
109 void dispatchPushEvent(int, const WebString& data) override; 109 void dispatchPushEvent(int, const WebString& data) override;
110 void dispatchSyncEvent(int, const WebString& tag, LastChanceOption) override; 110 void dispatchSyncEvent(int, const WebString& tag, LastChanceOption) override;
111 void dispatchPaymentRequestEvent(int, 111 void dispatchPaymentRequestEvent(int,
112 const WebPaymentAppRequestData&) override; 112 const WebPaymentAppRequestData&) override;
113 bool hasFetchEventHandler() override; 113 bool hasFetchEventHandler() override;
114 void onNavigationPreloadResponse( 114 void onNavigationPreloadResponse(
115 int fetchEventID, 115 int fetchEventID,
116 std::unique_ptr<WebServiceWorkerResponse>, 116 std::unique_ptr<WebURLResponse>,
117 std::unique_ptr<WebDataConsumerHandle>) override; 117 std::unique_ptr<WebDataConsumerHandle>) override;
118 void onNavigationPreloadError( 118 void onNavigationPreloadError(
119 int fetchEventID, 119 int fetchEventID,
120 std::unique_ptr<WebServiceWorkerError>) override; 120 std::unique_ptr<WebServiceWorkerError>) override;
121 121
122 // WorkerReportingProxy overrides: 122 // WorkerReportingProxy overrides:
123 void countFeature(UseCounter::Feature) override; 123 void countFeature(UseCounter::Feature) override;
124 void countDeprecation(UseCounter::Feature) override; 124 void countDeprecation(UseCounter::Feature) override;
125 void reportException(const String& errorMessage, 125 void reportException(const String& errorMessage,
126 std::unique_ptr<SourceLocation>, 126 std::unique_ptr<SourceLocation>,
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
170 HeapHashMap<int, Member<FetchEvent>> m_pendingPreloadFetchEvents; 170 HeapHashMap<int, Member<FetchEvent>> m_pendingPreloadFetchEvents;
171 171
172 WebServiceWorkerContextClient* m_client; 172 WebServiceWorkerContextClient* m_client;
173 173
174 CrossThreadPersistent<ServiceWorkerGlobalScope> m_workerGlobalScope; 174 CrossThreadPersistent<ServiceWorkerGlobalScope> m_workerGlobalScope;
175 }; 175 };
176 176
177 } // namespace blink 177 } // namespace blink
178 178
179 #endif // ServiceWorkerGlobalScopeProxy_h 179 #endif // ServiceWorkerGlobalScopeProxy_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698