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

Side by Side Diff: chrome/common/extensions/docs/examples/api/power/background.js

Issue 531953002: Remove windows.onCreated hack from Keep Awake extension. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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 unified diff | Download patch
« no previous file with comments | « no previous file | chrome/common/extensions/docs/examples/api/power/manifest.json » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 /** 5 /**
6 * States that the extension can be in. 6 * States that the extension can be in.
7 */ 7 */
8 var StateEnum = { 8 var StateEnum = {
9 DISABLED: 'disabled', 9 DISABLED: 'disabled',
10 DISPLAY: 'display', 10 DISPLAY: 'display',
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 break; 88 break;
89 default: 89 default:
90 throw 'Invalid state "' + state + '"'; 90 throw 'Invalid state "' + state + '"';
91 } 91 }
92 }); 92 });
93 }); 93 });
94 94
95 chrome.runtime.onStartup.addListener(function() { 95 chrome.runtime.onStartup.addListener(function() {
96 loadSavedState(function(state) { setState(state); }); 96 loadSavedState(function(state) { setState(state); });
97 }); 97 });
98
99 // TODO(derat): Remove this once http://crbug.com/222473 is fixed.
100 chrome.windows.onCreated.addListener(function() {
101 loadSavedState(function(state) { setState(state); });
102 });
OLDNEW
« no previous file with comments | « no previous file | chrome/common/extensions/docs/examples/api/power/manifest.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698