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

Unified Diff: content/renderer/service_worker/service_worker_script_context.h

Issue 843583005: [ServiceWorker] Implement WebServiceWorkerContextClient::openWindow(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@content_browser_client_openurl
Patch Set: review comments Created 5 years, 10 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 side-by-side diff with in-line comments
Download patch
Index: content/renderer/service_worker/service_worker_script_context.h
diff --git a/content/renderer/service_worker/service_worker_script_context.h b/content/renderer/service_worker/service_worker_script_context.h
index a6d53adf4ac96b911555f0623e959bd50b375a60..121bba671cabe420e4e179b59b724a36bf62608e 100644
--- a/content/renderer/service_worker/service_worker_script_context.h
+++ b/content/renderer/service_worker/service_worker_script_context.h
@@ -75,6 +75,8 @@ class ServiceWorkerScriptContext {
void DidHandleCrossOriginConnectEvent(int request_id, bool accept_connection);
void GetClientDocuments(
blink::WebServiceWorkerClientsCallbacks* callbacks);
+ void OpenWindow(const GURL& url,
+ blink::WebServiceWorkerClientCallbacks* callbacks);
void PostMessageToDocument(
int client_id,
const base::string16& message,
@@ -104,6 +106,8 @@ class ServiceWorkerScriptContext {
ClientsCallbacksMap;
typedef IDMap<blink::WebServiceWorkerClientsClaimCallbacks, IDMapOwnPointer>
ClaimClientsCallbacksMap;
+ typedef IDMap<blink::WebServiceWorkerClientCallbacks, IDMapOwnPointer>
+ ClientCallbacksMap;
typedef IDMap<blink::WebServiceWorkerClientFocusCallback, IDMapOwnPointer>
FocusClientCallbacksMap;
typedef IDMap<blink::WebServiceWorkerSkipWaitingCallbacks, IDMapOwnPointer>
@@ -134,6 +138,9 @@ class ServiceWorkerScriptContext {
const std::vector<int>& new_routing_ids);
void OnDidGetClientDocuments(
int request_id, const std::vector<ServiceWorkerClientInfo>& clients);
+ void OnOpenWindowResponse(int request_id,
+ const ServiceWorkerClientInfo& client);
+ void OnOpenWindowError(int request_id);
void OnFocusClientResponse(int request_id, bool result);
void OnDidSkipWaiting(int request_id);
void OnDidClaimClients(int request_id);
@@ -157,6 +164,9 @@ class ServiceWorkerScriptContext {
// Pending callbacks for GetClientDocuments().
ClientsCallbacksMap pending_clients_callbacks_;
+ // Pending callbacks for OpenWindow().
+ ClientCallbacksMap pending_client_callbacks_;
+
// Pending callbacks for FocusClient().
FocusClientCallbacksMap pending_focus_client_callbacks_;

Powered by Google App Engine
This is Rietveld 408576698