| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011 Ericsson AB. All rights reserved. | 2 * Copyright (C) 2011 Ericsson AB. All rights reserved. |
| 3 * Copyright (C) 2012 Google Inc. All rights reserved. | 3 * Copyright (C) 2012 Google Inc. 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 * | 8 * |
| 9 * 1. Redistributions of source code must retain the above copyright | 9 * 1. Redistributions of source code must retain the above copyright |
| 10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
| (...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 216 void UserMediaRequest::failUASpecific(const String& name, | 216 void UserMediaRequest::failUASpecific(const String& name, |
| 217 const String& message, | 217 const String& message, |
| 218 const String& constraintName) { | 218 const String& constraintName) { |
| 219 DCHECK(!name.isEmpty()); | 219 DCHECK(!name.isEmpty()); |
| 220 if (!getExecutionContext()) | 220 if (!getExecutionContext()) |
| 221 return; | 221 return; |
| 222 m_errorCallback->handleEvent( | 222 m_errorCallback->handleEvent( |
| 223 NavigatorUserMediaError::create(name, message, constraintName)); | 223 NavigatorUserMediaError::create(name, message, constraintName)); |
| 224 } | 224 } |
| 225 | 225 |
| 226 void UserMediaRequest::contextDestroyed() { | 226 void UserMediaRequest::contextDestroyed(ExecutionContext*) { |
| 227 if (m_controller) { | 227 if (m_controller) { |
| 228 m_controller->cancelUserMediaRequest(this); | 228 m_controller->cancelUserMediaRequest(this); |
| 229 m_controller = nullptr; | 229 m_controller = nullptr; |
| 230 } | 230 } |
| 231 | |
| 232 ContextLifecycleObserver::contextDestroyed(); | |
| 233 } | 231 } |
| 234 | 232 |
| 235 DEFINE_TRACE(UserMediaRequest) { | 233 DEFINE_TRACE(UserMediaRequest) { |
| 236 visitor->trace(m_controller); | 234 visitor->trace(m_controller); |
| 237 visitor->trace(m_successCallback); | 235 visitor->trace(m_successCallback); |
| 238 visitor->trace(m_errorCallback); | 236 visitor->trace(m_errorCallback); |
| 239 ContextLifecycleObserver::trace(visitor); | 237 ContextLifecycleObserver::trace(visitor); |
| 240 } | 238 } |
| 241 | 239 |
| 242 } // namespace blink | 240 } // namespace blink |
| OLD | NEW |