OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 Google 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 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
56 { | 56 { |
57 return m_executionContext->securityOrigin()->toString(); | 57 return m_executionContext->securityOrigin()->toString(); |
58 } | 58 } |
59 | 59 |
60 void MediaStreamTrackSourcesRequestImpl::requestSucceeded(const WebVector<WebSou
rceInfo>& webSourceInfos) | 60 void MediaStreamTrackSourcesRequestImpl::requestSucceeded(const WebVector<WebSou
rceInfo>& webSourceInfos) |
61 { | 61 { |
62 ASSERT(m_callback); | 62 ASSERT(m_callback); |
63 | 63 |
64 for (size_t i = 0; i < webSourceInfos.size(); ++i) | 64 for (size_t i = 0; i < webSourceInfos.size(); ++i) |
65 m_sourceInfos.append(SourceInfo::create(webSourceInfos[i])); | 65 m_sourceInfos.append(SourceInfo::create(webSourceInfos[i])); |
66 m_executionContext->postTask(FROM_HERE, createCrossThreadTask(&MediaStreamTr
ackSourcesRequestImpl::performCallback, this)); | 66 m_executionContext->postTask(BLINK_FROM_HERE, createCrossThreadTask(&MediaSt
reamTrackSourcesRequestImpl::performCallback, this)); |
67 } | 67 } |
68 | 68 |
69 void MediaStreamTrackSourcesRequestImpl::performCallback() | 69 void MediaStreamTrackSourcesRequestImpl::performCallback() |
70 { | 70 { |
71 m_callback->handleEvent(m_sourceInfos); | 71 m_callback->handleEvent(m_sourceInfos); |
72 m_callback.clear(); | 72 m_callback.clear(); |
73 } | 73 } |
74 | 74 |
75 DEFINE_TRACE(MediaStreamTrackSourcesRequestImpl) | 75 DEFINE_TRACE(MediaStreamTrackSourcesRequestImpl) |
76 { | 76 { |
77 visitor->trace(m_callback); | 77 visitor->trace(m_callback); |
78 visitor->trace(m_executionContext); | 78 visitor->trace(m_executionContext); |
79 visitor->trace(m_sourceInfos); | 79 visitor->trace(m_sourceInfos); |
80 MediaStreamTrackSourcesRequest::trace(visitor); | 80 MediaStreamTrackSourcesRequest::trace(visitor); |
81 } | 81 } |
82 | 82 |
83 } // namespace blink | 83 } // namespace blink |
OLD | NEW |