blob: 046324ab839f2c7035af6cb969327f612f794ae7 [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]12dc3d42010-02-22 23:37:127
8#include <CoreFoundation/CoreFoundation.h>
9
[email protected]646b9b92010-04-30 21:51:5810// This file contains constants, interfaces, etc. which are common to the
11// browser application and the app mode loader (a.k.a. shim).
[email protected]12dc3d42010-02-22 23:37:1212
13namespace app_mode {
14
15// The ID under which app mode preferences will be recorded
16// ("org.chromium.Chromium" or "com.google.Chrome").
17extern const CFStringRef kAppPrefsID;
18
19// The key under which to record the path to the (user-visible) application
20// bundle; this key is recorded under the ID given by |kAppPrefsID|.
21extern const CFStringRef kLastRunAppBundlePathPrefsKey;
22
[email protected]adf02252010-05-18 22:09:4023// Current major/minor version numbers of |ChromeAppModeInfo| (defined below).
[email protected]4f486372010-06-17 12:30:3424const unsigned kCurrentChromeAppModeInfoMajorVersion = 1;
25const unsigned kCurrentChromeAppModeInfoMinorVersion = 0;
[email protected]adf02252010-05-18 22:09:4026
27// The structure used to pass information from the app mode loader to the
28// (browser) framework. This is versioned using major and minor version numbers,
29// written below as v<major>.<minor>. Version-number checking is done by the
30// framework, and the framework must accept all structures with the same major
31// version number. It may refuse to load if the major version of the structure
32// is different from the one it accepts.
33struct ChromeAppModeInfo {
34 // Major and minor version number of this structure.
35 unsigned major_version; // Required: all versions
36 unsigned minor_version; // Required: all versions
37
38 // Original |argc| and |argv|.
[email protected]4f486372010-06-17 12:30:3439 int argc; // Required: v1.0
40 char** argv; // Required: v1.0
[email protected]adf02252010-05-18 22:09:4041
42 // Versioned path to the browser which is being loaded.
[email protected]4f486372010-06-17 12:30:3443 char* chrome_versioned_path; // Required: v1.0
[email protected]adf02252010-05-18 22:09:4044
45 // Information about the App Mode shortcut:
46
47 // Path to the App Mode Loader application bundle originally run.
[email protected]4f486372010-06-17 12:30:3448 char* app_mode_bundle_path; // Optional: v1.0
[email protected]adf02252010-05-18 22:09:4049
50 // Short ID string, preferably derived from |app_mode_short_name|. Should be
51 // safe for the file system.
[email protected]4f486372010-06-17 12:30:3452 char* app_mode_id; // Required: v1.0
[email protected]adf02252010-05-18 22:09:4053
54 // Short (e.g., one-word) UTF8-encoded name for the shortcut.
[email protected]4f486372010-06-17 12:30:3455 char* app_mode_short_name; // Optional: v1.0
[email protected]adf02252010-05-18 22:09:4056
57 // Unrestricted (e.g., several-word) UTF8-encoded name for the shortcut.
[email protected]4f486372010-06-17 12:30:3458 char* app_mode_name; // Optional: v1.0
[email protected]adf02252010-05-18 22:09:4059
60 // URL for the shortcut. Must be a valid URL.
[email protected]4f486372010-06-17 12:30:3461 char* app_mode_url; // Required: v1.0
[email protected]adf02252010-05-18 22:09:4062};
63
[email protected]12dc3d42010-02-22 23:37:1264} // namespace app_mode
65
[email protected]646b9b92010-04-30 21:51:5866#endif // CHROME_COMMON_APP_MODE_COMMON_MAC_H_