| OLD | NEW |
| (Empty) | |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 /** |
| 6 * @fileoverview Handles media events automation. |
| 7 */ |
| 8 |
| 9 goog.provide('MediaAutomationHandler'); |
| 10 |
| 11 goog.require('BaseAutomationHandler'); |
| 12 |
| 13 goog.scope(function() { |
| 14 var AutomationEvent = chrome.automation.AutomationEvent; |
| 15 var AutomationNode = chrome.automation.AutomationNode; |
| 16 var EventType = chrome.automation.EventType; |
| 17 var RoleType = chrome.automation.RoleType; |
| 18 |
| 19 /** |
| 20 * @param {!AutomationNode} node The root to observe media changes. |
| 21 * @constructor |
| 22 * @extends {BaseAutomationHandler} |
| 23 */ |
| 24 MediaAutomationHandler = function(node) { |
| 25 BaseAutomationHandler.call(this, node); |
| 26 |
| 27 var e = EventType; |
| 28 this.addListener_(e.mediaStartedPlaying, this.onMediaStartedPlaying); |
| 29 this.addListener_(e.mediaStoppedPlaying, this.onMediaStoppedPlaying); |
| 30 }; |
| 31 |
| 32 MediaAutomationHandler.prototype = { |
| 33 __proto__: BaseAutomationHandler.prototype, |
| 34 |
| 35 /** |
| 36 * @param {!AutomationEvent} evt |
| 37 */ |
| 38 onMediaStartedPlaying: function(evt) { |
| 39 }, |
| 40 |
| 41 /** |
| 42 * @param {!AutomationEvent} evt |
| 43 */ |
| 44 onMediaStoppedPlaying: function(evt) { |
| 45 } |
| 46 }; |
| 47 |
| 48 }); // goog.scope |
| OLD | NEW |