| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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_INSTALLER_GCAPI_GCAPI_H_ | 5 #ifndef CHROME_INSTALLER_GCAPI_GCAPI_H_ |
| 6 #define CHROME_INSTALLER_GCAPI_GCAPI_H_ | 6 #define CHROME_INSTALLER_GCAPI_GCAPI_H_ |
| 7 | 7 |
| 8 #include <windows.h> | 8 #include <windows.h> |
| 9 | 9 |
| 10 extern "C" { | 10 extern "C" { |
| 11 // Error conditions for GoogleChromeCompatibilityCheck(). | 11 // Error conditions for GoogleChromeCompatibilityCheck(). |
| 12 #define GCCC_ERROR_USERLEVELALREADYPRESENT 0x01 | 12 #define GCCC_ERROR_USERLEVELALREADYPRESENT 0x01 |
| 13 #define GCCC_ERROR_SYSTEMLEVELALREADYPRESENT 0x02 | 13 #define GCCC_ERROR_SYSTEMLEVELALREADYPRESENT 0x02 |
| 14 #define GCCC_ERROR_ACCESSDENIED 0x04 | 14 #define GCCC_ERROR_ACCESSDENIED 0x04 |
| 15 #define GCCC_ERROR_OSNOTSUPPORTED 0x08 | 15 #define GCCC_ERROR_OSNOTSUPPORTED 0x08 |
| 16 #define GCCC_ERROR_ALREADYOFFERED 0x10 | 16 #define GCCC_ERROR_ALREADYOFFERED 0x10 |
| 17 #define GCCC_ERROR_INTEGRITYLEVEL 0x20 | 17 #define GCCC_ERROR_INTEGRITYLEVEL 0x20 |
| 18 | 18 |
| 19 #define DLLEXPORT __declspec(dllexport) | 19 #define DLLEXPORT __declspec(dllexport) |
| 20 | 20 |
| 21 // This function returns TRUE if Google Chrome should be offered. | 21 // This function returns TRUE if Google Chrome should be offered. |
| 22 // If the return is FALSE, the reasons DWORD explains why. If you don't care | 22 // If the return is FALSE, the reasons DWORD explains why. If you don't care |
| 23 // for the reason, you can pass NULL for reasons. | 23 // for the reason, you can pass NULL for reasons. |
| 24 DLLEXPORT BOOL __stdcall GoogleChromeCompatibilityCheck(DWORD *reasons); | 24 // set_flag indicates whether a flag should be set indicating that Chrome was |
| 25 // offered within the last six months; if passed FALSE, this method will not |
| 26 // set the flag even if Chrome can be offered. If passed TRUE, this method |
| 27 // will set the flag only if Chrome can be offered. |
| 28 DLLEXPORT BOOL __stdcall GoogleChromeCompatibilityCheck(BOOL set_flag, |
| 29 DWORD *reasons); |
| 25 | 30 |
| 26 // This function launches Google Chrome after a successful install. Make | 31 // This function launches Google Chrome after a successful install. Make |
| 27 // sure COM library is NOT initalized before you call this function (so if | 32 // sure COM library is NOT initalized before you call this function (so if |
| 28 // you called CoInitialize, call CoUninitialize before calling this function). | 33 // you called CoInitialize, call CoUninitialize before calling this function). |
| 29 DLLEXPORT BOOL __stdcall LaunchGoogleChrome(); | 34 DLLEXPORT BOOL __stdcall LaunchGoogleChrome(); |
| 30 | 35 |
| 31 // Funtion pointer type declarations to use with GetProcAddress. | 36 // Funtion pointer type declarations to use with GetProcAddress. |
| 32 typedef BOOL (__stdcall * GCCC_CompatibilityCheck)(DWORD *); | 37 typedef BOOL (__stdcall * GCCC_CompatibilityCheck)(BOOL, DWORD *); |
| 33 typedef BOOL (__stdcall * GCCC_LaunchGC)(HANDLE *); | 38 typedef BOOL (__stdcall * GCCC_LaunchGC)(HANDLE *); |
| 34 } // extern "C" | 39 } // extern "C" |
| 35 | 40 |
| 36 #endif // # CHROME_INSTALLER_GCAPI_GCAPI_H_ | 41 #endif // # CHROME_INSTALLER_GCAPI_GCAPI_H_ |
| OLD | NEW |