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

Side by Side Diff: tools/telemetry/telemetry/internal/actions/media_action.js

Issue 1056133003: Move page/actions to internal/actions. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add copyright header. Created 5 years, 8 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 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 5
6 // This file provides common functions for media actions. 6 // This file provides common functions for media actions.
7 window.__findMediaElements = function(selector) { 7 window.__findMediaElements = function(selector) {
8 // Returns elements matching the selector, otherwise returns the first video 8 // Returns elements matching the selector, otherwise returns the first video
9 // or audio tag element that can be found. 9 // or audio tag element that can be found.
10 // If selector == 'all', returns all media elements. 10 // If selector == 'all', returns all media elements.
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 window.__registerHTML5EventCompleted = function(element, event_name) { 50 window.__registerHTML5EventCompleted = function(element, event_name) {
51 // Logs |even_name| on element when completed. 51 // Logs |even_name| on element when completed.
52 var logEventHappened = function(e) { 52 var logEventHappened = function(e) {
53 element[e.type + '_completed'] = true; 53 element[e.type + '_completed'] = true;
54 element.removeEventListener(event_name, logEventHappened); 54 element.removeEventListener(event_name, logEventHappened);
55 } 55 }
56 element.addEventListener(event_name, logEventHappened); 56 element.addEventListener(event_name, logEventHappened);
57 }; 57 };
58 58
59 window.__error = null; 59 window.__error = null;
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698