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

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

Issue 2728193003: Show download button even when preload=none (Closed)
Patch Set: Created 3 years, 9 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) 2011, 2012 Apple Inc. All rights reserved. 2 * Copyright (C) 2011, 2012 Apple Inc. All rights reserved.
3 * Copyright (C) 2011, 2012 Google Inc. All rights reserved. 3 * Copyright (C) 2011, 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 * 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 936 matching lines...) Expand 10 before | Expand all | Expand 10 after
947 } 947 }
948 948
949 void MediaControls::networkStateChanged() { 949 void MediaControls::networkStateChanged() {
950 invalidate(m_playButton); 950 invalidate(m_playButton);
951 invalidate(m_overlayPlayButton); 951 invalidate(m_overlayPlayButton);
952 invalidate(m_muteButton); 952 invalidate(m_muteButton);
953 invalidate(m_fullscreenButton); 953 invalidate(m_fullscreenButton);
954 invalidate(m_downloadButton); 954 invalidate(m_downloadButton);
955 invalidate(m_timeline); 955 invalidate(m_timeline);
956 invalidate(m_volumeSlider); 956 invalidate(m_volumeSlider);
957
958 reset();
mlamouri (slow - plz ping) 2017/03/04 14:10:01 `reset()` is a nuclear weapon. We don't want to re
steimel 2017/03/06 17:44:12 Changed to just directly update the download butto
957 } 959 }
958 960
959 bool MediaControls::overflowMenuVisible() { 961 bool MediaControls::overflowMenuVisible() {
960 return m_overflowList ? m_overflowList->isWanted() : false; 962 return m_overflowList ? m_overflowList->isWanted() : false;
961 } 963 }
962 964
963 void MediaControls::toggleOverflowMenu() { 965 void MediaControls::toggleOverflowMenu() {
964 DCHECK(m_overflowList); 966 DCHECK(m_overflowList);
965 967
966 if (!m_overflowList->isWanted()) 968 if (!m_overflowList->isWanted())
(...skipping 30 matching lines...) Expand all
997 visitor->trace(m_overflowList); 999 visitor->trace(m_overflowList);
998 visitor->trace(m_castButton); 1000 visitor->trace(m_castButton);
999 visitor->trace(m_overlayCastButton); 1001 visitor->trace(m_overlayCastButton);
1000 visitor->trace(m_mediaEventListener); 1002 visitor->trace(m_mediaEventListener);
1001 visitor->trace(m_windowEventListener); 1003 visitor->trace(m_windowEventListener);
1002 visitor->trace(m_orientationLockDelegate); 1004 visitor->trace(m_orientationLockDelegate);
1003 HTMLDivElement::trace(visitor); 1005 HTMLDivElement::trace(visitor);
1004 } 1006 }
1005 1007
1006 } // namespace blink 1008 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698