Roll src/third_party/WebKit d9c6159:8139f33 (svn 201974:201975)
[chromium-blink-merge.git] / chrome / test / data / extensions / background_app / background.js
blobfbd9366e1f6ea3a298607f9d01b90c291b92b8a5
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
3 // found in the LICENSE file.
5 // This is a minimal sample of a Apps V2 app with background permission.
6 //
7 // This function gets called in the packaged app model on launch.
8 chrome.app.runtime.onLaunched.addListener(function() {
9 console.log("Background App Launched!");
11 // We'll set up push messaging so we have something to keep the background
12 // app registered.
13 setupPush();
14 });
16 // This function gets called in the packaged app model on install.
17 chrome.runtime.onInstalled.addListener(function() {
18 console.log("Background App installed!");
19 });
21 // This function gets called in the packaged app model on shutdown.
22 chrome.runtime.onSuspend.addListener(function() {
23 console.log("Background App shutting down");
24 });