| 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_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 <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 59 base::FilePath GetApplicationsShortcutPath() const; | 59 base::FilePath GetApplicationsShortcutPath() const; |
| 60 | 60 |
| 61 // The full path to the app bundle under the profile folder. | 61 // The full path to the app bundle under the profile folder. |
| 62 base::FilePath GetInternalShortcutPath() const; | 62 base::FilePath GetInternalShortcutPath() const; |
| 63 | 63 |
| 64 bool CreateShortcuts(ShortcutCreationReason creation_reason, | 64 bool CreateShortcuts(ShortcutCreationReason creation_reason, |
| 65 ShortcutLocations creation_locations); | 65 ShortcutLocations creation_locations); |
| 66 void DeleteShortcuts(); | 66 void DeleteShortcuts(); |
| 67 bool UpdateShortcuts(); | 67 bool UpdateShortcuts(); |
| 68 | 68 |
| 69 // Show the bundle we just generated in the Finder. |
| 70 virtual void RevealAppShimInFinder() const; |
| 71 |
| 69 protected: | 72 protected: |
| 70 // Returns a path to an app bundle with the given id. Or an empty path if no | 73 // Returns a path to an app bundle with the given id. Or an empty path if no |
| 71 // matching bundle was found. | 74 // matching bundle was found. |
| 72 // Protected and virtual so it can be mocked out for testing. | 75 // Protected and virtual so it can be mocked out for testing. |
| 73 virtual base::FilePath GetAppBundleById(const std::string& bundle_id) const; | 76 virtual base::FilePath GetAppBundleById(const std::string& bundle_id) const; |
| 74 | 77 |
| 75 // Show the bundle we just generated in the Finder. | |
| 76 virtual void RevealAppShimInFinder() const; | |
| 77 | |
| 78 private: | 78 private: |
| 79 FRIEND_TEST_ALL_PREFIXES(WebAppShortcutCreatorTest, DeleteShortcuts); | 79 FRIEND_TEST_ALL_PREFIXES(WebAppShortcutCreatorTest, DeleteShortcuts); |
| 80 FRIEND_TEST_ALL_PREFIXES(WebAppShortcutCreatorTest, UpdateIcon); | 80 FRIEND_TEST_ALL_PREFIXES(WebAppShortcutCreatorTest, UpdateIcon); |
| 81 FRIEND_TEST_ALL_PREFIXES(WebAppShortcutCreatorTest, UpdateShortcuts); | 81 FRIEND_TEST_ALL_PREFIXES(WebAppShortcutCreatorTest, UpdateShortcuts); |
| 82 | 82 |
| 83 // Returns the bundle identifier to use for this app bundle. | 83 // Returns the bundle identifier to use for this app bundle. |
| 84 std::string GetBundleIdentifier() const; | 84 std::string GetBundleIdentifier() const; |
| 85 | 85 |
| 86 // Returns the bundle identifier for the internal copy of the bundle. | 86 // Returns the bundle identifier for the internal copy of the bundle. |
| 87 std::string GetInternalBundleIdentifier() const; | 87 std::string GetInternalBundleIdentifier() const; |
| (...skipping 28 matching lines...) Expand all Loading... |
| 116 | 116 |
| 117 // The app's file handlers. | 117 // The app's file handlers. |
| 118 extensions::FileHandlersInfo file_handlers_info_; | 118 extensions::FileHandlersInfo file_handlers_info_; |
| 119 | 119 |
| 120 DISALLOW_COPY_AND_ASSIGN(WebAppShortcutCreator); | 120 DISALLOW_COPY_AND_ASSIGN(WebAppShortcutCreator); |
| 121 }; | 121 }; |
| 122 | 122 |
| 123 } // namespace web_app | 123 } // namespace web_app |
| 124 | 124 |
| 125 #endif // CHROME_BROWSER_WEB_APPLICATIONS_WEB_APP_MAC_H_ | 125 #endif // CHROME_BROWSER_WEB_APPLICATIONS_WEB_APP_MAC_H_ |
| OLD | NEW |