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

Side by Side Diff: content/renderer/service_worker/service_worker_script_context.h

Issue 214383005: Browser side of ServiceWorker requestSyncEvents() function (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Cleaned up the testing code Created 6 years, 8 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_RENDERER_SERVICE_WORKER_SERVICE_WORKER_SCRIPT_CONTEXT_H_ 5 #ifndef CONTENT_RENDERER_SERVICE_WORKER_SERVICE_WORKER_SCRIPT_CONTEXT_H_
6 #define CONTENT_RENDERER_SERVICE_WORKER_SERVICE_WORKER_SCRIPT_CONTEXT_H_ 6 #define CONTENT_RENDERER_SERVICE_WORKER_SERVICE_WORKER_SCRIPT_CONTEXT_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 28 matching lines...) Expand all
39 void OnMessageReceived(int request_id, const IPC::Message& message); 39 void OnMessageReceived(int request_id, const IPC::Message& message);
40 40
41 void DidHandleActivateEvent(int request_id, 41 void DidHandleActivateEvent(int request_id,
42 blink::WebServiceWorkerEventResult); 42 blink::WebServiceWorkerEventResult);
43 void DidHandleInstallEvent(int request_id, 43 void DidHandleInstallEvent(int request_id,
44 blink::WebServiceWorkerEventResult result); 44 blink::WebServiceWorkerEventResult result);
45 void DidHandleFetchEvent(int request_id, 45 void DidHandleFetchEvent(int request_id,
46 ServiceWorkerFetchEventResult result, 46 ServiceWorkerFetchEventResult result,
47 const ServiceWorkerResponse& response); 47 const ServiceWorkerResponse& response);
48 void DidHandleSyncEvent(int request_id); 48 void DidHandleSyncEvent(int request_id);
49 void RequestSyncEvents(int request_id, bool requested);
49 50
50 private: 51 private:
51 // Send message back to the browser. 52 // Send message back to the browser.
52 void Send(int request_id, const IPC::Message& message); 53 void Send(int request_id, const IPC::Message& message);
53 54
54 void OnActivateEvent(); 55 void OnActivateEvent();
55 void OnInstallEvent(int active_version_id); 56 void OnInstallEvent(int active_version_id);
56 void OnFetchEvent(const ServiceWorkerFetchRequest& request); 57 void OnFetchEvent(const ServiceWorkerFetchRequest& request);
57 void OnPostMessage(const base::string16& message, 58 void OnPostMessage(const base::string16& message,
58 const std::vector<int>& sent_message_port_ids, 59 const std::vector<int>& sent_message_port_ids,
(...skipping 10 matching lines...) Expand all
69 // back to the browser is expected, the id must be sent back with the 70 // back to the browser is expected, the id must be sent back with the
70 // response. 71 // response.
71 int current_request_id_; 72 int current_request_id_;
72 73
73 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerScriptContext); 74 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerScriptContext);
74 }; 75 };
75 76
76 } // namespace content 77 } // namespace content
77 78
78 #endif // CONTENT_RENDERER_SERVICE_WORKER_SERVICE_WORKER_SCRIPT_CONTEXT_H_ 79 #endif // CONTENT_RENDERER_SERVICE_WORKER_SERVICE_WORKER_SCRIPT_CONTEXT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698