summaryrefslogtreecommitdiffstats
path: root/chrome/common/app_mode_common_mac.h
diff options
context:
space:
mode:
authorviettrungluu@chromium.org <viettrungluu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-05-18 22:09:40 +0000
committerviettrungluu@chromium.org <viettrungluu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-05-18 22:09:40 +0000
commitadf0225bfea22dd085a1e0816871af9e8f1fe372 (patch)
tree96fd5362f73388c6a72359db01b33dfbc6d15f81 /chrome/common/app_mode_common_mac.h
parent98e94a40052f163889a5d6026a24d750edf28818 (diff)
downloadchromium_src-adf0225bfea22dd085a1e0816871af9e8f1fe372.zip
chromium_src-adf0225bfea22dd085a1e0816871af9e8f1fe372.tar.gz
chromium_src-adf0225bfea22dd085a1e0816871af9e8f1fe372.tar.bz2
Mac: app mode loader (shim).
Define an interface using which Chrome can be loaded from a minimal loader. Produce a binary for this loader (which can be put into a bundle). BUG=13148 TEST=not yet Review URL: http://codereview.chromium.org/2066004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@47576 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common/app_mode_common_mac.h')
-rw-r--r--chrome/common/app_mode_common_mac.h41
1 files changed, 41 insertions, 0 deletions
diff --git a/chrome/common/app_mode_common_mac.h b/chrome/common/app_mode_common_mac.h
index 0929be5..48d72fe 100644
--- a/chrome/common/app_mode_common_mac.h
+++ b/chrome/common/app_mode_common_mac.h
@@ -20,6 +20,47 @@ extern const CFStringRef kAppPrefsID;
// bundle; this key is recorded under the ID given by |kAppPrefsID|.
extern const CFStringRef kLastRunAppBundlePathPrefsKey;
+// Current major/minor version numbers of |ChromeAppModeInfo| (defined below).
+const unsigned kCurrentChromeAppModeInfoMajorVersion = 0;
+const unsigned kCurrentChromeAppModeInfoMinorVersion = 1;
+
+// The structure used to pass information from the app mode loader to the
+// (browser) framework. This is versioned using major and minor version numbers,
+// written below as v<major>.<minor>. Version-number checking is done by the
+// framework, and the framework must accept all structures with the same major
+// version number. It may refuse to load if the major version of the structure
+// is different from the one it accepts.
+struct ChromeAppModeInfo {
+ // Major and minor version number of this structure.
+ unsigned major_version; // Required: all versions
+ unsigned minor_version; // Required: all versions
+
+ // Original |argc| and |argv|.
+ int argc; // Required: v0.1
+ char** argv; // Required: v0.1
+
+ // Versioned path to the browser which is being loaded.
+ char* chrome_versioned_path; // Required: v0.1
+
+ // Information about the App Mode shortcut:
+
+ // Path to the App Mode Loader application bundle originally run.
+ char* app_mode_bundle_path; // Optional: v0.1
+
+ // Short ID string, preferably derived from |app_mode_short_name|. Should be
+ // safe for the file system.
+ char* app_mode_id; // Required: v0.1
+
+ // Short (e.g., one-word) UTF8-encoded name for the shortcut.
+ char* app_mode_short_name; // Optional: v0.1
+
+ // Unrestricted (e.g., several-word) UTF8-encoded name for the shortcut.
+ char* app_mode_name; // Optional: v0.1
+
+ // URL for the shortcut. Must be a valid URL.
+ char* app_mode_url; // Required: v0.1
+};
+
} // namespace app_mode
#endif // CHROME_COMMON_APP_MODE_COMMON_MAC_H_