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 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
162 | 162 |
163 // Get the AppUserModelId for the App List, for the profile in |profile_path|. | 163 // Get the AppUserModelId for the App List, for the profile in |profile_path|. |
164 static string16 GetAppListAppModelIdForProfile( | 164 static string16 GetAppListAppModelIdForProfile( |
165 const base::FilePath& profile_path); | 165 const base::FilePath& profile_path); |
166 | 166 |
167 // Returns the location (path and index) of the Chromium icon, (e.g., | 167 // Returns the location (path and index) of the Chromium icon, (e.g., |
168 // "C:\path\to\chrome.exe,0"). This is used to specify the icon to use | 168 // "C:\path\to\chrome.exe,0"). This is used to specify the icon to use |
169 // for the taskbar group on Win 7. | 169 // for the taskbar group on Win 7. |
170 static string16 GetChromiumIconLocation(); | 170 static string16 GetChromiumIconLocation(); |
171 | 171 |
172 // Calls MigrateAppHostShortcuts() and MigrateChromiumShortcuts() in that | |
173 // order after a delay. | |
174 static void MigrateShortcuts(); | |
175 | |
172 // Migrates existing chrome shortcuts by tagging them with correct app id. | 176 // Migrates existing chrome shortcuts by tagging them with correct app id. |
173 // see http://crbug.com/28104 | 177 // see http://crbug.com/28104 |
174 static void MigrateChromiumShortcuts(); | 178 static void MigrateChromiumShortcuts(); |
175 | 179 |
176 // Migrates all shortcuts in |path| which point to |chrome_exe| such that they | 180 // Migrates all shortcuts in |path| which point to |chrome_exe| such that they |
177 // have the appropriate AppUserModelId. Also makes sure those shortcuts have | 181 // have the appropriate AppUserModelId. Also makes sure those shortcuts have |
178 // the dual_mode property set if such is requested by |check_dual_mode|. | 182 // the dual_mode property set if such is requested by |check_dual_mode|. |
179 // Returns the number of shortcuts migrated. | 183 // Returns the number of shortcuts migrated. |
180 // This method should not be called prior to Windows 7. | 184 // This method should not be called prior to Windows 7. |
181 // This method is only public for the sake of tests and shouldn't be called | 185 // This method is only public for the sake of tests and shouldn't be called |
182 // externally otherwise. | 186 // externally otherwise. |
183 static int MigrateShortcutsInPathInternal(const base::FilePath& chrome_exe, | 187 static int MigrateShortcutsInPathInternal(const base::FilePath& chrome_exe, |
184 const base::FilePath& path, | 188 const base::FilePath& path, |
185 bool check_dual_mode); | 189 bool check_dual_mode); |
186 | 190 |
191 // Migrates app host shortcuts to point to chrome.exe instead. | |
192 static void MigrateAppHostShortcuts(); | |
gab
2013/04/19 18:34:50
This shouldn't be done in Chrome, instead it shoul
| |
193 | |
194 // Migrates shortcuts in |path| that point to |app_host_exe| to point to | |
195 // |chrome_exe|, finding shortcuts recursively if |recursive| is true. | |
196 static int MigrateAppHostShortcutsInPathInternal( | |
197 const base::FilePath& chrome_exe, | |
198 const base::FilePath& app_host_exe, | |
199 const base::FilePath& path, | |
200 bool recursive); | |
201 | |
187 // Returns the path to the Start Menu shortcut for the given Chrome. | 202 // Returns the path to the Start Menu shortcut for the given Chrome. |
188 static base::FilePath GetStartMenuShortcut(const base::FilePath& chrome_exe); | 203 static base::FilePath GetStartMenuShortcut(const base::FilePath& chrome_exe); |
189 #endif // defined(OS_WIN) | 204 #endif // defined(OS_WIN) |
190 | 205 |
191 // The current default web client application UI state. This is used when | 206 // The current default web client application UI state. This is used when |
192 // querying if Chrome is the default browser or the default handler | 207 // querying if Chrome is the default browser or the default handler |
193 // application for a url protocol, and communicates the state and result of | 208 // application for a url protocol, and communicates the state and result of |
194 // a request. | 209 // a request. |
195 enum DefaultWebClientUIState { | 210 enum DefaultWebClientUIState { |
196 STATE_PROCESSING, | 211 STATE_PROCESSING, |
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
329 // Set Chrome as the default handler for this protocol. | 344 // Set Chrome as the default handler for this protocol. |
330 virtual bool SetAsDefault(bool interactive_permitted) OVERRIDE; | 345 virtual bool SetAsDefault(bool interactive_permitted) OVERRIDE; |
331 | 346 |
332 std::string protocol_; | 347 std::string protocol_; |
333 | 348 |
334 DISALLOW_COPY_AND_ASSIGN(DefaultProtocolClientWorker); | 349 DISALLOW_COPY_AND_ASSIGN(DefaultProtocolClientWorker); |
335 }; | 350 }; |
336 }; | 351 }; |
337 | 352 |
338 #endif // CHROME_BROWSER_SHELL_INTEGRATION_H_ | 353 #endif // CHROME_BROWSER_SHELL_INTEGRATION_H_ |
OLD | NEW |