| 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_SHELL_INTEGRATION_H_ | 5 #ifndef CHROME_BROWSER_SHELL_INTEGRATION_H_ |
| 6 #define CHROME_BROWSER_SHELL_INTEGRATION_H_ | 6 #define CHROME_BROWSER_SHELL_INTEGRATION_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 116 // login profile, for ChromeOS). | 116 // login profile, for ChromeOS). |
| 117 // If |extension_app_id| is non-empty, the arguments use kAppId=<id>. | 117 // If |extension_app_id| is non-empty, the arguments use kAppId=<id>. |
| 118 // Otherwise, kApp=<url> is used. If |is_platform_app| is true the flag | 118 // Otherwise, kApp=<url> is used. If |is_platform_app| is true the flag |
| 119 // --enable-platform-apps is added to the command line. | 119 // --enable-platform-apps is added to the command line. |
| 120 static CommandLine CommandLineArgsForLauncher( | 120 static CommandLine CommandLineArgsForLauncher( |
| 121 const GURL& url, | 121 const GURL& url, |
| 122 const std::string& extension_app_id, | 122 const std::string& extension_app_id, |
| 123 bool is_platform_app); | 123 bool is_platform_app); |
| 124 | 124 |
| 125 #if defined(OS_WIN) | 125 #if defined(OS_WIN) |
| 126 // Generates Win7 app id for given app name and profile path. The returned app | 126 // Generates an application user model ID (AppUserModelId) for a given app |
| 127 // id is in the format of "|app_name|[.<profile_id>]". "profile_id" is | 127 // name and profile path. The returned app id is in the format of |
| 128 // appended when user override the default value. | 128 // "|app_name|[.<profile_id>]". "profile_id" is appended when user override |
| 129 static string16 GetAppId(const string16& app_name, | 129 // the default value. |
| 130 const FilePath& profile_path); | 130 // Note: If the app has an installation specific suffix (e.g. on user-level |
| 131 // Chrome installs), |app_name| should already be suffixed, this method will |
| 132 // then further suffix it with the profile id as described above. |
| 133 static string16 GetAppModelIdForProfile(const string16& app_name, |
| 134 const FilePath& profile_path); |
| 131 | 135 |
| 132 // Generates Win7 app id for Chromium by calling GetAppId with | 136 // Generates an application user model ID (AppUserModelId) for Chromium by |
| 133 // chrome::kBrowserAppID as app_name. | 137 // calling GetAppModelIdForProfile() with ShellUtil::GetAppId() as app_name. |
| 134 static string16 GetChromiumAppId(const FilePath& profile_path); | 138 static string16 GetChromiumModelIdForProfile(const FilePath& profile_path); |
| 135 | 139 |
| 136 // Returns the path to the Chromium icon. This is used to specify the icon | 140 // Returns the path to the Chromium icon. This is used to specify the icon |
| 137 // to use for the taskbar group on Win 7. | 141 // to use for the taskbar group on Win 7. |
| 138 static string16 GetChromiumIconPath(); | 142 static string16 GetChromiumIconPath(); |
| 139 | 143 |
| 140 // Migrates existing chrome shortcuts by tagging them with correct app id. | 144 // Migrates existing chrome shortcuts by tagging them with correct app id. |
| 141 // see http://crbug.com/28104 | 145 // see http://crbug.com/28104 |
| 142 static void MigrateChromiumShortcuts(); | 146 static void MigrateChromiumShortcuts(); |
| 143 | 147 |
| 144 // Activates Chrome in metro-mode on Windows 8. Returns false if called on | 148 // Activates Chrome in metro-mode on Windows 8. Returns false if called on |
| (...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 279 // Set Chrome as the default handler for this protocol. | 283 // Set Chrome as the default handler for this protocol. |
| 280 virtual void SetAsDefault(bool interactive_permitted) OVERRIDE; | 284 virtual void SetAsDefault(bool interactive_permitted) OVERRIDE; |
| 281 | 285 |
| 282 std::string protocol_; | 286 std::string protocol_; |
| 283 | 287 |
| 284 DISALLOW_COPY_AND_ASSIGN(DefaultProtocolClientWorker); | 288 DISALLOW_COPY_AND_ASSIGN(DefaultProtocolClientWorker); |
| 285 }; | 289 }; |
| 286 }; | 290 }; |
| 287 | 291 |
| 288 #endif // CHROME_BROWSER_SHELL_INTEGRATION_H_ | 292 #endif // CHROME_BROWSER_SHELL_INTEGRATION_H_ |
| OLD | NEW |