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

Side by Side Diff: content/browser/service_worker/service_worker_fetch_dispatcher.h

Issue 2168513004: [DO NOT COMMIT] ServiceWorker: First touch of mojo (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove an unnecessary file Created 4 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_BROWSER_SERVICE_WORKER_SERVICE_WORKER_FETCH_DISPATCHER_H_ 5 #ifndef CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_FETCH_DISPATCHER_H_
6 #define CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_FETCH_DISPATCHER_H_ 6 #define CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_FETCH_DISPATCHER_H_
7 7
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "base/memory/weak_ptr.h" 10 #include "base/memory/weak_ptr.h"
(...skipping 27 matching lines...) Expand all
38 ~ServiceWorkerFetchDispatcher(); 38 ~ServiceWorkerFetchDispatcher();
39 39
40 // Dispatches a fetch event to the |version| given in ctor, and fires 40 // Dispatches a fetch event to the |version| given in ctor, and fires
41 // |fetch_callback| (also given in ctor) when finishes. It runs 41 // |fetch_callback| (also given in ctor) when finishes. It runs
42 // |prepare_callback| as an intermediate step once the version is activated 42 // |prepare_callback| as an intermediate step once the version is activated
43 // and running. 43 // and running.
44 void Run(); 44 void Run();
45 45
46 private: 46 private:
47 class ResponseCallback; 47 class ResponseCallback;
48 class ResponseMojoCallback;
48 49
49 void DidWaitForActivation(); 50 void DidWaitForActivation();
50 void StartWorker(); 51 void StartWorker();
51 void DidStartWorker(); 52 void DidStartWorker();
52 void DidFailToStartWorker(ServiceWorkerStatusCode status); 53 void DidFailToStartWorker(ServiceWorkerStatusCode status);
53 void DispatchFetchEvent(); 54 void DispatchFetchEvent();
54 void DidFailToDispatch(ServiceWorkerStatusCode status); 55 void DidFailToDispatch(ServiceWorkerStatusCode status);
55 void DidFail(ServiceWorkerStatusCode status); 56 void DidFail(ServiceWorkerStatusCode status);
56 void DidFinish(int request_id, 57 void DidFinish(int request_id,
57 ServiceWorkerFetchEventResult fetch_result, 58 ServiceWorkerFetchEventResult fetch_result,
(...skipping 12 matching lines...) Expand all
70 ResourceType resource_type_; 71 ResourceType resource_type_;
71 bool did_complete_; 72 bool did_complete_;
72 base::WeakPtrFactory<ServiceWorkerFetchDispatcher> weak_factory_; 73 base::WeakPtrFactory<ServiceWorkerFetchDispatcher> weak_factory_;
73 74
74 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerFetchDispatcher); 75 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerFetchDispatcher);
75 }; 76 };
76 77
77 } // namespace content 78 } // namespace content
78 79
79 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_FETCH_DISPATCHER_H_ 80 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_FETCH_DISPATCHER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698