OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 #ifndef CHROME_BROWSER_COCOA_KEYSTONE_GLUE_H_ | 5 #ifndef CHROME_BROWSER_COCOA_KEYSTONE_GLUE_H_ |
6 #define CHROME_BROWSER_COCOA_KEYSTONE_GLUE_H_ | 6 #define CHROME_BROWSER_COCOA_KEYSTONE_GLUE_H_ |
7 | 7 |
| 8 #include "base/string16.h" |
| 9 |
| 10 #if defined(__OBJC__) |
| 11 |
8 #import <Foundation/Foundation.h> | 12 #import <Foundation/Foundation.h> |
9 #import <base/scoped_nsobject.h> | |
10 | 13 |
| 14 #import "base/scoped_nsobject.h" |
11 #include "chrome/browser/cocoa/scoped_authorizationref.h" | 15 #include "chrome/browser/cocoa/scoped_authorizationref.h" |
12 | 16 |
13 // Possible outcomes of various operations. A version may accompany some of | 17 // Possible outcomes of various operations. A version may accompany some of |
14 // these, but beware: a version is never required. For statuses that can be | 18 // these, but beware: a version is never required. For statuses that can be |
15 // accompanied by a version, the comment indicates what version is referenced. | 19 // accompanied by a version, the comment indicates what version is referenced. |
16 // A notification posted containing an asynchronous status will always be | 20 // A notification posted containing an asynchronous status will always be |
17 // followed by a notification with a terminal status. | 21 // followed by a notification with a terminal status. |
18 enum AutoupdateStatus { | 22 enum AutoupdateStatus { |
19 kAutoupdateNone = 0, // no version (initial state only) | 23 kAutoupdateNone = 0, // no version (initial state only) |
20 kAutoupdateRegistering, // no version (asynchronous operation in progress) | 24 kAutoupdateRegistering, // no version (asynchronous operation in progress) |
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
181 - (void)stopTimer; | 185 - (void)stopTimer; |
182 | 186 |
183 // Called when a checkForUpdate: notification completes. | 187 // Called when a checkForUpdate: notification completes. |
184 - (void)checkForUpdateComplete:(NSNotification*)notification; | 188 - (void)checkForUpdateComplete:(NSNotification*)notification; |
185 | 189 |
186 // Called when an installUpdate: notification completes. | 190 // Called when an installUpdate: notification completes. |
187 - (void)installUpdateComplete:(NSNotification*)notification; | 191 - (void)installUpdateComplete:(NSNotification*)notification; |
188 | 192 |
189 @end // @interface KeystoneGlue(ExposedForTesting) | 193 @end // @interface KeystoneGlue(ExposedForTesting) |
190 | 194 |
| 195 #endif // __OBJC__ |
| 196 |
| 197 // Functions that may be accessed from non-Objective-C C/C++ code. |
| 198 namespace keystone_glue { |
| 199 |
| 200 // True if Keystone is enabled. |
| 201 bool KeystoneEnabled(); |
| 202 |
| 203 // The version of the application currently installed on disk. |
| 204 string16 CurrentlyInstalledVersion(); |
| 205 |
| 206 } // namespace keystone_glue |
| 207 |
191 #endif // CHROME_BROWSER_COCOA_KEYSTONE_GLUE_H_ | 208 #endif // CHROME_BROWSER_COCOA_KEYSTONE_GLUE_H_ |
OLD | NEW |