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

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

Issue 2681673002: [Blink>Media] Allow autoplay muted on Android by default (Closed)
Patch Set: Created 3 years, 10 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
« no previous file with comments | « components/test_runner/mock_content_settings_client.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc. All rights 2 * Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc. All rights
3 * reserved. 3 * 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 3852 matching lines...) Expand 10 before | Expand all | Expand 10 after
3863 } 3863 }
3864 3864
3865 return true; 3865 return true;
3866 } 3866 }
3867 3867
3868 bool HTMLMediaElement::isAutoplayAllowedPerSettings() const { 3868 bool HTMLMediaElement::isAutoplayAllowedPerSettings() const {
3869 LocalFrame* frame = document().frame(); 3869 LocalFrame* frame = document().frame();
3870 if (!frame) 3870 if (!frame)
3871 return false; 3871 return false;
3872 FrameLoaderClient* frameLoaderClient = frame->loader().client(); 3872 FrameLoaderClient* frameLoaderClient = frame->loader().client();
3873 return frameLoaderClient && frameLoaderClient->allowAutoplay(false); 3873 return frameLoaderClient && frameLoaderClient->allowAutoplay(true);
3874 } 3874 }
3875 3875
3876 void HTMLMediaElement::setNetworkState(NetworkState state) { 3876 void HTMLMediaElement::setNetworkState(NetworkState state) {
3877 if (m_networkState == state) 3877 if (m_networkState == state)
3878 return; 3878 return;
3879 3879
3880 m_networkState = state; 3880 m_networkState = state;
3881 if (mediaControls()) 3881 if (mediaControls())
3882 mediaControls()->networkStateChanged(); 3882 mediaControls()->networkStateChanged();
3883 } 3883 }
(...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after
4126 kMostlyFillViewportBecomeStableSeconds, BLINK_FROM_HERE); 4126 kMostlyFillViewportBecomeStableSeconds, BLINK_FROM_HERE);
4127 } 4127 }
4128 4128
4129 void HTMLMediaElement::viewportFillDebouncerTimerFired(TimerBase*) { 4129 void HTMLMediaElement::viewportFillDebouncerTimerFired(TimerBase*) {
4130 m_mostlyFillingViewport = true; 4130 m_mostlyFillingViewport = true;
4131 if (m_webMediaPlayer) 4131 if (m_webMediaPlayer)
4132 m_webMediaPlayer->becameDominantVisibleContent(m_mostlyFillingViewport); 4132 m_webMediaPlayer->becameDominantVisibleContent(m_mostlyFillingViewport);
4133 } 4133 }
4134 4134
4135 } // namespace blink 4135 } // namespace blink
OLDNEW
« no previous file with comments | « components/test_runner/mock_content_settings_client.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698