[Extensions] Make extension message bubble factory platform-abstract
[chromium-blink-merge.git] / chrome / browser / resources / chromeos / chromevox / extensions / searchvox / abstract_result.js
blob7bf16b3bc7d08ac9cca207fcf464a4dd475ec7a9
1 // Copyright 2014 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.
6 /**
7 * @fileoverview Defines a result type interface.
8 */
10 goog.provide('cvox.AbstractResult');
12 goog.require('cvox.SearchUtil');
14 /**
15 * @constructor
17 cvox.AbstractResult = function() { };
19 /**
20 * Checks the result if it is an unknown result.
21 * @param {Element} result Result to be checked.
22 * @return {boolean} Whether or not the element is an unknown result.
24 cvox.AbstractResult.prototype.isType = function(result) {
25 return false;
28 /**
29 * Speak a generic search result.
30 * @param {Element} result Generic result to be spoken.
31 * @return {boolean} Whether or not the result was spoken.
33 cvox.AbstractResult.prototype.speak = function(result) {
34 return false;
37 /**
38 * Extracts the wikipedia URL from knowledge panel.
39 * @param {Element} result Result to extract from.
40 * @return {?string} URL.
42 cvox.AbstractResult.prototype.getURL = cvox.SearchUtil.extractURL;
44 /**
45 * Returns the node to sync to.
46 * @param {Element} result Result.
47 * @return {?Node} Node to sync to.
49 cvox.AbstractResult.prototype.getSyncNode = function(result) {
50 return result;