| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2014 Google Inc. All rights reserved. | 2 * Copyright (C) 2014 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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 { | 42 { |
| 43 } | 43 } |
| 44 | 44 |
| 45 void WebMediaDevicesRequest::reset() | 45 void WebMediaDevicesRequest::reset() |
| 46 { | 46 { |
| 47 m_private.reset(); | 47 m_private.reset(); |
| 48 } | 48 } |
| 49 | 49 |
| 50 WebSecurityOrigin WebMediaDevicesRequest::getSecurityOrigin() const | 50 WebSecurityOrigin WebMediaDevicesRequest::getSecurityOrigin() const |
| 51 { | 51 { |
| 52 ASSERT(!isNull() && m_private->getExecutionContext()); | 52 DCHECK(!isNull()); |
| 53 DCHECK(m_private->getExecutionContext()); |
| 53 return WebSecurityOrigin(m_private->getExecutionContext()->getSecurityOrigin
()); | 54 return WebSecurityOrigin(m_private->getExecutionContext()->getSecurityOrigin
()); |
| 54 } | 55 } |
| 55 | 56 |
| 56 WebDocument WebMediaDevicesRequest::ownerDocument() const | 57 WebDocument WebMediaDevicesRequest::ownerDocument() const |
| 57 { | 58 { |
| 58 ASSERT(!isNull()); | 59 DCHECK(!isNull()); |
| 59 return WebDocument(m_private->ownerDocument()); | 60 return WebDocument(m_private->ownerDocument()); |
| 60 } | 61 } |
| 61 | 62 |
| 62 void WebMediaDevicesRequest::requestSucceeded(WebVector<WebMediaDeviceInfo> webD
evices) | 63 void WebMediaDevicesRequest::requestSucceeded(WebVector<WebMediaDeviceInfo> webD
evices) |
| 63 { | 64 { |
| 64 ASSERT(!isNull()); | 65 DCHECK(!isNull()); |
| 65 | 66 |
| 66 MediaDeviceInfoVector devices(webDevices.size()); | 67 MediaDeviceInfoVector devices(webDevices.size()); |
| 67 for (size_t i = 0; i < webDevices.size(); ++i) | 68 for (size_t i = 0; i < webDevices.size(); ++i) |
| 68 devices[i] = MediaDeviceInfo::create(webDevices[i]); | 69 devices[i] = MediaDeviceInfo::create(webDevices[i]); |
| 69 | 70 |
| 70 m_private->succeed(devices); | 71 m_private->succeed(devices); |
| 71 } | 72 } |
| 72 | 73 |
| 73 bool WebMediaDevicesRequest::equals(const WebMediaDevicesRequest& other) const | 74 bool WebMediaDevicesRequest::equals(const WebMediaDevicesRequest& other) const |
| 74 { | 75 { |
| 75 if (isNull() || other.isNull()) | 76 if (isNull() || other.isNull()) |
| 76 return false; | 77 return false; |
| 77 return m_private.get() == other.m_private.get(); | 78 return m_private.get() == other.m_private.get(); |
| 78 } | 79 } |
| 79 | 80 |
| 80 void WebMediaDevicesRequest::assign(const WebMediaDevicesRequest& other) | 81 void WebMediaDevicesRequest::assign(const WebMediaDevicesRequest& other) |
| 81 { | 82 { |
| 82 m_private = other.m_private; | 83 m_private = other.m_private; |
| 83 } | 84 } |
| 84 | 85 |
| 85 WebMediaDevicesRequest::operator MediaDevicesRequest*() const | 86 WebMediaDevicesRequest::operator MediaDevicesRequest*() const |
| 86 { | 87 { |
| 87 return m_private.get(); | 88 return m_private.get(); |
| 88 } | 89 } |
| 89 | 90 |
| 90 } // namespace blink | 91 } // namespace blink |
| OLD | NEW |