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

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

Issue 444173002: Let the effective media volume be 0 if the media element is muted (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rebase Created 6 years, 4 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 | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2011 Apple Inc. All rights reserved. 2 * Copyright (C) 2011 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 467 matching lines...) Expand 10 before | Expand all | Expand 10 after
478 478
479 void MediaController::bringElementUpToSpeed(HTMLMediaElement* element) 479 void MediaController::bringElementUpToSpeed(HTMLMediaElement* element)
480 { 480 {
481 ASSERT(element); 481 ASSERT(element);
482 ASSERT(m_mediaElements.contains(element)); 482 ASSERT(m_mediaElements.contains(element));
483 483
484 // When the user agent is to bring a media element up to speed with its new media controller, 484 // When the user agent is to bring a media element up to speed with its new media controller,
485 // it must seek that media element to the MediaController's media controller position relative 485 // it must seek that media element to the MediaController's media controller position relative
486 // to the media element's timeline. 486 // to the media element's timeline.
487 element->seek(currentTime(), IGNORE_EXCEPTION); 487 element->seek(currentTime(), IGNORE_EXCEPTION);
488
489 // Update volume to take controller volume and mute into account.
490 element->updateVolume();
488 } 491 }
489 492
490 bool MediaController::isRestrained() const 493 bool MediaController::isRestrained() const
491 { 494 {
492 ASSERT(!m_mediaElements.isEmpty()); 495 ASSERT(!m_mediaElements.isEmpty());
493 496
494 // A MediaController is a restrained media controller if the MediaController is a playing media 497 // A MediaController is a restrained media controller if the MediaController is a playing media
495 // controller, 498 // controller,
496 if (m_paused) 499 if (m_paused)
497 return false; 500 return false;
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
615 { 618 {
616 #if ENABLE(OILPAN) 619 #if ENABLE(OILPAN)
617 visitor->trace(m_mediaElements); 620 visitor->trace(m_mediaElements);
618 visitor->trace(m_pendingEventsQueue); 621 visitor->trace(m_pendingEventsQueue);
619 visitor->trace(m_executionContext); 622 visitor->trace(m_executionContext);
620 #endif 623 #endif
621 EventTargetWithInlineData::trace(visitor); 624 EventTargetWithInlineData::trace(visitor);
622 } 625 }
623 626
624 } 627 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698