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

Unified Diff: chrome/browser/web_applications/web_app_mac.h

Issue 9416012: Mac: Generate App Mode Loader bundle + cleanup (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased against trunk Created 8 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/app/chrome_main_app_mode_mac.mm ('k') | chrome/browser/web_applications/web_app_mac.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 1723ac15005cc9733bfe4503e3cf6fd163cffe2b..968bb8c9f3e5b66fb4cceb847747b6c818d3347d 100644
--- a/chrome/browser/web_applications/web_app_mac.h
+++ b/chrome/browser/web_applications/web_app_mac.h
@@ -8,8 +8,17 @@
#include "base/file_path.h"
#include "base/gtest_prod_util.h"
+#include "base/string16.h"
#include "chrome/browser/shell_integration.h"
+#ifdef __OBJC__
+@class NSDictionary;
+@class NSString;
+#else // __OBJC__
+class NSDictionary;
+class NSString;
+#endif // __OBJC__
+
namespace web_app {
// Creates a shortcut for a web application. The shortcut is a stub app
@@ -18,12 +27,16 @@ class WebAppShortcutCreator {
public:
// Creates a new shortcut based on information in |shortcut_info|.
// The shortcut stores its user data directory in |user_data_dir|.
- explicit WebAppShortcutCreator(
+ // |chrome_bundle_id| is the CFBundleIdentifier of the Chrome browser bundle.
+ WebAppShortcutCreator(
const FilePath& user_data_dir,
- const ShellIntegration::ShortcutInfo& shortcut_info);
+ 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:
@@ -47,8 +60,16 @@ class WebAppShortcutCreator {
// Note, the user data directory is the parent of the profile directory.
FilePath user_data_dir_;
+ // 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
« no previous file with comments | « chrome/app/chrome_main_app_mode_mac.mm ('k') | chrome/browser/web_applications/web_app_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698