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 427 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
438 // level or user level. If value has ShellChange::SYSTEM_LEVEL | 438 // level or user level. If value has ShellChange::SYSTEM_LEVEL |
439 // we should be running as admin user. | 439 // we should be running as admin user. |
440 // chrome_exe: The chrome.exe path to register as default browser. | 440 // chrome_exe: The chrome.exe path to register as default browser. |
441 // elevate_if_not_admin: On Vista if user is not admin, try to elevate for | 441 // elevate_if_not_admin: On Vista if user is not admin, try to elevate for |
442 // Chrome registration. | 442 // Chrome registration. |
443 static bool MakeChromeDefault(BrowserDistribution* dist, | 443 static bool MakeChromeDefault(BrowserDistribution* dist, |
444 int shell_change, | 444 int shell_change, |
445 const base::FilePath& chrome_exe, | 445 const base::FilePath& chrome_exe, |
446 bool elevate_if_not_admin); | 446 bool elevate_if_not_admin); |
447 | 447 |
448 // Shows and waits for the Windows 8 "How do you want to open webpages?" | 448 // Windows 8: Shows and waits for the "How do you want to open webpages?" |
449 // dialog if Chrome is not already the default HTTP/HTTPS handler. Also does | 449 // dialog if Chrome is not already the default HTTP/HTTPS handler. Also does |
450 // XP-era registrations if Chrome is chosen or was already the default. Do | 450 // XP-era registrations if Chrome is chosen or was already the default. Do |
451 // not use on pre-Win8 OSes. | 451 // not use on pre-Win8 OSes. |
452 // | 452 // |
| 453 // Windows 10: The associations dialog cannot be launched so the settings |
| 454 // dialog focused on default apps is launched. The function does not wait |
| 455 // in this case. |
| 456 // |
453 // |dist| gives the type of browser distribution currently in use. | 457 // |dist| gives the type of browser distribution currently in use. |
454 // |chrome_exe| The chrome.exe path to register as default browser. | 458 // |chrome_exe| The chrome.exe path to register as default browser. |
455 static bool ShowMakeChromeDefaultSystemUI(BrowserDistribution* dist, | 459 static bool ShowMakeChromeDefaultSystemUI(BrowserDistribution* dist, |
456 const base::FilePath& chrome_exe); | 460 const base::FilePath& chrome_exe); |
457 | 461 |
458 // Make Chrome the default application for a protocol. | 462 // Make Chrome the default application for a protocol. |
459 // chrome_exe: The chrome.exe path to register as default browser. | 463 // chrome_exe: The chrome.exe path to register as default browser. |
460 // protocol: The protocol to register as the default handler for. | 464 // protocol: The protocol to register as the default handler for. |
461 static bool MakeChromeDefaultProtocolClient(BrowserDistribution* dist, | 465 static bool MakeChromeDefaultProtocolClient(BrowserDistribution* dist, |
462 const base::FilePath& chrome_exe, | 466 const base::FilePath& chrome_exe, |
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
632 // application, as given to AddFileAssociations. All information associated | 636 // application, as given to AddFileAssociations. All information associated |
633 // with this name will be deleted. | 637 // with this name will be deleted. |
634 static bool DeleteFileAssociations(const base::string16& prog_id); | 638 static bool DeleteFileAssociations(const base::string16& prog_id); |
635 | 639 |
636 private: | 640 private: |
637 DISALLOW_COPY_AND_ASSIGN(ShellUtil); | 641 DISALLOW_COPY_AND_ASSIGN(ShellUtil); |
638 }; | 642 }; |
639 | 643 |
640 | 644 |
641 #endif // CHROME_INSTALLER_UTIL_SHELL_UTIL_H_ | 645 #endif // CHROME_INSTALLER_UTIL_SHELL_UTIL_H_ |
OLD | NEW |