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 "config.h" | 5 #include "config.h" |
6 #include "modules/navigatorconnect/NavigatorConnect.h" | 6 #include "modules/navigatorconnect/NavigatorConnect.h" |
7 | 7 |
8 #include "bindings/core/v8/ScriptPromiseResolver.h" | 8 #include "bindings/core/v8/ScriptPromiseResolver.h" |
9 #include "core/dom/DOMException.h" | 9 #include "core/dom/DOMException.h" |
10 #include "core/dom/ExceptionCode.h" | 10 #include "core/dom/ExceptionCode.h" |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
68 // it) is passed to the content layer to be transfered to the service | 68 // it) is passed to the content layer to be transfered to the service |
69 // provider. | 69 // provider. |
70 // - Ownership of the MessageChannel object itself will be released at the | 70 // - Ownership of the MessageChannel object itself will be released at the |
71 // end of this method. This is okay as it's the ports themselves that | 71 // end of this method. This is okay as it's the ports themselves that |
72 // represent the actual message channel. MessageChannel is only used to | 72 // represent the actual message channel. MessageChannel is only used to |
73 // create a pair of ports. | 73 // create a pair of ports. |
74 RefPtrWillBeRawPtr<MessageChannel> channel(MessageChannel::create(scriptStat
e->executionContext())); | 74 RefPtrWillBeRawPtr<MessageChannel> channel(MessageChannel::create(scriptStat
e->executionContext())); |
75 OwnPtr<WebMessagePortChannel> webchannel = channel->port2()->disentangle(); | 75 OwnPtr<WebMessagePortChannel> webchannel = channel->port2()->disentangle(); |
76 provider->connect( | 76 provider->connect( |
77 scriptState->executionContext()->completeURL(url), | 77 scriptState->executionContext()->completeURL(url), |
| 78 scriptState->executionContext()->securityOrigin()->toString(), |
78 webchannel.leakPtr(), | 79 webchannel.leakPtr(), |
79 new ConnectCallbacks(resolver, channel->port1())); | 80 new ConnectCallbacks(resolver, channel->port1())); |
80 return promise; | 81 return promise; |
81 } | 82 } |
82 | 83 |
83 | 84 |
84 } // namespace blink | 85 } // namespace blink |
OLD | NEW |