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

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

Issue 17391015: Add support for clicking to play/pause <video> (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 6 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 | « Source/core/html/HTMLMediaElement.h ('k') | Source/core/page/Settings.in » ('j') | 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 reserved. 2 * Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012, 2013 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 3473 matching lines...) Expand 10 before | Expand all | Expand 10 after
3484 3484
3485 if (renderer()) 3485 if (renderer())
3486 renderer()->updateFromElement(); 3486 renderer()->updateFromElement();
3487 } 3487 }
3488 3488
3489 bool HTMLMediaElement::hasPendingActivity() const 3489 bool HTMLMediaElement::hasPendingActivity() const
3490 { 3490 {
3491 return (hasAudio() && isPlaying()) || m_asyncEventQueue->hasPendingEvents(); 3491 return (hasAudio() && isPlaying()) || m_asyncEventQueue->hasPendingEvents();
3492 } 3492 }
3493 3493
3494 void HTMLMediaElement::defaultEventHandler(Event* event)
3495 {
3496 if (isVideo() && event->type() == eventNames().clickEvent && document()->set tings()
3497 && document()->settings()->clickToPlayPauseVideo()) {
3498 if (paused())
3499 play();
3500 else
3501 pause();
3502 return;
3503 }
3504 HTMLElement::defaultEventHandler(event);
3505 }
3506
3494 bool HTMLMediaElement::isFullscreen() const 3507 bool HTMLMediaElement::isFullscreen() const
3495 { 3508 {
3496 return FullscreenController::isActiveFullScreenElement(this); 3509 return FullscreenController::isActiveFullScreenElement(this);
3497 } 3510 }
3498 3511
3499 void HTMLMediaElement::enterFullscreen() 3512 void HTMLMediaElement::enterFullscreen()
3500 { 3513 {
3501 LOG(Media, "HTMLMediaElement::enterFullscreen"); 3514 LOG(Media, "HTMLMediaElement::enterFullscreen");
3502 3515
3503 if (document()->settings() && document()->settings()->fullScreenEnabled()) 3516 if (document()->settings() && document()->settings()->fullScreenEnabled())
(...skipping 467 matching lines...) Expand 10 before | Expand all | Expand 10 after
3971 info.addMember(m_mediaGroup, "mediaGroup"); 3984 info.addMember(m_mediaGroup, "mediaGroup");
3972 info.addMember(m_mediaController, "mediaController"); 3985 info.addMember(m_mediaController, "mediaController");
3973 3986
3974 #if ENABLE(WEB_AUDIO) 3987 #if ENABLE(WEB_AUDIO)
3975 info.addMember(m_audioSourceNode, "audioSourceNode"); 3988 info.addMember(m_audioSourceNode, "audioSourceNode");
3976 #endif 3989 #endif
3977 3990
3978 } 3991 }
3979 3992
3980 } 3993 }
OLDNEW
« no previous file with comments | « Source/core/html/HTMLMediaElement.h ('k') | Source/core/page/Settings.in » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698