blob: 130fe8a81468f6806ce20f7f40f013246ee0515d [file] [log] [blame]
[email protected]12dc3d42010-02-22 23:37:121// Copyright (c) 2010 The Chromium Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
[email protected]646b9b92010-04-30 21:51:585#ifndef CHROME_COMMON_APP_MODE_COMMON_MAC_H_
6#define CHROME_COMMON_APP_MODE_COMMON_MAC_H_
[email protected]32b76ef2010-07-26 23:08:247#pragma once
[email protected]12dc3d42010-02-22 23:37:128
9#include <CoreFoundation/CoreFoundation.h>
10
[email protected]646b9b92010-04-30 21:51:5811// This file contains constants, interfaces, etc. which are common to the
12// browser application and the app mode loader (a.k.a. shim).
[email protected]12dc3d42010-02-22 23:37:1213
14namespace app_mode {
15
16// The ID under which app mode preferences will be recorded
17// ("org.chromium.Chromium" or "com.google.Chrome").
18extern const CFStringRef kAppPrefsID;
19
20// The key under which to record the path to the (user-visible) application
21// bundle; this key is recorded under the ID given by |kAppPrefsID|.
22extern const CFStringRef kLastRunAppBundlePathPrefsKey;
23
[email protected]adf02252010-05-18 22:09:4024// Current major/minor version numbers of |ChromeAppModeInfo| (defined below).
[email protected]4f486372010-06-17 12:30:3425const unsigned kCurrentChromeAppModeInfoMajorVersion = 1;
26const unsigned kCurrentChromeAppModeInfoMinorVersion = 0;
[email protected]adf02252010-05-18 22:09:4027
28// The structure used to pass information from the app mode loader to the
29// (browser) framework. This is versioned using major and minor version numbers,
30// written below as v<major>.<minor>. Version-number checking is done by the
31// framework, and the framework must accept all structures with the same major
32// version number. It may refuse to load if the major version of the structure
33// is different from the one it accepts.
34struct ChromeAppModeInfo {
35 // Major and minor version number of this structure.
36 unsigned major_version; // Required: all versions
37 unsigned minor_version; // Required: all versions
38
39 // Original |argc| and |argv|.
[email protected]4f486372010-06-17 12:30:3440 int argc; // Required: v1.0
41 char** argv; // Required: v1.0
[email protected]adf02252010-05-18 22:09:4042
43 // Versioned path to the browser which is being loaded.
[email protected]4f486372010-06-17 12:30:3444 char* chrome_versioned_path; // Required: v1.0
[email protected]adf02252010-05-18 22:09:4045
46 // Information about the App Mode shortcut:
47
48 // Path to the App Mode Loader application bundle originally run.
[email protected]4f486372010-06-17 12:30:3449 char* app_mode_bundle_path; // Optional: v1.0
[email protected]adf02252010-05-18 22:09:4050
51 // Short ID string, preferably derived from |app_mode_short_name|. Should be
52 // safe for the file system.
[email protected]4f486372010-06-17 12:30:3453 char* app_mode_id; // Required: v1.0
[email protected]adf02252010-05-18 22:09:4054
55 // Short (e.g., one-word) UTF8-encoded name for the shortcut.
[email protected]4f486372010-06-17 12:30:3456 char* app_mode_short_name; // Optional: v1.0
[email protected]adf02252010-05-18 22:09:4057
58 // Unrestricted (e.g., several-word) UTF8-encoded name for the shortcut.
[email protected]4f486372010-06-17 12:30:3459 char* app_mode_name; // Optional: v1.0
[email protected]adf02252010-05-18 22:09:4060
61 // URL for the shortcut. Must be a valid URL.
[email protected]4f486372010-06-17 12:30:3462 char* app_mode_url; // Required: v1.0
[email protected]adf02252010-05-18 22:09:4063};
64
[email protected]12dc3d42010-02-22 23:37:1265} // namespace app_mode
66
[email protected]646b9b92010-04-30 21:51:5867#endif // CHROME_COMMON_APP_MODE_COMMON_MAC_H_