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

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

Issue 2565203002: Add a requestFullscreen variant with a default (prefixed) type (Closed)
Patch Set: Created 4 years 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 512 matching lines...) Expand 10 before | Expand all | Expand 10 after
523 void MediaControls::showOverlayCastButtonIfNeeded() { 523 void MediaControls::showOverlayCastButtonIfNeeded() {
524 if (mediaElement().shouldShowControls() || 524 if (mediaElement().shouldShowControls() ||
525 !shouldShowCastButton(mediaElement())) 525 !shouldShowCastButton(mediaElement()))
526 return; 526 return;
527 527
528 m_overlayCastButton->tryShowOverlay(); 528 m_overlayCastButton->tryShowOverlay();
529 resetHideMediaControlsTimer(); 529 resetHideMediaControlsTimer();
530 } 530 }
531 531
532 void MediaControls::enterFullscreen() { 532 void MediaControls::enterFullscreen() {
533 // TODO(foolip): switch to Fullscreen::UnprefixedRequest when the unprefixed 533 Fullscreen::requestFullscreen(mediaElement());
534 // Fullscreen API has launched.
535 Fullscreen::requestFullscreen(mediaElement(), Fullscreen::PrefixedRequest);
536 } 534 }
537 535
538 void MediaControls::exitFullscreen() { 536 void MediaControls::exitFullscreen() {
539 Fullscreen::exitFullscreen(document()); 537 Fullscreen::exitFullscreen(document());
540 } 538 }
541 539
542 void MediaControls::enteredFullscreen() { 540 void MediaControls::enteredFullscreen() {
543 m_fullscreenButton->setIsFullscreen(true); 541 m_fullscreenButton->setIsFullscreen(true);
544 stopHideMediaControlsTimer(); 542 stopHideMediaControlsTimer();
545 startHideMediaControlsTimer(); 543 startHideMediaControlsTimer();
(...skipping 377 matching lines...) Expand 10 before | Expand all | Expand 10 after
923 visitor->trace(m_overflowMenu); 921 visitor->trace(m_overflowMenu);
924 visitor->trace(m_overflowList); 922 visitor->trace(m_overflowList);
925 visitor->trace(m_castButton); 923 visitor->trace(m_castButton);
926 visitor->trace(m_overlayCastButton); 924 visitor->trace(m_overlayCastButton);
927 visitor->trace(m_mediaEventListener); 925 visitor->trace(m_mediaEventListener);
928 visitor->trace(m_windowEventListener); 926 visitor->trace(m_windowEventListener);
929 HTMLDivElement::trace(visitor); 927 HTMLDivElement::trace(visitor);
930 } 928 }
931 929
932 } // namespace blink 930 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/html/HTMLVideoElement.cpp ('k') | third_party/WebKit/Source/modules/vr/VRDisplay.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698