Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(297)

Side by Side Diff: Source/core/html/HTMLMediaElement.cpp

Issue 656723005: Use C++11 features in core/html (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Use meaningful names Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc. All rights reserved. 2 * Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple 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 3834 matching lines...) Expand 10 before | Expand all | Expand 10 after
3845 // 2. Let m have no current media controller, if it currently has one. 3845 // 2. Let m have no current media controller, if it currently has one.
3846 setControllerInternal(nullptr); 3846 setControllerInternal(nullptr);
3847 3847
3848 // 3. If m's mediagroup attribute is being removed, then abort these steps. 3848 // 3. If m's mediagroup attribute is being removed, then abort these steps.
3849 if (group.isNull() || group.isEmpty()) 3849 if (group.isNull() || group.isEmpty())
3850 return; 3850 return;
3851 3851
3852 // 4. If there is another media element whose Document is the same as m's Do cument (even if one or both 3852 // 4. If there is another media element whose Document is the same as m's Do cument (even if one or both
3853 // of these elements are not actually in the Document), 3853 // of these elements are not actually in the Document),
3854 WeakMediaElementSet elements = documentToElementSetMap().get(&document()); 3854 WeakMediaElementSet elements = documentToElementSetMap().get(&document());
3855 for (WeakMediaElementSet::iterator i = elements.begin(); i != elements.end() ; ++i) { 3855 for (const auto& i : elements) {
sof 2014/10/21 09:58:43 Let's go with a longer name -- element?
riju_ 2014/11/04 17:50:52 Done.
3856 if (*i == this) 3856 if (i == this)
3857 continue; 3857 continue;
3858 3858
3859 // and which also has a mediagroup attribute, and whose mediagroup attri bute has the same value as 3859 // and which also has a mediagroup attribute, and whose mediagroup attri bute has the same value as
3860 // the new value of m's mediagroup attribute, 3860 // the new value of m's mediagroup attribute,
3861 if ((*i)->mediaGroup() == group) { 3861 if (i->mediaGroup() == group) {
3862 // then let controller be that media element's current media contro ller. 3862 // then let controller be that media element's current media contro ller.
3863 setControllerInternal((*i)->controller()); 3863 setControllerInternal(i->controller());
3864 return; 3864 return;
3865 } 3865 }
3866 } 3866 }
3867 3867
3868 // Otherwise, let controller be a newly created MediaController. 3868 // Otherwise, let controller be a newly created MediaController.
3869 setControllerInternal(MediaController::create(Node::executionContext())); 3869 setControllerInternal(MediaController::create(Node::executionContext()));
3870 } 3870 }
3871 3871
3872 MediaController* HTMLMediaElement::controller() const 3872 MediaController* HTMLMediaElement::controller() const
3873 { 3873 {
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
4029 4029
4030 #if ENABLE(WEB_AUDIO) 4030 #if ENABLE(WEB_AUDIO)
4031 void HTMLMediaElement::clearWeakMembers(Visitor* visitor) 4031 void HTMLMediaElement::clearWeakMembers(Visitor* visitor)
4032 { 4032 {
4033 if (!visitor->isAlive(m_audioSourceNode) && audioSourceProvider()) 4033 if (!visitor->isAlive(m_audioSourceNode) && audioSourceProvider())
4034 audioSourceProvider()->setClient(0); 4034 audioSourceProvider()->setClient(0);
4035 } 4035 }
4036 #endif 4036 #endif
4037 4037
4038 } 4038 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698