 # Note: Order matters here.
 CompletionEngines = [
   Youtube
+  GoogleMaps
   Google
   DuckDuckGo
   Wikipedia


class Google extends GoogleXMLRegexpEngine
  # Example search URL: http://www.google.com/search?q=%s
  constructor: ->
    super [
      # We match the major English-speaking TLDs.
      new RegExp "^https?://[a-z]+\.google\.(com|ie|co\.uk|ca|com\.au)/"
      new RegExp "localhost/cgi-bin/booky" # Only for smblott.
      ]

  getUrl: (queryTerms) ->
    Utils.createSearchUrl queryTerms,
      "http://suggestqueries.google.com/complete/search?ss_protocol=legace&client=toolbar&q=%s"

class Youtube extends GoogleXMLRegexpEngine
  # Example search URL: http://www.youtube.com/results?search_query=%s


  parse: (xhr) ->
    JSON.parse(xhr.responseText)[1]

class Bing extends RegexpEngine
  # Example search URL: https://www.bing.com/search?q=%s
