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 11 matching lines...) Expand all Loading... |
22 const AEEventClass kAEChromeAppClass = 'cApp'; | 22 const AEEventClass kAEChromeAppClass = 'cApp'; |
23 const AEEventID kAEChromeAppPing = 'ping'; | 23 const AEEventID kAEChromeAppPing = 'ping'; |
24 | 24 |
25 // The IPC socket used to communicate between app shims and Chrome will be | 25 // The IPC socket used to communicate between app shims and Chrome will be |
26 // created under a temporary directory with this name. | 26 // created under a temporary directory with this name. |
27 extern const char kAppShimSocketShortName[]; | 27 extern const char kAppShimSocketShortName[]; |
28 // A symlink to allow the app shim to find the socket will be created under the | 28 // A symlink to allow the app shim to find the socket will be created under the |
29 // user data dir with this name. | 29 // user data dir with this name. |
30 extern const char kAppShimSocketSymlinkName[]; | 30 extern const char kAppShimSocketSymlinkName[]; |
31 | 31 |
| 32 // A symlink used to store the version string of the currently running Chrome. |
| 33 // The shim will read this to determine which version of the framework to load. |
| 34 extern const char kAppShimVersionSymlinkName[]; |
| 35 |
32 // Special app mode id used for the App Launcher. | 36 // Special app mode id used for the App Launcher. |
33 extern const char kAppListModeId[]; | 37 extern const char kAppListModeId[]; |
34 | 38 |
35 // The process ID of the Chrome process that launched the app shim. | 39 // 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 | 40 // 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. | 41 // launch_now = false. This associates the shim without launching the app. |
38 extern const char kLaunchedByChromeProcessId[]; | 42 extern const char kLaunchedByChromeProcessId[]; |
39 | 43 |
40 // Indicates to the shim that it was launched for a test, so don't attempt to | 44 // Indicates to the shim that it was launched for a test, so don't attempt to |
41 // launch Chrome. | 45 // launch Chrome. |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
98 | 102 |
99 // Placeholders used in the app mode loader bundle' Info.plist: | 103 // Placeholders used in the app mode loader bundle' Info.plist: |
100 extern NSString* const kShortcutIdPlaceholder; // Extension shortcut ID. | 104 extern NSString* const kShortcutIdPlaceholder; // Extension shortcut ID. |
101 extern NSString* const kShortcutNamePlaceholder; // Extension name. | 105 extern NSString* const kShortcutNamePlaceholder; // Extension name. |
102 extern NSString* const kShortcutURLPlaceholder; | 106 extern NSString* const kShortcutURLPlaceholder; |
103 // Bundle ID of the Chrome browser bundle. | 107 // Bundle ID of the Chrome browser bundle. |
104 extern NSString* const kShortcutBrowserBundleIDPlaceholder; | 108 extern NSString* const kShortcutBrowserBundleIDPlaceholder; |
105 | 109 |
106 // Current major/minor version numbers of |ChromeAppModeInfo| (defined below). | 110 // Current major/minor version numbers of |ChromeAppModeInfo| (defined below). |
107 const unsigned kCurrentChromeAppModeInfoMajorVersion = 1; | 111 const unsigned kCurrentChromeAppModeInfoMajorVersion = 1; |
108 const unsigned kCurrentChromeAppModeInfoMinorVersion = 2; | 112 const unsigned kCurrentChromeAppModeInfoMinorVersion = 3; |
109 | 113 |
110 // The structure used to pass information from the app mode loader to the | 114 // The structure used to pass information from the app mode loader to the |
111 // (browser) framework. This is versioned using major and minor version numbers, | 115 // (browser) framework. This is versioned using major and minor version numbers, |
112 // written below as v<major>.<minor>. Version-number checking is done by the | 116 // written below as v<major>.<minor>. Version-number checking is done by the |
113 // framework, and the framework must accept all structures with the same major | 117 // framework, and the framework must accept all structures with the same major |
114 // version number. It may refuse to load if the major version of the structure | 118 // version number. It may refuse to load if the major version of the structure |
115 // is different from the one it accepts. | 119 // is different from the one it accepts. |
116 struct ChromeAppModeInfo { | 120 struct ChromeAppModeInfo { |
117 public: | 121 public: |
118 ChromeAppModeInfo(); | 122 ChromeAppModeInfo(); |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
154 base::FilePath profile_dir; | 158 base::FilePath profile_dir; |
155 }; | 159 }; |
156 | 160 |
157 // Check that the socket and its parent directory have the correct permissions | 161 // Check that the socket and its parent directory have the correct permissions |
158 // and are owned by the user. | 162 // and are owned by the user. |
159 void VerifySocketPermissions(const base::FilePath& socket_path); | 163 void VerifySocketPermissions(const base::FilePath& socket_path); |
160 | 164 |
161 } // namespace app_mode | 165 } // namespace app_mode |
162 | 166 |
163 #endif // CHROME_COMMON_MAC_APP_MODE_COMMON_H_ | 167 #endif // CHROME_COMMON_MAC_APP_MODE_COMMON_H_ |
OLD | NEW |