Chromium Code Reviews| 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 15 matching lines...) Expand all Loading... | |
| 26 | 26 |
| 27 // Creates a shortcut for a web application. The shortcut is a stub app | 27 // Creates a shortcut for a web application. The shortcut is a stub app |
| 28 // that simply loads the browser framework and runs the given app. | 28 // that simply loads the browser framework and runs the given app. |
| 29 class WebAppShortcutCreator { | 29 class WebAppShortcutCreator { |
| 30 public: | 30 public: |
| 31 // Creates a new shortcut based on information in |shortcut_info|. | 31 // Creates a new shortcut based on information in |shortcut_info|. |
| 32 // A copy of the shortcut is placed in |app_data_dir|. | 32 // A copy of the shortcut is placed in |app_data_dir|. |
| 33 // |chrome_bundle_id| is the CFBundleIdentifier of the Chrome browser bundle. | 33 // |chrome_bundle_id| is the CFBundleIdentifier of the Chrome browser bundle. |
| 34 WebAppShortcutCreator( | 34 WebAppShortcutCreator( |
| 35 const base::FilePath& app_data_dir, | 35 const base::FilePath& app_data_dir, |
| 36 const ShellIntegration::ShortcutInfo& shortcut_info); | 36 const ShellIntegration::ShortcutInfo& shortcut_info, |
| 37 const extensions::FileHandlersInfo& file_handlers_info); | |
| 37 | 38 |
| 38 virtual ~WebAppShortcutCreator(); | 39 virtual ~WebAppShortcutCreator(); |
| 39 | 40 |
| 40 // Returns the base name for the shortcut. | 41 // Returns the base name for the shortcut. |
| 41 base::FilePath GetShortcutBasename() const; | 42 base::FilePath GetShortcutBasename() const; |
| 42 | 43 |
| 43 // Returns a path to the Chrome Apps folder in the relevant applications | 44 // Returns a path to the Chrome Apps folder in the relevant applications |
| 44 // folder. E.g. ~/Applications or /Applications. | 45 // folder. E.g. ~/Applications or /Applications. |
| 45 virtual base::FilePath GetApplicationsDirname() const; | 46 virtual base::FilePath GetApplicationsDirname() const; |
| 46 | 47 |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 96 // Updates the icon for the shortcut. | 97 // Updates the icon for the shortcut. |
| 97 bool UpdateIcon(const base::FilePath& app_path) const; | 98 bool UpdateIcon(const base::FilePath& app_path) const; |
| 98 | 99 |
| 99 // Path to the data directory for this app. For example: | 100 // Path to the data directory for this app. For example: |
| 100 // ~/Library/Application Support/Chromium/Default/Web Applications/_crx_abc/ | 101 // ~/Library/Application Support/Chromium/Default/Web Applications/_crx_abc/ |
| 101 base::FilePath app_data_dir_; | 102 base::FilePath app_data_dir_; |
| 102 | 103 |
| 103 // Information about the app. | 104 // Information about the app. |
| 104 ShellIntegration::ShortcutInfo info_; | 105 ShellIntegration::ShortcutInfo info_; |
| 105 | 106 |
| 107 // The app's file handlers. | |
| 108 extensions::FileHandlersInfo file_handlers_info_; | |
|
tapted
2014/04/17 04:37:50
#include chrome/common/extensions/file_handler_inf
jackhou1
2014/04/22 04:40:19
Ah, good point. Changed the struct to hold a copy
| |
| 109 | |
| 106 DISALLOW_COPY_AND_ASSIGN(WebAppShortcutCreator); | 110 DISALLOW_COPY_AND_ASSIGN(WebAppShortcutCreator); |
| 107 }; | 111 }; |
| 108 | 112 |
| 109 } // namespace web_app | 113 } // namespace web_app |
| 110 | 114 |
| 111 #endif // CHROME_BROWSER_WEB_APPLICATIONS_WEB_APP_MAC_H_ | 115 #endif // CHROME_BROWSER_WEB_APPLICATIONS_WEB_APP_MAC_H_ |
| OLD | NEW |