OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 // 'use strict'; TODO(vadimt): Uncomment once crbug.com/237617 is fixed. | 5 'use strict'; |
6 | 6 |
7 /** | 7 /** |
8 * @fileoverview The event page for Google Now for Chrome implementation. | 8 * @fileoverview The event page for Google Now for Chrome implementation. |
9 * The Google Now event page gets Google Now cards from the server and shows | 9 * The Google Now event page gets Google Now cards from the server and shows |
10 * them as Chrome notifications. | 10 * them as Chrome notifications. |
11 * The service performs periodic updating of Google Now cards. | 11 * The service performs periodic updating of Google Now cards. |
12 * Each updating of the cards includes 4 steps: | 12 * Each updating of the cards includes 4 steps: |
13 * 1. Obtaining the location of the machine; | 13 * 1. Obtaining the location of the machine; |
14 * 2. Processing requests for cards dismissals that are not yet sent to the | 14 * 2. Processing requests for cards dismissals that are not yet sent to the |
15 * server; | 15 * server; |
(...skipping 578 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
594 | 594 |
595 chrome.location.onLocationUpdate.addListener(function(position) { | 595 chrome.location.onLocationUpdate.addListener(function(position) { |
596 recordEvent(DiagnosticEvent.LOCATION_UPDATE); | 596 recordEvent(DiagnosticEvent.LOCATION_UPDATE); |
597 updateNotificationsCards(position); | 597 updateNotificationsCards(position); |
598 }); | 598 }); |
599 | 599 |
600 chrome.omnibox.onInputEntered.addListener(function(text) { | 600 chrome.omnibox.onInputEntered.addListener(function(text) { |
601 localStorage['server_url'] = NOTIFICATION_CARDS_URL = text; | 601 localStorage['server_url'] = NOTIFICATION_CARDS_URL = text; |
602 initialize(); | 602 initialize(); |
603 }); | 603 }); |
OLD | NEW |