summaryrefslogtreecommitdiffstats
path: root/google_update
diff options
context:
space:
mode:
authorinitial.commit <initial.commit@0039d316-1c4b-4281-b951-d872f2087c98>2008-07-26 21:55:52 +0000
committerinitial.commit <initial.commit@0039d316-1c4b-4281-b951-d872f2087c98>2008-07-26 21:55:52 +0000
commitd13d22ea2fb6255bf652d8dd6a47c655f5774a1a (patch)
tree9d80d7c00864365186026418757d82ac19ef7a7c /google_update
parent5cb4359b3fb3cddbe330ededf9367225700ea4aa (diff)
downloadchromium_src-d13d22ea2fb6255bf652d8dd6a47c655f5774a1a.zip
chromium_src-d13d22ea2fb6255bf652d8dd6a47c655f5774a1a.tar.gz
chromium_src-d13d22ea2fb6255bf652d8dd6a47c655f5774a1a.tar.bz2
Add google_update to the repository.
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'google_update')
-rw-r--r--google_update/README.google1
-rw-r--r--google_update/SConscript32
-rw-r--r--google_update/google_update_idl.idl171
-rw-r--r--google_update/ondemand_updates.vcproj65
-rw-r--r--google_update/using_google_update.vsprops11
5 files changed, 280 insertions, 0 deletions
diff --git a/google_update/README.google b/google_update/README.google
new file mode 100644
index 0000000..9bad5c13
--- /dev/null
+++ b/google_update/README.google
@@ -0,0 +1 @@
+This IDL was provided by the Google Update team so that we could use the new On-Demand checking for updates.
diff --git a/google_update/SConscript b/google_update/SConscript
new file mode 100644
index 0000000..3307232
--- /dev/null
+++ b/google_update/SConscript
@@ -0,0 +1,32 @@
+# Copyright 2008, Google Inc.
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are
+# met:
+#
+# * Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# * Redistributions in binary form must reproduce the above
+# copyright notice, this list of conditions and the following disclaimer
+# in the documentation and/or other materials provided with the
+# distribution.
+# * Neither the name of Google Inc. nor the names of its
+# contributors may be used to endorse or promote products derived from
+# this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Import('env')
+
+env.TypeLibrary('google_update_idl')
diff --git a/google_update/google_update_idl.idl b/google_update/google_update_idl.idl
new file mode 100644
index 0000000..cc2b587
--- /dev/null
+++ b/google_update/google_update_idl.idl
@@ -0,0 +1,171 @@
+// Copyright 2006 Google Inc. All Rights Reserved.
+//
+// Author: Vivek Rao - vivekrao@google.com
+
+import "oaidl.idl";
+import "ocidl.idl";
+
+[
+ object,
+ uuid(8905383F-CD19-4160-8DA0-55FDCFE34F4A),
+ oleautomation,
+ nonextensible,
+ pointer_default(unique)
+]
+interface IBrowserHttpRequest : IUnknown {
+ // This method will send request/data from the browser process.
+ // @param url URL where request will be send.
+ // @param post_data POST data, if any. Can be NULL.
+ // @param request_headers HTTP request headers, if any. Can be NULL.
+ // @param response_headers_needed HTTP response headers that are needed.
+ // Should be one of the values listed here:
+ // http://go/queryinfoflags
+ // The input is a SAFEARRAY of DWORD. Can be a
+ // VT_EMPTY.
+ // @param response_headers HTTP response headers, returned as SAFEARRAY
+ // of BSTR. The values corresponding one-to-one
+ // with the response_headers_needed values. Can
+ // be NULL if response_headers_needed==VT_EMPTY
+ // @param response_code HTTP response code.
+ // @param cache_filename Cache file that contains the response data.
+ HRESULT Send([in] BSTR url,
+ [in] BSTR post_data,
+ [in] BSTR request_headers,
+ [in] VARIANT response_headers_needed,
+ [out] VARIANT* response_headers,
+ [out] DWORD* response_code,
+ [out] BSTR* cache_filename);
+};
+
+[
+ object,
+ oleautomation,
+ uuid(738B2CC4-F187-48e2-A7A7-C1F0A464C8BE),
+ helpstring("Google Update IBrowserLauncher Interface"),
+ pointer_default(unique)
+]
+interface IBrowserLauncher : IUnknown {
+ // @param browser_type The browser to start.
+ // @param url The url to launch the browser with.
+ HRESULT LaunchBrowser([in] DWORD browser_type,
+ [in, string] const WCHAR* url);
+};
+
+typedef enum {
+ COMPLETION_CODE_SUCCESS = 1,
+ COMPLETION_CODE_SUCCESS_CLOSE_UI,
+ COMPLETION_CODE_ERROR,
+ COMPLETION_CODE_RESTART_BROWSERS,
+ COMPLETION_CODE_REBOOT,
+} CompletionCodes;
+
+[
+ object,
+ oleautomation,
+ uuid(1C642CED-CA3B-4013-A9DF-CA6CE5FF6503),
+ helpstring("GoogleUpdate UI-specific events Interface"),
+ pointer_default(unique)
+]
+interface IProgressWndEvents : IUnknown {
+ // The UI is closing down. The user has clicked on either the "X" or the
+ // other buttons of the UI to close the window.
+ HRESULT DoClose();
+
+ // Pause has been clicked on.
+ HRESULT DoPause();
+
+ // Resume has been clicked on.
+ HRESULT DoResume();
+
+ // RestartBrowsers button has been clicked on.
+ HRESULT DoRestartBrowsers();
+
+ // Reboot button has been clicked on.
+ HRESULT DoReboot();
+
+ // Launch Browser.
+ HRESULT DoLaunchBrowser([in, string] const WCHAR* url);
+};
+
+
+[
+ object,
+ oleautomation,
+ uuid(49D7563B-2DDB-4831-88C8-768A53833837),
+ helpstring("IJobObserver Interface"),
+ pointer_default(unique)
+]
+interface IJobObserver : IUnknown {
+ HRESULT OnShow();
+ HRESULT OnCheckingForUpdate();
+ HRESULT OnUpdateAvailable([in, string] const WCHAR* version_string);
+ HRESULT OnWaitingToDownload();
+ HRESULT OnDownloading([in] int time_remaining_ms, [in] int pos);
+ HRESULT OnWaitingToInstall();
+ HRESULT OnInstalling();
+ HRESULT OnPause();
+ HRESULT OnComplete([in] CompletionCodes code, [in, string] const WCHAR* text);
+ HRESULT SetEventSink([in] IProgressWndEvents* ui_sink);
+};
+
+// TODO(ganesh): Component story.
+// TODO(ganesh): Should CheckForUpdate be synchronous? We can avoid the
+// observer. However, it may block the UI.
+// TODO(ganesh): On-Demand Installs.
+[
+ object,
+ oleautomation,
+ uuid(31AC3F11-E5EA-4a85-8A3D-8E095A39C27B),
+ helpstring("IGoogleUpdate Interface"),
+ pointer_default(unique)
+]
+interface IGoogleUpdate : IUnknown {
+ // @param guid The guid for the app to be updated.
+ // @param observer The eventing interface.
+ HRESULT CheckForUpdate([in, string] const WCHAR* guid,
+ [in] IJobObserver* observer);
+
+ // @param guid The guid for the app to be updated.
+ // @param observer The eventing interface.
+ HRESULT Update([in, string] const WCHAR* guid,
+ [in] IJobObserver* observer);
+};
+
+[
+ uuid(7E6CD20B-8688-4960-96D9-B979471577B8),
+ version(1.0),
+ helpstring("Google Update Browser Launcher 1.0 Type Library")
+]
+library GoogleUpdateLib {
+ importlib("stdole2.tlb");
+ [
+ uuid(D21E601A-3017-4d61-9315-F2880EBD196F),
+ helpstring("BrowserLauncherClass Class")
+ ]
+ coclass BrowserLauncherClass {
+ [default] interface IBrowserLauncher;
+ }
+
+ // This coclass declaration exists only for the purpose of forcing
+ // ::RegisterTypeLib() to register the interfaces within. This is
+ // required so that we can marshal/unmarshal the interfaces using the TypeLib
+ // marshaler.
+ [
+ uuid(9564861C-3469-4c9a-956A-74D5690790E6),
+ helpstring("InterfaceRegistrar Class")
+ ]
+ coclass InterfaceRegistrar {
+ [default] interface IBrowserHttpRequest;
+ interface IJobObserver;
+ interface IProgressWndEvents;
+ }
+
+ [
+ uuid(2F0E2680-9FF5-43c0-B76E-114A56E93598),
+ helpstring("OnDemand Class")
+ ]
+ coclass OnDemandClass {
+ [default] interface IGoogleUpdate;
+ }
+};
+
diff --git a/google_update/ondemand_updates.vcproj b/google_update/ondemand_updates.vcproj
new file mode 100644
index 0000000..d451e30
--- /dev/null
+++ b/google_update/ondemand_updates.vcproj
@@ -0,0 +1,65 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="8.00"
+ Name="ondemand_updates"
+ ProjectGUID="{4052059A-D72B-4183-B5C2-9D1B099E9E35}"
+ RootNamespace="ondemand_updates"
+ Keyword="Win32Proj"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ ConfigurationType="10"
+ InheritedPropertySheets="$(SolutionDir)..\build\debug.vsprops"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ ConfigurationType="10"
+ InheritedPropertySheets="$(SolutionDir)..\build\release.vsprops"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <File
+ RelativePath=".\google_update_idl.idl"
+ >
+ </File>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/google_update/using_google_update.vsprops b/google_update/using_google_update.vsprops
new file mode 100644
index 0000000..b36cce97
--- /dev/null
+++ b/google_update/using_google_update.vsprops
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioPropertySheet
+ ProjectType="Visual C++"
+ Version="8.00"
+ Name="using_google_update"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories="$(IntDir)\..\ondemand_updates;"
+ />
+</VisualStudioPropertySheet>