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 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
55 { | 55 { |
56 return m_executionContext->getSecurityOrigin()->isolatedCopy(); | 56 return m_executionContext->getSecurityOrigin()->isolatedCopy(); |
57 } | 57 } |
58 | 58 |
59 void MediaStreamTrackSourcesRequestImpl::requestSucceeded(const WebVector<WebSou
rceInfo>& webSourceInfos) | 59 void MediaStreamTrackSourcesRequestImpl::requestSucceeded(const WebVector<WebSou
rceInfo>& webSourceInfos) |
60 { | 60 { |
61 DCHECK(m_callback); | 61 DCHECK(m_callback); |
62 | 62 |
63 for (size_t i = 0; i < webSourceInfos.size(); ++i) | 63 for (size_t i = 0; i < webSourceInfos.size(); ++i) |
64 m_sourceInfos.append(SourceInfo::create(webSourceInfos[i])); | 64 m_sourceInfos.append(SourceInfo::create(webSourceInfos[i])); |
65 m_executionContext->postTask(BLINK_FROM_HERE, createCrossThreadTask(&MediaSt
reamTrackSourcesRequestImpl::performCallback, AllowCrossThreadAccess(this))); | 65 m_executionContext->postTask(BLINK_FROM_HERE, createCrossThreadTask(&MediaSt
reamTrackSourcesRequestImpl::performCallback, this)); |
66 } | 66 } |
67 | 67 |
68 void MediaStreamTrackSourcesRequestImpl::performCallback() | 68 void MediaStreamTrackSourcesRequestImpl::performCallback() |
69 { | 69 { |
70 m_callback->handleEvent(m_sourceInfos); | 70 m_callback->handleEvent(m_sourceInfos); |
71 m_callback.clear(); | 71 m_callback.clear(); |
72 } | 72 } |
73 | 73 |
74 DEFINE_TRACE(MediaStreamTrackSourcesRequestImpl) | 74 DEFINE_TRACE(MediaStreamTrackSourcesRequestImpl) |
75 { | 75 { |
76 visitor->trace(m_callback); | 76 visitor->trace(m_callback); |
77 visitor->trace(m_executionContext); | 77 visitor->trace(m_executionContext); |
78 visitor->trace(m_sourceInfos); | 78 visitor->trace(m_sourceInfos); |
79 MediaStreamTrackSourcesRequest::trace(visitor); | 79 MediaStreamTrackSourcesRequest::trace(visitor); |
80 } | 80 } |
81 | 81 |
82 } // namespace blink | 82 } // namespace blink |
OLD | NEW |