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

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

Issue 2677173002: [Blink>Media] Allow autoplay muted on Android by default (Closed)
Patch Set: fixed layout tests 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 3854 matching lines...) Expand 10 before | Expand all | Expand 10 after
3865 } 3865 }
3866 3866
3867 return true; 3867 return true;
3868 } 3868 }
3869 3869
3870 bool HTMLMediaElement::isAutoplayAllowedPerSettings() const { 3870 bool HTMLMediaElement::isAutoplayAllowedPerSettings() const {
3871 LocalFrame* frame = document().frame(); 3871 LocalFrame* frame = document().frame();
3872 if (!frame) 3872 if (!frame)
3873 return false; 3873 return false;
3874 FrameLoaderClient* frameLoaderClient = frame->loader().client(); 3874 FrameLoaderClient* frameLoaderClient = frame->loader().client();
3875 return frameLoaderClient && frameLoaderClient->allowAutoplay(false); 3875 return frameLoaderClient && frameLoaderClient->allowAutoplay(true);
3876 } 3876 }
3877 3877
3878 void HTMLMediaElement::setNetworkState(NetworkState state) { 3878 void HTMLMediaElement::setNetworkState(NetworkState state) {
3879 if (m_networkState == state) 3879 if (m_networkState == state)
3880 return; 3880 return;
3881 3881
3882 m_networkState = state; 3882 m_networkState = state;
3883 if (mediaControls()) 3883 if (mediaControls())
3884 mediaControls()->networkStateChanged(); 3884 mediaControls()->networkStateChanged();
3885 } 3885 }
(...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after
4128 kMostlyFillViewportBecomeStableSeconds, BLINK_FROM_HERE); 4128 kMostlyFillViewportBecomeStableSeconds, BLINK_FROM_HERE);
4129 } 4129 }
4130 4130
4131 void HTMLMediaElement::viewportFillDebouncerTimerFired(TimerBase*) { 4131 void HTMLMediaElement::viewportFillDebouncerTimerFired(TimerBase*) {
4132 m_mostlyFillingViewport = true; 4132 m_mostlyFillingViewport = true;
4133 if (m_webMediaPlayer) 4133 if (m_webMediaPlayer)
4134 m_webMediaPlayer->becameDominantVisibleContent(m_mostlyFillingViewport); 4134 m_webMediaPlayer->becameDominantVisibleContent(m_mostlyFillingViewport);
4135 } 4135 }
4136 4136
4137 } // namespace blink 4137 } // 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