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 /** | 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 Loading... |
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 }); | |
OLD | NEW |