| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 Google Inc. All rights reserved. |
| 3 * Copyright (C) 2011 Ericsson AB. All rights reserved. | 3 * Copyright (C) 2011 Ericsson AB. All rights reserved. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
| 7 * are met: | 7 * are met: |
| 8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
| (...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 288 settings.setFacingMode("left"); | 288 settings.setFacingMode("left"); |
| 289 break; | 289 break; |
| 290 case WebMediaStreamTrack::FacingMode::Right: | 290 case WebMediaStreamTrack::FacingMode::Right: |
| 291 settings.setFacingMode("right"); | 291 settings.setFacingMode("right"); |
| 292 break; | 292 break; |
| 293 default: | 293 default: |
| 294 // None, or unknown facing mode. Ignore. | 294 // None, or unknown facing mode. Ignore. |
| 295 break; | 295 break; |
| 296 } | 296 } |
| 297 } | 297 } |
| 298 if (m_imageCapture) |
| 299 m_imageCapture->getMediaTrackSettings(settings); |
| 298 } | 300 } |
| 299 | 301 |
| 300 ScriptPromise MediaStreamTrack::applyConstraints( | 302 ScriptPromise MediaStreamTrack::applyConstraints( |
| 301 ScriptState* scriptState, | 303 ScriptState* scriptState, |
| 302 const MediaTrackConstraints& constraints) { | 304 const MediaTrackConstraints& constraints) { |
| 303 ScriptPromiseResolver* resolver = ScriptPromiseResolver::create(scriptState); | 305 ScriptPromiseResolver* resolver = ScriptPromiseResolver::create(scriptState); |
| 304 ScriptPromise promise = resolver->promise(); | 306 ScriptPromise promise = resolver->promise(); |
| 305 | 307 |
| 306 // |constraints| is an optional argument, which is strange. | 308 // |constraints| is an optional argument, which is strange. |
| 307 // TODO(mcasas): remove this provision if |constraints| is not optional: | 309 // TODO(mcasas): remove this provision if |constraints| is not optional: |
| (...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 406 | 408 |
| 407 DEFINE_TRACE(MediaStreamTrack) { | 409 DEFINE_TRACE(MediaStreamTrack) { |
| 408 visitor->trace(m_registeredMediaStreams); | 410 visitor->trace(m_registeredMediaStreams); |
| 409 visitor->trace(m_component); | 411 visitor->trace(m_component); |
| 410 visitor->trace(m_imageCapture); | 412 visitor->trace(m_imageCapture); |
| 411 EventTargetWithInlineData::trace(visitor); | 413 EventTargetWithInlineData::trace(visitor); |
| 412 ContextLifecycleObserver::trace(visitor); | 414 ContextLifecycleObserver::trace(visitor); |
| 413 } | 415 } |
| 414 | 416 |
| 415 } // namespace blink | 417 } // namespace blink |
| OLD | NEW |