Chromium Code Reviews| Index: chrome/browser/web_applications/web_app_mac.h |
| diff --git a/chrome/browser/web_applications/web_app_mac.h b/chrome/browser/web_applications/web_app_mac.h |
| index 261b9d724a4f00e48b7dc11546a6325f8aae60bd..89eaaf3a691c17780da171c2cebd6b7ff56e8d8f 100644 |
| --- a/chrome/browser/web_applications/web_app_mac.h |
| +++ b/chrome/browser/web_applications/web_app_mac.h |
| @@ -7,8 +7,12 @@ |
| #pragma once |
| #include "base/file_path.h" |
| +#include "base/string16.h" |
| #include "chrome/browser/shell_integration.h" |
| +@class NSDictionary; |
|
Mark Mentovai
2012/02/22 16:43:22
This file looks like it could reasonably be #inclu
jeremy
2012/02/23 14:21:13
Done.
|
| +@class NSString; |
| + |
| namespace web_app { |
| // Creates a shortcut for a web application. The shortcut is a stub app |
| @@ -16,11 +20,14 @@ namespace web_app { |
| class WebAppShortcutCreator { |
| public: |
| // Creates a new shortcut based on information in |shortcut_info|. |
| - explicit WebAppShortcutCreator( |
| - const ShellIntegration::ShortcutInfo& shortcut_info); |
| + // |chrome_bundle_id| is the CFBundleIdentifier of the Chrome browser bundle. |
| + WebAppShortcutCreator( |
| + const ShellIntegration::ShortcutInfo& shortcut_info, |
| + const string16& chrome_bundle_id); |
| virtual ~WebAppShortcutCreator(); |
| - // Creates a shortcut. |
| + // Copies the app launcher template into place and fills in all relevant |
| + // information. |
| bool CreateShortcut(); |
| protected: |
| @@ -37,8 +44,16 @@ class WebAppShortcutCreator { |
| bool UpdateIcon(const FilePath& app_path) const; |
| private: |
| + // Returns the bundle identifier to use for this app bundle. |
| + // |plist| is a dictionary containg a copy of the template plist file to |
| + // be used for creating the app bundle. |
| + NSString* GetBundleIdentifier(NSDictionary* plist) const; |
| + |
| // Information about the app. |
| ShellIntegration::ShortcutInfo info_; |
| + |
| + // The CFBundleIdentifier of the Chrome browser bundle. |
| + string16 chrome_bundle_id_; |
| }; |
| } // namespace web_app |