| 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 "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/string16.h" | 10 #include "base/string16.h" |
| (...skipping 16 matching lines...) Expand all Loading... |
| 27 // Creates a new shortcut based on information in |shortcut_info|. | 27 // Creates a new shortcut based on information in |shortcut_info|. |
| 28 // The shortcut stores its user data directory in |user_data_dir|. | 28 // The shortcut stores its user data directory in |user_data_dir|. |
| 29 // |chrome_bundle_id| is the CFBundleIdentifier of the Chrome browser bundle. | 29 // |chrome_bundle_id| is the CFBundleIdentifier of the Chrome browser bundle. |
| 30 WebAppShortcutCreator( | 30 WebAppShortcutCreator( |
| 31 const base::FilePath& user_data_dir, | 31 const base::FilePath& user_data_dir, |
| 32 const ShellIntegration::ShortcutInfo& shortcut_info, | 32 const ShellIntegration::ShortcutInfo& shortcut_info, |
| 33 const string16& chrome_bundle_id); | 33 const string16& chrome_bundle_id); |
| 34 | 34 |
| 35 virtual ~WebAppShortcutCreator(); | 35 virtual ~WebAppShortcutCreator(); |
| 36 | 36 |
| 37 // Returns a path to the destination where the app should be written to. |
| 38 base::FilePath GetShortcutPath() const; |
| 39 |
| 37 // Copies the app launcher template into place and fills in all relevant | 40 // Copies the app launcher template into place and fills in all relevant |
| 38 // information. | 41 // information. |
| 39 bool CreateShortcut(); | 42 bool CreateShortcut(); |
| 40 | 43 |
| 41 protected: | 44 protected: |
| 42 // Returns a path to the app loader. | 45 // Returns a path to the app loader. |
| 43 base::FilePath GetAppLoaderPath() const; | 46 base::FilePath GetAppLoaderPath() const; |
| 44 | 47 |
| 45 // Returns a path to the destination where the app should be written to. | 48 // Returns a path to the destination where the app should be written to. |
| 46 virtual base::FilePath GetDestinationPath() const; | 49 virtual base::FilePath GetDestinationPath() const; |
| (...skipping 24 matching lines...) Expand all Loading... |
| 71 // Information about the app. | 74 // Information about the app. |
| 72 ShellIntegration::ShortcutInfo info_; | 75 ShellIntegration::ShortcutInfo info_; |
| 73 | 76 |
| 74 // The CFBundleIdentifier of the Chrome browser bundle. | 77 // The CFBundleIdentifier of the Chrome browser bundle. |
| 75 string16 chrome_bundle_id_; | 78 string16 chrome_bundle_id_; |
| 76 }; | 79 }; |
| 77 | 80 |
| 78 } // namespace web_app | 81 } // namespace web_app |
| 79 | 82 |
| 80 #endif // CHROME_BROWSER_WEB_APPLICATIONS_WEB_APP_MAC_H_ | 83 #endif // CHROME_BROWSER_WEB_APPLICATIONS_WEB_APP_MAC_H_ |
| OLD | NEW |