diff options
author | robertshield@google.com <robertshield@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-03-26 16:05:21 +0000 |
---|---|---|
committer | robertshield@google.com <robertshield@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-03-26 16:05:21 +0000 |
commit | ac4ebebde3fe16fb39ed894377b892621723943f (patch) | |
tree | f7ac8bfb6a150170c64028a5c93fa133609e17ec /chrome/browser/google_update.h | |
parent | ad5f54471a107a27a7d975f38651426b6c042fc3 (diff) | |
download | chromium_src-ac4ebebde3fe16fb39ed894377b892621723943f.zip chromium_src-ac4ebebde3fe16fb39ed894377b892621723943f.tar.gz chromium_src-ac4ebebde3fe16fb39ed894377b892621723943f.tar.bz2 |
Passing a foreground window to the google update code so that if it triggers UAC prompts, they can launch in the foreground.
Review URL: http://codereview.chromium.org/42606
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@12554 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/google_update.h')
-rw-r--r-- | chrome/browser/google_update.h | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/chrome/browser/google_update.h b/chrome/browser/google_update.h index 34007ef..9dee7a3 100644 --- a/chrome/browser/google_update.h +++ b/chrome/browser/google_update.h @@ -12,6 +12,9 @@ #include "google_update_idl.h" class MessageLoop; +namespace views { +class Window; +} // The status of the upgrade. UPGRADE_STARTED and UPGRADE_CHECK_STARTED are // internal states and will not be reported as results to the listener. @@ -84,7 +87,10 @@ class GoogleUpdate : public base::RefCountedThreadSafe<GoogleUpdate> { // Ask Google Update to see if a new version is available. If the parameter // |install_if_newer| is true then Google Update will also install that new // version. - void CheckForUpdate(bool install_if_newer); + // |window| should point to a foreground window. This is needed to ensure + // that Vista/Windows 7 UAC prompts show up in the foreground. It may also + // be null. + void CheckForUpdate(bool install_if_newer, views::Window* window); // Adds/removes a listener to report status back to. Only one listener is // maintained at the moment. @@ -95,7 +101,10 @@ class GoogleUpdate : public base::RefCountedThreadSafe<GoogleUpdate> { // We need to run the update check on another thread than the main thread, and // therefore CheckForUpdate will delegate to this function. |main_loop| points // to the message loop that we want the response to come from. - bool InitiateGoogleUpdateCheck(bool install_if_newer, MessageLoop* main_loop); + // |window| should point to a foreground window. This is needed to ensure that + // Vista/Windows 7 UAC prompts show up in the foreground. It may also be null. + bool InitiateGoogleUpdateCheck(bool install_if_newer, views::Window* window, + MessageLoop* main_loop); // This function reports the results of the GoogleUpdate operation to the // listener. If results indicates an error, the error_code will indicate which |