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 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
49 | 49 |
50 MediaStreamTrackSourcesRequestImpl::~MediaStreamTrackSourcesRequestImpl() | 50 MediaStreamTrackSourcesRequestImpl::~MediaStreamTrackSourcesRequestImpl() |
51 { | 51 { |
52 } | 52 } |
53 | 53 |
54 String MediaStreamTrackSourcesRequestImpl::origin() | 54 String MediaStreamTrackSourcesRequestImpl::origin() |
55 { | 55 { |
56 return m_executionContext->securityOrigin()->toString(); | 56 return m_executionContext->securityOrigin()->toString(); |
57 } | 57 } |
58 | 58 |
59 void MediaStreamTrackSourcesRequestImpl::requestSucceeded(const blink::WebVector
<blink::WebSourceInfo>& webSourceInfos) | 59 void MediaStreamTrackSourcesRequestImpl::requestSucceeded(const WebVector<WebSou
rceInfo>& webSourceInfos) |
60 { | 60 { |
61 ASSERT(m_callback); | 61 ASSERT(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(createCrossThreadTask(&MediaStreamTrackSourcesR
equestImpl::performCallback, this)); | 65 m_executionContext->postTask(createCrossThreadTask(&MediaStreamTrackSourcesR
equestImpl::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 void MediaStreamTrackSourcesRequestImpl::trace(Visitor* visitor) | 74 void MediaStreamTrackSourcesRequestImpl::trace(Visitor* visitor) |
75 { | 75 { |
76 visitor->trace(m_executionContext); | 76 visitor->trace(m_executionContext); |
77 visitor->trace(m_sourceInfos); | 77 visitor->trace(m_sourceInfos); |
78 MediaStreamTrackSourcesRequest::trace(visitor); | 78 MediaStreamTrackSourcesRequest::trace(visitor); |
79 } | 79 } |
80 | 80 |
81 } // namespace blink | 81 } // namespace blink |
OLD | NEW |