OLD | NEW |
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 <map> | 8 #include <map> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
73 blink::WebServiceWorkerEventResult result); | 73 blink::WebServiceWorkerEventResult result); |
74 void DidHandleSyncEvent(int request_id); | 74 void DidHandleSyncEvent(int request_id); |
75 void DidHandleCrossOriginConnectEvent(int request_id, bool accept_connection); | 75 void DidHandleCrossOriginConnectEvent(int request_id, bool accept_connection); |
76 void GetClients( | 76 void GetClients( |
77 const blink::WebServiceWorkerClientQueryOptions& options, | 77 const blink::WebServiceWorkerClientQueryOptions& options, |
78 blink::WebServiceWorkerClientsCallbacks* callbacks); | 78 blink::WebServiceWorkerClientsCallbacks* callbacks); |
79 void OpenWindow(const GURL& url, | 79 void OpenWindow(const GURL& url, |
80 blink::WebServiceWorkerClientCallbacks* callbacks); | 80 blink::WebServiceWorkerClientCallbacks* callbacks); |
81 void SetCachedMetadata(const GURL& url, const char* data, size_t size); | 81 void SetCachedMetadata(const GURL& url, const char* data, size_t size); |
82 void ClearCachedMetadata(const GURL& url); | 82 void ClearCachedMetadata(const GURL& url); |
83 void PostMessageToDocument( | 83 void PostMessageToClient( |
84 int client_id, | 84 const base::string16& uuid, |
85 const base::string16& message, | 85 const base::string16& message, |
86 scoped_ptr<blink::WebMessagePortChannelArray> channels); | 86 scoped_ptr<blink::WebMessagePortChannelArray> channels); |
87 void PostCrossOriginMessageToClient( | 87 void PostCrossOriginMessageToClient( |
88 const blink::WebCrossOriginServiceWorkerClient& client, | 88 const blink::WebCrossOriginServiceWorkerClient& client, |
89 const base::string16& message, | 89 const base::string16& message, |
90 scoped_ptr<blink::WebMessagePortChannelArray> channels); | 90 scoped_ptr<blink::WebMessagePortChannelArray> channels); |
91 void FocusClient(int client_id, | 91 void FocusClient(const base::string16& uuid, |
92 blink::WebServiceWorkerClientCallbacks* callback); | 92 blink::WebServiceWorkerClientCallbacks* callback); |
93 void SkipWaiting(blink::WebServiceWorkerSkipWaitingCallbacks* callbacks); | 93 void SkipWaiting(blink::WebServiceWorkerSkipWaitingCallbacks* callbacks); |
94 void ClaimClients(blink::WebServiceWorkerClientsClaimCallbacks* callbacks); | 94 void ClaimClients(blink::WebServiceWorkerClientsClaimCallbacks* callbacks); |
95 | 95 |
96 // Send a message to the browser. Takes ownership of |message|. | 96 // Send a message to the browser. Takes ownership of |message|. |
97 void Send(IPC::Message* message); | 97 void Send(IPC::Message* message); |
98 | 98 |
99 // Get routing_id for sending message to the ServiceWorkerVersion | 99 // Get routing_id for sending message to the ServiceWorkerVersion |
100 // in the browser process. | 100 // in the browser process. |
101 int GetRoutingID() const; | 101 int GetRoutingID() const; |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
183 std::map<int, base::TimeTicks> install_start_timings_; | 183 std::map<int, base::TimeTicks> install_start_timings_; |
184 std::map<int, base::TimeTicks> notification_click_start_timings_; | 184 std::map<int, base::TimeTicks> notification_click_start_timings_; |
185 std::map<int, base::TimeTicks> push_start_timings_; | 185 std::map<int, base::TimeTicks> push_start_timings_; |
186 | 186 |
187 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerScriptContext); | 187 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerScriptContext); |
188 }; | 188 }; |
189 | 189 |
190 } // namespace content | 190 } // namespace content |
191 | 191 |
192 #endif // CONTENT_RENDERER_SERVICE_WORKER_SERVICE_WORKER_SCRIPT_CONTEXT_H_ | 192 #endif // CONTENT_RENDERER_SERVICE_WORKER_SERVICE_WORKER_SCRIPT_CONTEXT_H_ |
OLD | NEW |