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

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

Issue 1680143002: Simulate click through gamepad BUTTON_A (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
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 19 matching lines...) Expand all
30 #include "bindings/core/v8/ScriptController.h" 30 #include "bindings/core/v8/ScriptController.h"
31 #include "bindings/core/v8/ScriptEventListener.h" 31 #include "bindings/core/v8/ScriptEventListener.h"
32 #include "core/HTMLNames.h" 32 #include "core/HTMLNames.h"
33 #include "core/css/MediaList.h" 33 #include "core/css/MediaList.h"
34 #include "core/dom/Attribute.h" 34 #include "core/dom/Attribute.h"
35 #include "core/dom/ElementTraversal.h" 35 #include "core/dom/ElementTraversal.h"
36 #include "core/dom/ExceptionCode.h" 36 #include "core/dom/ExceptionCode.h"
37 #include "core/dom/Fullscreen.h" 37 #include "core/dom/Fullscreen.h"
38 #include "core/dom/shadow/ShadowRoot.h" 38 #include "core/dom/shadow/ShadowRoot.h"
39 #include "core/events/Event.h" 39 #include "core/events/Event.h"
40 #include "core/events/KeyboardEvent.h"
40 #include "core/frame/LocalFrame.h" 41 #include "core/frame/LocalFrame.h"
41 #include "core/frame/Settings.h" 42 #include "core/frame/Settings.h"
42 #include "core/frame/UseCounter.h" 43 #include "core/frame/UseCounter.h"
43 #include "core/frame/csp/ContentSecurityPolicy.h" 44 #include "core/frame/csp/ContentSecurityPolicy.h"
44 #include "core/html/HTMLMediaSource.h" 45 #include "core/html/HTMLMediaSource.h"
45 #include "core/html/HTMLSourceElement.h" 46 #include "core/html/HTMLSourceElement.h"
46 #include "core/html/HTMLTrackElement.h" 47 #include "core/html/HTMLTrackElement.h"
47 #include "core/html/MediaError.h" 48 #include "core/html/MediaError.h"
48 #include "core/html/MediaFragmentURIParser.h" 49 #include "core/html/MediaFragmentURIParser.h"
49 #include "core/html/TimeRanges.h" 50 #include "core/html/TimeRanges.h"
(...skipping 3432 matching lines...) Expand 10 before | Expand all | Expand 10 after
3482 m_mediaSource->setWebMediaSourceAndOpen(adoptPtr(webMediaSource)); 3483 m_mediaSource->setWebMediaSourceAndOpen(adoptPtr(webMediaSource));
3483 } 3484 }
3484 3485
3485 bool HTMLMediaElement::isInteractiveContent() const 3486 bool HTMLMediaElement::isInteractiveContent() const
3486 { 3487 {
3487 return fastHasAttribute(controlsAttr); 3488 return fastHasAttribute(controlsAttr);
3488 } 3489 }
3489 3490
3490 void HTMLMediaElement::defaultEventHandler(Event* event) 3491 void HTMLMediaElement::defaultEventHandler(Event* event)
3491 { 3492 {
3493 if (event->type() == EventTypeNames::keydown && toKeyboardEvent(event)->keyI dentifier() == "Enter") {
dtapuska 2016/02/09 14:29:03 I'd prefer if this was using domCode() as opposed
dtapuska 2016/02/09 14:34:38 Seeing what you are doing later on; mapping a the
3494 togglePlayState();
3495 event->setDefaultHandled();
3496 }
3492 if (event->type() == EventTypeNames::focusin) { 3497 if (event->type() == EventTypeNames::focusin) {
3493 if (mediaControls()) 3498 if (mediaControls())
3494 mediaControls()->mediaElementFocused(); 3499 mediaControls()->mediaElementFocused();
3495 } 3500 }
3496 HTMLElement::defaultEventHandler(event); 3501 HTMLElement::defaultEventHandler(event);
3497 } 3502 }
3498 3503
3499 DEFINE_TRACE(HTMLMediaElement) 3504 DEFINE_TRACE(HTMLMediaElement)
3500 { 3505 {
3501 #if ENABLE(OILPAN) 3506 #if ENABLE(OILPAN)
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
3651 visitor->trace(m_client); 3656 visitor->trace(m_client);
3652 } 3657 }
3653 3658
3654 DEFINE_TRACE(HTMLMediaElement::AudioSourceProviderImpl) 3659 DEFINE_TRACE(HTMLMediaElement::AudioSourceProviderImpl)
3655 { 3660 {
3656 visitor->trace(m_client); 3661 visitor->trace(m_client);
3657 } 3662 }
3658 #endif 3663 #endif
3659 3664
3660 } 3665 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698