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

Side by Side Diff: third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerClients.cpp

Issue 2893823004: [Payments] Implement openWindow for service worker based payment handler (Closed)
Patch Set: rename ipc messages Created 3 years, 6 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 #include "modules/serviceworkers/ServiceWorkerClients.h" 5 #include "modules/serviceworkers/ServiceWorkerClients.h"
6 6
7 #include <memory> 7 #include <memory>
8 #include <utility> 8 #include <utility>
9 #include "bindings/core/v8/CallbackPromiseAdapter.h" 9 #include "bindings/core/v8/CallbackPromiseAdapter.h"
10 #include "bindings/core/v8/ScriptPromiseResolver.h" 10 #include "bindings/core/v8/ScriptPromiseResolver.h"
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
178 return promise; 178 return promise;
179 } 179 }
180 180
181 if (!context->IsWindowInteractionAllowed()) { 181 if (!context->IsWindowInteractionAllowed()) {
182 resolver->Reject(DOMException::Create(kInvalidAccessError, 182 resolver->Reject(DOMException::Create(kInvalidAccessError,
183 "Not allowed to open a window.")); 183 "Not allowed to open a window."));
184 return promise; 184 return promise;
185 } 185 }
186 context->ConsumeWindowInteraction(); 186 context->ConsumeWindowInteraction();
187 187
188 ServiceWorkerGlobalScopeClient::From(context)->OpenWindow( 188 ServiceWorkerGlobalScopeClient::From(context)->OpenWindowForClients(
189 parsed_url, WTF::MakeUnique<NavigateClientCallback>(resolver)); 189 parsed_url, WTF::MakeUnique<NavigateClientCallback>(resolver));
190 return promise; 190 return promise;
191 } 191 }
192 192
193 } // namespace blink 193 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698