| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2008 Apple Inc. All Rights Reserved. | 2 * Copyright (C) 2008 Apple Inc. All Rights Reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 23 matching lines...) Expand all Loading... |
| 34 | 34 |
| 35 static void createChannel(MessagePort* port1, MessagePort* port2) | 35 static void createChannel(MessagePort* port1, MessagePort* port2) |
| 36 { | 36 { |
| 37 WebMessagePortChannel* channel1; | 37 WebMessagePortChannel* channel1; |
| 38 WebMessagePortChannel* channel2; | 38 WebMessagePortChannel* channel2; |
| 39 Platform::current()->createMessageChannel(&channel1, &channel2); | 39 Platform::current()->createMessageChannel(&channel1, &channel2); |
| 40 DCHECK(channel1); | 40 DCHECK(channel1); |
| 41 DCHECK(channel2); | 41 DCHECK(channel2); |
| 42 | 42 |
| 43 // Now entangle the proxies with the appropriate local ports. | 43 // Now entangle the proxies with the appropriate local ports. |
| 44 port1->entangle(adoptPtr(channel2)); | 44 port1->entangle(WebMessagePortChannelUniquePtr(channel2)); |
| 45 port2->entangle(adoptPtr(channel1)); | 45 port2->entangle(WebMessagePortChannelUniquePtr(channel1)); |
| 46 } | 46 } |
| 47 | 47 |
| 48 MessageChannel::MessageChannel(ExecutionContext* context) | 48 MessageChannel::MessageChannel(ExecutionContext* context) |
| 49 : m_port1(MessagePort::create(*context)) | 49 : m_port1(MessagePort::create(*context)) |
| 50 , m_port2(MessagePort::create(*context)) | 50 , m_port2(MessagePort::create(*context)) |
| 51 { | 51 { |
| 52 createChannel(m_port1.get(), m_port2.get()); | 52 createChannel(m_port1.get(), m_port2.get()); |
| 53 } | 53 } |
| 54 | 54 |
| 55 DEFINE_TRACE(MessageChannel) | 55 DEFINE_TRACE(MessageChannel) |
| 56 { | 56 { |
| 57 visitor->trace(m_port1); | 57 visitor->trace(m_port1); |
| 58 visitor->trace(m_port2); | 58 visitor->trace(m_port2); |
| 59 } | 59 } |
| 60 | 60 |
| 61 } // namespace blink | 61 } // namespace blink |
| OLD | NEW |