Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(627)

Side by Side Diff: chrome/common/mac/app_mode_common.h

Issue 9426030: Mac: Enable WebAppShortcutCreatorTest.CreateShortcut unit test (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Whitespace fixes Created 8 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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" 11 #include "base/file_path.h"
12 #include "base/string16.h" 12 #include "base/string16.h"
13 13
14 // This file contains constants, interfaces, etc. which are common to the 14 // This file contains constants, interfaces, etc. which are common to the
15 // browser application and the app mode loader (a.k.a. shim). 15 // browser application and the app mode loader (a.k.a. shim).
16 16
17 namespace app_mode { 17 namespace app_mode {
18 18
19 // 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
20 // app mode launcher bundle's Info.plist. 20 // app mode launcher bundle's Info.plist.
21 extern NSString* const kBrowserBundleIDKey; 21 extern NSString* const kBrowserBundleIDKey;
22 22
23 // Key for the shortcut ID. 23 // Key for the shortcut ID.
24 extern NSString* const kCrAppModeShortcutIDKey; 24 extern NSString* const kCrAppModeShortcutIDKey;
25 25
26 // Key for the app's shortcut name. 26 // Key for the app's name.
27 extern NSString* const kCrAppModeShortcutShortNameKey;
28
29 // Key for the app's unrestricted name.
30 extern NSString* const kCrAppModeShortcutNameKey; 27 extern NSString* const kCrAppModeShortcutNameKey;
31 28
32 // Key for the app's URL. 29 // Key for the app's URL.
33 extern NSString* const kCrAppModeShortcutURLKey; 30 extern NSString* const kCrAppModeShortcutURLKey;
34 31
35 // When the Chrome browser is run, it stores it's location in the defaults 32 // When the Chrome browser is run, it stores it's location in the defaults
36 // system using this key. 33 // system using this key.
37 extern NSString* const kLastRunAppBundlePathPrefsKey; 34 extern NSString* const kLastRunAppBundlePathPrefsKey;
38 35
39 // Placeholder used in the Info.plist, meant to be replaced by the extension 36 // Placeholders used in the app mode loader bundle' Info.plist:
40 // shortcut ID. 37 extern NSString* const kShortcutIdPlaceholder; // Extension shortcut ID.
41 extern NSString* const kShortcutIdPlaceholder; 38 extern NSString* const kShortcutNamePlaceholder; // Extension name.
39 extern NSString* const kShortcutURLPlaceholder;
40 // Bundle ID of the Chrome browser bundle.
41 extern NSString* const kShortcutBrowserBundleIDPlaceholder;
42 42
43 // Current major/minor version numbers of |ChromeAppModeInfo| (defined below). 43 // Current major/minor version numbers of |ChromeAppModeInfo| (defined below).
44 const unsigned kCurrentChromeAppModeInfoMajorVersion = 1; 44 const unsigned kCurrentChromeAppModeInfoMajorVersion = 1;
45 const unsigned kCurrentChromeAppModeInfoMinorVersion = 0; 45 const unsigned kCurrentChromeAppModeInfoMinorVersion = 0;
46 46
47 // The structure used to pass information from the app mode loader to the 47 // The structure used to pass information from the app mode loader to the
48 // (browser) framework. This is versioned using major and minor version numbers, 48 // (browser) framework. This is versioned using major and minor version numbers,
49 // written below as v<major>.<minor>. Version-number checking is done by the 49 // written below as v<major>.<minor>. Version-number checking is done by the
50 // framework, and the framework must accept all structures with the same major 50 // framework, and the framework must accept all structures with the same major
51 // version number. It may refuse to load if the major version of the structure 51 // version number. It may refuse to load if the major version of the structure
(...skipping 19 matching lines...) Expand all
71 71
72 // Information about the App Mode shortcut: 72 // Information about the App Mode shortcut:
73 73
74 // Path to the App Mode Loader application bundle that launched the process. 74 // Path to the App Mode Loader application bundle that launched the process.
75 FilePath app_mode_bundle_path; // Optional: v1.0 75 FilePath app_mode_bundle_path; // Optional: v1.0
76 76
77 // Short ID string, preferably derived from |app_mode_short_name|. Should be 77 // Short ID string, preferably derived from |app_mode_short_name|. Should be
78 // safe for the file system. 78 // safe for the file system.
79 std::string app_mode_id; // Required: v1.0 79 std::string app_mode_id; // Required: v1.0
80 80
81 // Short (e.g., one-word) UTF8-encoded name for the shortcut.
82 string16 app_mode_short_name; // Optional: v1.0
83
84 // Unrestricted (e.g., several-word) UTF8-encoded name for the shortcut. 81 // Unrestricted (e.g., several-word) UTF8-encoded name for the shortcut.
85 string16 app_mode_name; // Optional: v1.0 82 string16 app_mode_name; // Optional: v1.0
86 83
87 // URL for the shortcut. Must be a valid URL. 84 // URL for the shortcut. Must be a valid URL.
88 std::string app_mode_url; // Optional: v1.0 85 std::string app_mode_url; // Optional: v1.0
89 }; 86 };
90 87
91 } // namespace app_mode 88 } // namespace app_mode
92 89
93 #endif // CHROME_COMMON_MAC_APP_MODE_COMMON_H_ 90 #endif // CHROME_COMMON_MAC_APP_MODE_COMMON_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698