| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 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 are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 24 matching lines...) Expand all Loading... |
| 35 #include "public/platform/WebMediaConstraints.h" | 35 #include "public/platform/WebMediaConstraints.h" |
| 36 #include "public/platform/WebMediaStream.h" | 36 #include "public/platform/WebMediaStream.h" |
| 37 #include "public/platform/WebMediaStreamSource.h" | 37 #include "public/platform/WebMediaStreamSource.h" |
| 38 #include "public/platform/WebString.h" | 38 #include "public/platform/WebString.h" |
| 39 #include "public/platform/WebVector.h" | 39 #include "public/platform/WebVector.h" |
| 40 #include <wtf/Vector.h> | 40 #include <wtf/Vector.h> |
| 41 #include "WebDocument.h" | 41 #include "WebDocument.h" |
| 42 #include "WebSecurityOrigin.h" | 42 #include "WebSecurityOrigin.h" |
| 43 #include "core/dom/Document.h" | 43 #include "core/dom/Document.h" |
| 44 #include "core/platform/mediastream/MediaConstraints.h" | 44 #include "core/platform/mediastream/MediaConstraints.h" |
| 45 #include "core/platform/mediastream/MediaStreamDescriptor.h" |
| 45 #include "core/platform/mediastream/MediaStreamSource.h" | 46 #include "core/platform/mediastream/MediaStreamSource.h" |
| 46 #include "modules/mediastream/UserMediaRequest.h" | 47 #include "modules/mediastream/UserMediaRequest.h" |
| 47 #include "weborigin/SecurityOrigin.h" | 48 #include "weborigin/SecurityOrigin.h" |
| 48 | 49 |
| 49 using namespace WebCore; | 50 using namespace WebCore; |
| 50 | 51 |
| 51 namespace WebKit { | 52 namespace WebKit { |
| 52 | 53 |
| 53 WebUserMediaRequest::WebUserMediaRequest(const PassRefPtr<UserMediaRequest>& req
uest) | 54 WebUserMediaRequest::WebUserMediaRequest(const PassRefPtr<UserMediaRequest>& req
uest) |
| 54 : m_private(request) | 55 : m_private(request) |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 89 ASSERT(!isNull() && m_private->scriptExecutionContext()); | 90 ASSERT(!isNull() && m_private->scriptExecutionContext()); |
| 90 return WebSecurityOrigin(m_private->scriptExecutionContext()->securityOrigin
()); | 91 return WebSecurityOrigin(m_private->scriptExecutionContext()->securityOrigin
()); |
| 91 } | 92 } |
| 92 | 93 |
| 93 WebDocument WebUserMediaRequest::ownerDocument() const | 94 WebDocument WebUserMediaRequest::ownerDocument() const |
| 94 { | 95 { |
| 95 ASSERT(!isNull()); | 96 ASSERT(!isNull()); |
| 96 return WebDocument(m_private->ownerDocument()); | 97 return WebDocument(m_private->ownerDocument()); |
| 97 } | 98 } |
| 98 | 99 |
| 99 void WebUserMediaRequest::requestSucceeded(const WebMediaStream& webStream) | 100 void WebUserMediaRequest::requestSucceeded(const WebMediaStream& streamDescripto
r) |
| 100 { | 101 { |
| 101 ASSERT(!isNull() && !webStream.isNull()); | 102 ASSERT(!isNull() && !streamDescriptor.isNull()); |
| 102 m_private->succeed(webStream); | 103 m_private->succeed(streamDescriptor); |
| 103 } | 104 } |
| 104 | 105 |
| 105 void WebUserMediaRequest::requestFailed(const WebString& description) | 106 void WebUserMediaRequest::requestFailed(const WebString& description) |
| 106 { | 107 { |
| 107 ASSERT(!isNull()); | 108 ASSERT(!isNull()); |
| 108 m_private->fail(description); | 109 m_private->fail(description); |
| 109 } | 110 } |
| 110 | 111 |
| 111 void WebUserMediaRequest::requestFailedConstraint(const WebString& constraintNam
e, const WebString& description) | 112 void WebUserMediaRequest::requestFailedConstraint(const WebString& constraintNam
e, const WebString& description) |
| 112 { | 113 { |
| (...skipping 12 matching lines...) Expand all Loading... |
| 125 { | 126 { |
| 126 m_private = other.m_private; | 127 m_private = other.m_private; |
| 127 } | 128 } |
| 128 | 129 |
| 129 WebUserMediaRequest::operator UserMediaRequest*() const | 130 WebUserMediaRequest::operator UserMediaRequest*() const |
| 130 { | 131 { |
| 131 return m_private.get(); | 132 return m_private.get(); |
| 132 } | 133 } |
| 133 | 134 |
| 134 } // namespace WebKit | 135 } // namespace WebKit |
| OLD | NEW |