Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(5858)

Unified Diff: chrome/common/extensions/docs/examples/api/transientPage/basic/background.js

Issue 9997001: Fix transient page sample extension to use 'runtime' API, which landed just (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/common/extensions/docs/examples/api/transientPage/basic/background.js
diff --git a/chrome/common/extensions/docs/examples/api/transientPage/basic/background.js b/chrome/common/extensions/docs/examples/api/transientPage/basic/background.js
index 33567292ad927b6335cc81b6c2f9da0295e60ab4..6c65ba0b2a6b36f105df5a05fee3fa2b522c5992 100644
--- a/chrome/common/extensions/docs/examples/api/transientPage/basic/background.js
+++ b/chrome/common/extensions/docs/examples/api/transientPage/basic/background.js
@@ -18,7 +18,7 @@ sendMessage();
chrome.browserAction.setBadgeText({text: "ON"});
console.log("Loaded.");
-chrome.experimental.extension.onInstalled.addListener(function() {
+chrome.experimental.runtime.onInstalled.addListener(function() {
// localStorage is persisted, so it's a good place to keep state that you
// need to persist across page reloads.
localStorage.counter = 1;
@@ -64,7 +64,7 @@ chrome.experimental.alarms.onAlarm.addListener(function() {
alert("Time's up!");
});
-chrome.experimental.extension.onBackgroundPageUnloadingSoon.addListener(
+chrome.experimental.runtime.onBackgroundPageUnloadingSoon.addListener(
function() {
chrome.tabs.query({active: true, currentWindow: true}, function(tabs) {
// After the unload event listener runs, the page will unload, so any
« no previous file with comments | « chrome/common/extensions/docs/examples/api/transientPage/basic.zip ('k') | chrome/common/extensions/docs/privacy.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698