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

Side by Side Diff: chrome/browser/web_applications/web_app_mac.h

Issue 15724019: Recreate shortcuts on app update. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address comments Created 7 years, 6 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_BROWSER_WEB_APPLICATIONS_WEB_APP_MAC_H_ 5 #ifndef CHROME_BROWSER_WEB_APPLICATIONS_WEB_APP_MAC_H_
6 #define CHROME_BROWSER_WEB_APPLICATIONS_WEB_APP_MAC_H_ 6 #define CHROME_BROWSER_WEB_APPLICATIONS_WEB_APP_MAC_H_
7 7
8 #include "base/files/file_path.h" 8 #include "base/files/file_path.h"
9 #include "base/gtest_prod_util.h" 9 #include "base/gtest_prod_util.h"
10 #include "base/strings/string16.h" 10 #include "base/strings/string16.h"
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 42
43 virtual ~WebAppShortcutCreator(); 43 virtual ~WebAppShortcutCreator();
44 44
45 // Returns a path to the destination where the app should be written to. 45 // Returns a path to the destination where the app should be written to.
46 base::FilePath GetShortcutPath() const; 46 base::FilePath GetShortcutPath() const;
47 47
48 // Copies the app launcher template into place and fills in all relevant 48 // Copies the app launcher template into place and fills in all relevant
49 // information. 49 // information.
50 bool CreateShortcut(); 50 bool CreateShortcut();
51 51
52 // Show the bundle we just generated in the Finder.
53 void RevealAppShimInFinder() const;
54
52 protected: 55 protected:
53 // Returns a path to the app loader. 56 // Returns a path to the app loader.
54 base::FilePath GetAppLoaderPath() const; 57 base::FilePath GetAppLoaderPath() const;
55 58
56 // Returns a path to the destination where the app should be written to. 59 // Returns a path to the destination where the app should be written to.
57 virtual base::FilePath GetDestinationPath() const; 60 virtual base::FilePath GetDestinationPath() const;
58 61
59 // Updates the plist inside |app_path| with information about the app. 62 // Updates the plist inside |app_path| with information about the app.
60 bool UpdatePlist(const base::FilePath& app_path) const; 63 bool UpdatePlist(const base::FilePath& app_path) const;
61 64
(...skipping 10 matching lines...) Expand all
72 // Path to the app's user data directory. For example: 75 // Path to the app's user data directory. For example:
73 // ~/Library/Application Support/Chromium/Default/Web Applications/_crx_abc/ 76 // ~/Library/Application Support/Chromium/Default/Web Applications/_crx_abc/
74 // Note, the user data directory is the parent of the profile directory. 77 // Note, the user data directory is the parent of the profile directory.
75 base::FilePath user_data_dir_; 78 base::FilePath user_data_dir_;
76 79
77 // Returns the bundle identifier to use for this app bundle. 80 // Returns the bundle identifier to use for this app bundle.
78 // |plist| is a dictionary containg a copy of the template plist file to 81 // |plist| is a dictionary containg a copy of the template plist file to
79 // be used for creating the app bundle. 82 // be used for creating the app bundle.
80 NSString* GetBundleIdentifier(NSDictionary* plist) const; 83 NSString* GetBundleIdentifier(NSDictionary* plist) const;
81 84
82 // Show the bundle we just generated in the Finder.
83 virtual void RevealGeneratedBundleInFinder(
84 const base::FilePath& generated_bundle) const;
85 85
86 // Information about the app. 86 // Information about the app.
87 ShellIntegration::ShortcutInfo info_; 87 ShellIntegration::ShortcutInfo info_;
88 88
89 // The CFBundleIdentifier of the Chrome browser bundle. 89 // The CFBundleIdentifier of the Chrome browser bundle.
90 string16 chrome_bundle_id_; 90 string16 chrome_bundle_id_;
91 }; 91 };
92 92
93 } // namespace web_app 93 } // namespace web_app
94 94
95 #endif // CHROME_BROWSER_WEB_APPLICATIONS_WEB_APP_MAC_H_ 95 #endif // CHROME_BROWSER_WEB_APPLICATIONS_WEB_APP_MAC_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/web_applications/web_app_mac.mm » ('j') | chrome/browser/web_applications/web_app_mac.mm » ('J')

Powered by Google App Engine
This is Rietveld 408576698