| 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 // This file declares methods that are useful for integrating Chrome in | 5 // This file declares methods that are useful for integrating Chrome in |
| 6 // Windows shell. These methods are all static and currently part of | 6 // Windows shell. These methods are all static and currently part of |
| 7 // ShellUtil class. | 7 // ShellUtil class. |
| 8 | 8 |
| 9 #ifndef CHROME_INSTALLER_UTIL_SHELL_UTIL_H_ | 9 #ifndef CHROME_INSTALLER_UTIL_SHELL_UTIL_H_ |
| 10 #define CHROME_INSTALLER_UTIL_SHELL_UTIL_H_ | 10 #define CHROME_INSTALLER_UTIL_SHELL_UTIL_H_ |
| (...skipping 294 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 305 // SHELL_SHORTCUT_CREATE_ALWAYS). | 305 // SHELL_SHORTCUT_CREATE_ALWAYS). |
| 306 // |dist| gives the type of browser distribution currently in use. | 306 // |dist| gives the type of browser distribution currently in use. |
| 307 // |properties| and |operation| affect this method as described on their | 307 // |properties| and |operation| affect this method as described on their |
| 308 // invidividual definitions above. | 308 // invidividual definitions above. |
| 309 static bool CreateOrUpdateShortcut( | 309 static bool CreateOrUpdateShortcut( |
| 310 ShellUtil::ShortcutLocation location, | 310 ShellUtil::ShortcutLocation location, |
| 311 BrowserDistribution* dist, | 311 BrowserDistribution* dist, |
| 312 const ShellUtil::ShortcutProperties& properties, | 312 const ShellUtil::ShortcutProperties& properties, |
| 313 ShellUtil::ShortcutOperation operation); | 313 ShellUtil::ShortcutOperation operation); |
| 314 | 314 |
| 315 // This method appends the Chrome icon index inside chrome.exe to the | 315 // Combines |icon_path| with |icon_index| into a string that can be |
| 316 // chrome.exe path passed in as input, to generate the full path for | 316 // used as value for Windows registry keys. |
| 317 // Chrome icon that can be used as value for Windows registry keys. | 317 static string16 GetIconString(const string16& icon_path, |
| 318 // |chrome_exe| full path to chrome.exe. | 318 int icon_index); |
| 319 static string16 GetChromeIcon(BrowserDistribution* dist, | |
| 320 const string16& chrome_exe); | |
| 321 | 319 |
| 322 // This method returns the command to open URLs/files using chrome. Typically | 320 // This method returns the command to open URLs/files using chrome. Typically |
| 323 // this command is written to the registry under shell\open\command key. | 321 // this command is written to the registry under shell\open\command key. |
| 324 // |chrome_exe|: the full path to chrome.exe | 322 // |chrome_exe|: the full path to chrome.exe |
| 325 static string16 GetChromeShellOpenCmd(const string16& chrome_exe); | 323 static string16 GetChromeShellOpenCmd(const string16& chrome_exe); |
| 326 | 324 |
| 327 // This method returns the command to be called by the DelegateExecute verb | 325 // This method returns the command to be called by the DelegateExecute verb |
| 328 // handler to launch chrome on Windows 8. Typically this command is written to | 326 // handler to launch chrome on Windows 8. Typically this command is written to |
| 329 // the registry under the HKCR\Chrome\.exe\shell\(open|run)\command key. | 327 // the registry under the HKCR\Chrome\.exe\shell\(open|run)\command key. |
| 330 // |chrome_exe|: the full path to chrome.exe | 328 // |chrome_exe|: the full path to chrome.exe |
| (...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 556 // required by the base32 standard for inputs that aren't a multiple of 5 | 554 // required by the base32 standard for inputs that aren't a multiple of 5 |
| 557 // bytes. | 555 // bytes. |
| 558 static string16 ByteArrayToBase32(const uint8* bytes, size_t size); | 556 static string16 ByteArrayToBase32(const uint8* bytes, size_t size); |
| 559 | 557 |
| 560 private: | 558 private: |
| 561 DISALLOW_COPY_AND_ASSIGN(ShellUtil); | 559 DISALLOW_COPY_AND_ASSIGN(ShellUtil); |
| 562 }; | 560 }; |
| 563 | 561 |
| 564 | 562 |
| 565 #endif // CHROME_INSTALLER_UTIL_SHELL_UTIL_H_ | 563 #endif // CHROME_INSTALLER_UTIL_SHELL_UTIL_H_ |
| OLD | NEW |