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 | 7 |
8 #import <Foundation/Foundation.h> | 8 #import <Foundation/Foundation.h> |
9 | 9 |
10 #include "base/files/file_path.h" | 10 #include "base/files/file_path.h" |
(...skipping 23 matching lines...) Expand all Loading... |
34 | 34 |
35 // The process ID of the Chrome process that launched the app shim. | 35 // The process ID of the Chrome process that launched the app shim. |
36 // The presence of this switch instructs the app shim to send LaunchApp with | 36 // The presence of this switch instructs the app shim to send LaunchApp with |
37 // launch_now = false. This associates the shim without launching the app. | 37 // launch_now = false. This associates the shim without launching the app. |
38 extern const char kLaunchedByChromeProcessId[]; | 38 extern const char kLaunchedByChromeProcessId[]; |
39 | 39 |
40 // Indicates to the shim that it was launched for a test, so don't attempt to | 40 // Indicates to the shim that it was launched for a test, so don't attempt to |
41 // launch Chrome. | 41 // launch Chrome. |
42 extern const char kLaunchedForTest[]; | 42 extern const char kLaunchedForTest[]; |
43 | 43 |
| 44 // Indicates to the shim that this Chrome has rebuilt it once already, i.e. if |
| 45 // it fails to launch again, don't trigger another rebuild. |
| 46 extern const char kLaunchedAfterRebuild[]; |
| 47 |
44 // Path to an app shim bundle. Indicates to Chrome that this shim attempted to | 48 // Path to an app shim bundle. Indicates to Chrome that this shim attempted to |
45 // launch but failed. | 49 // launch but failed. |
46 extern const char kAppShimError[]; | 50 extern const char kAppShimError[]; |
47 | 51 |
48 // Keys for specifying the file types handled by an app. | 52 // Keys for specifying the file types handled by an app. |
49 extern NSString* const kCFBundleDocumentTypesKey; | 53 extern NSString* const kCFBundleDocumentTypesKey; |
50 extern NSString* const kCFBundleTypeExtensionsKey; | 54 extern NSString* const kCFBundleTypeExtensionsKey; |
51 extern NSString* const kCFBundleTypeIconFileKey; | 55 extern NSString* const kCFBundleTypeIconFileKey; |
52 extern NSString* const kCFBundleTypeNameKey; | 56 extern NSString* const kCFBundleTypeNameKey; |
53 extern NSString* const kCFBundleTypeMIMETypesKey; | 57 extern NSString* const kCFBundleTypeMIMETypesKey; |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
91 | 95 |
92 // Placeholders used in the app mode loader bundle' Info.plist: | 96 // Placeholders used in the app mode loader bundle' Info.plist: |
93 extern NSString* const kShortcutIdPlaceholder; // Extension shortcut ID. | 97 extern NSString* const kShortcutIdPlaceholder; // Extension shortcut ID. |
94 extern NSString* const kShortcutNamePlaceholder; // Extension name. | 98 extern NSString* const kShortcutNamePlaceholder; // Extension name. |
95 extern NSString* const kShortcutURLPlaceholder; | 99 extern NSString* const kShortcutURLPlaceholder; |
96 // Bundle ID of the Chrome browser bundle. | 100 // Bundle ID of the Chrome browser bundle. |
97 extern NSString* const kShortcutBrowserBundleIDPlaceholder; | 101 extern NSString* const kShortcutBrowserBundleIDPlaceholder; |
98 | 102 |
99 // Current major/minor version numbers of |ChromeAppModeInfo| (defined below). | 103 // Current major/minor version numbers of |ChromeAppModeInfo| (defined below). |
100 const unsigned kCurrentChromeAppModeInfoMajorVersion = 1; | 104 const unsigned kCurrentChromeAppModeInfoMajorVersion = 1; |
101 const unsigned kCurrentChromeAppModeInfoMinorVersion = 1; | 105 const unsigned kCurrentChromeAppModeInfoMinorVersion = 2; |
102 | 106 |
103 // The structure used to pass information from the app mode loader to the | 107 // The structure used to pass information from the app mode loader to the |
104 // (browser) framework. This is versioned using major and minor version numbers, | 108 // (browser) framework. This is versioned using major and minor version numbers, |
105 // written below as v<major>.<minor>. Version-number checking is done by the | 109 // written below as v<major>.<minor>. Version-number checking is done by the |
106 // framework, and the framework must accept all structures with the same major | 110 // framework, and the framework must accept all structures with the same major |
107 // version number. It may refuse to load if the major version of the structure | 111 // version number. It may refuse to load if the major version of the structure |
108 // is different from the one it accepts. | 112 // is different from the one it accepts. |
109 struct ChromeAppModeInfo { | 113 struct ChromeAppModeInfo { |
110 public: | 114 public: |
111 ChromeAppModeInfo(); | 115 ChromeAppModeInfo(); |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
147 base::FilePath profile_dir; | 151 base::FilePath profile_dir; |
148 }; | 152 }; |
149 | 153 |
150 // Check that the socket and its parent directory have the correct permissions | 154 // Check that the socket and its parent directory have the correct permissions |
151 // and are owned by the user. | 155 // and are owned by the user. |
152 void VerifySocketPermissions(const base::FilePath& socket_path); | 156 void VerifySocketPermissions(const base::FilePath& socket_path); |
153 | 157 |
154 } // namespace app_mode | 158 } // namespace app_mode |
155 | 159 |
156 #endif // CHROME_COMMON_MAC_APP_MODE_COMMON_H_ | 160 #endif // CHROME_COMMON_MAC_APP_MODE_COMMON_H_ |
OLD | NEW |