| 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 #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 Loading... |
| 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 |
| OLD | NEW |