| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CHROME_COMMON_MAC_APP_MODE_COMMON_H_ | 5 #ifndef CHROME_COMMON_MAC_APP_MODE_COMMON_H_ |
| 6 #define CHROME_COMMON_MAC_APP_MODE_COMMON_H_ | 6 #define CHROME_COMMON_MAC_APP_MODE_COMMON_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #import <Foundation/Foundation.h> | 9 #import <Foundation/Foundation.h> |
| 10 | 10 |
| 11 #include "base/file_path.h" |
| 12 #include "base/string16.h" |
| 13 |
| 11 // This file contains constants, interfaces, etc. which are common to the | 14 // This file contains constants, interfaces, etc. which are common to the |
| 12 // browser application and the app mode loader (a.k.a. shim). | 15 // browser application and the app mode loader (a.k.a. shim). |
| 13 | 16 |
| 14 namespace app_mode { | 17 namespace app_mode { |
| 15 | 18 |
| 16 // The key under which the browser's bundle ID will be stored in the | 19 // The key under which the browser's bundle ID will be stored in the |
| 17 // app mode launcher bundle's Info.plist. | 20 // app mode launcher bundle's Info.plist. |
| 18 extern NSString* const kBrowserBundleIDKey; | 21 extern NSString* const kBrowserBundleIDKey; |
| 19 | 22 |
| 20 // The key under which to record the path to the (user-visible) application | 23 // The key under which to record the path to the (user-visible) application |
| (...skipping 16 matching lines...) Expand all Loading... |
| 37 const unsigned kCurrentChromeAppModeInfoMajorVersion = 1; | 40 const unsigned kCurrentChromeAppModeInfoMajorVersion = 1; |
| 38 const unsigned kCurrentChromeAppModeInfoMinorVersion = 0; | 41 const unsigned kCurrentChromeAppModeInfoMinorVersion = 0; |
| 39 | 42 |
| 40 // The structure used to pass information from the app mode loader to the | 43 // The structure used to pass information from the app mode loader to the |
| 41 // (browser) framework. This is versioned using major and minor version numbers, | 44 // (browser) framework. This is versioned using major and minor version numbers, |
| 42 // written below as v<major>.<minor>. Version-number checking is done by the | 45 // written below as v<major>.<minor>. Version-number checking is done by the |
| 43 // framework, and the framework must accept all structures with the same major | 46 // framework, and the framework must accept all structures with the same major |
| 44 // version number. It may refuse to load if the major version of the structure | 47 // version number. It may refuse to load if the major version of the structure |
| 45 // is different from the one it accepts. | 48 // is different from the one it accepts. |
| 46 struct ChromeAppModeInfo { | 49 struct ChromeAppModeInfo { |
| 50 public: |
| 51 ChromeAppModeInfo(); |
| 52 ~ChromeAppModeInfo(); |
| 53 |
| 47 // Major and minor version number of this structure. | 54 // Major and minor version number of this structure. |
| 48 unsigned major_version; // Required: all versions | 55 unsigned major_version; // Required: all versions |
| 49 unsigned minor_version; // Required: all versions | 56 unsigned minor_version; // Required: all versions |
| 50 | 57 |
| 51 // Original |argc| and |argv|. | 58 // Original |argc| and |argv|. |
| 52 int argc; // Required: v1.0 | 59 int argc; // Required: v1.0 |
| 53 char** argv; // Required: v1.0 | 60 char** argv; // Required: v1.0 |
| 54 | 61 |
| 55 // Versioned path to the browser which is being loaded. | 62 // Versioned path to the browser which is being loaded. |
| 56 char* chrome_versioned_path; // Required: v1.0 | 63 FilePath chrome_versioned_path; // Required: v1.0 |
| 57 | 64 |
| 58 // Information about the App Mode shortcut: | 65 // Information about the App Mode shortcut: |
| 59 | 66 |
| 60 // Path to the App Mode Loader application bundle originally run. | 67 // Path to the App Mode Loader application bundle originally run. |
| 61 char* app_mode_bundle_path; // Optional: v1.0 | 68 FilePath app_mode_bundle_path; // Optional: v1.0 |
| 62 | 69 |
| 63 // Short ID string, preferably derived from |app_mode_short_name|. Should be | 70 // Short ID string, preferably derived from |app_mode_short_name|. Should be |
| 64 // safe for the file system. | 71 // safe for the file system. |
| 65 char* app_mode_id; // Required: v1.0 | 72 std::string app_mode_id; // Required: v1.0 |
| 66 | 73 |
| 67 // Short (e.g., one-word) UTF8-encoded name for the shortcut. | 74 // Short (e.g., one-word) UTF8-encoded name for the shortcut. |
| 68 char* app_mode_short_name; // Optional: v1.0 | 75 string16 app_mode_short_name; // Optional: v1.0 |
| 69 | 76 |
| 70 // Unrestricted (e.g., several-word) UTF8-encoded name for the shortcut. | 77 // Unrestricted (e.g., several-word) UTF8-encoded name for the shortcut. |
| 71 char* app_mode_name; // Optional: v1.0 | 78 string16 app_mode_name; // Optional: v1.0 |
| 72 | 79 |
| 73 // URL for the shortcut. Must be a valid URL. | 80 // URL for the shortcut. Must be a valid URL. |
| 74 char* app_mode_url; // Required: v1.0 | 81 std::string app_mode_url; // Required: v1.0 |
| 75 }; | 82 }; |
| 76 | 83 |
| 77 } // namespace app_mode | 84 } // namespace app_mode |
| 78 | 85 |
| 79 #endif // CHROME_COMMON_MAC_APP_MODE_COMMON_H_ | 86 #endif // CHROME_COMMON_MAC_APP_MODE_COMMON_H_ |
| OLD | NEW |