Chromium Code Reviews| 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 390 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 401 // chrome::kMaxAppModelIdLength (some of the components might have been | 401 // chrome::kMaxAppModelIdLength (some of the components might have been |
| 402 // shortened to enforce this). | 402 // shortened to enforce this). |
| 403 static base::string16 BuildAppModelId( | 403 static base::string16 BuildAppModelId( |
| 404 const std::vector<base::string16>& components); | 404 const std::vector<base::string16>& components); |
| 405 | 405 |
| 406 // Returns true if Chrome can make itself the default browser without relying | 406 // Returns true if Chrome can make itself the default browser without relying |
| 407 // on the Windows shell to prompt the user. This is the case for versions of | 407 // on the Windows shell to prompt the user. This is the case for versions of |
| 408 // Windows prior to Windows 8. | 408 // Windows prior to Windows 8. |
| 409 static bool CanMakeChromeDefaultUnattended(); | 409 static bool CanMakeChromeDefaultUnattended(); |
| 410 | 410 |
| 411 enum SetDefaultInteractiveMode { | |
|
grt (UTC plus 2)
2016/04/15 18:47:26
wdyt of InteractiveSetDefaultMode so that this doe
Patrick Monette
2016/04/15 21:35:42
I agree. Done.
| |
| 412 // The intent picker is opened with the different choices available to the | |
| 413 // user. | |
| 414 INTENT_PICKER, | |
| 415 // The Windows default apps settings page is opened with the current default | |
| 416 // app focused. | |
| 417 SYSTEM_SETTINGS, | |
| 418 }; | |
| 419 | |
| 420 // Returns the interactive mode that should be used to set the default browser | |
| 421 // or default protocol client on Windows 8+. | |
| 422 static SetDefaultInteractiveMode GetSetDefaultInteractiveMode(); | |
| 423 | |
| 411 // Returns the DefaultState of Chrome for HTTP and HTTPS and updates the | 424 // Returns the DefaultState of Chrome for HTTP and HTTPS and updates the |
| 412 // default browser beacons as appropriate. | 425 // default browser beacons as appropriate. |
| 413 static DefaultState GetChromeDefaultState(); | 426 static DefaultState GetChromeDefaultState(); |
| 414 | 427 |
| 415 // Returns the DefaultState of the Chrome instance with the specified path for | 428 // Returns the DefaultState of the Chrome instance with the specified path for |
| 416 // HTTP and HTTPs and updates the default browser beacons as appropriate. | 429 // HTTP and HTTPs and updates the default browser beacons as appropriate. |
| 417 static DefaultState GetChromeDefaultStateFromPath( | 430 static DefaultState GetChromeDefaultStateFromPath( |
| 418 const base::FilePath& chrome_exe); | 431 const base::FilePath& chrome_exe); |
| 419 | 432 |
| 420 // Returns the DefaultState of Chrome for |protocol|. | 433 // Returns the DefaultState of Chrome for |protocol|. |
| (...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 640 // Set/CreateRegWorkItems and runs them using WorkItemList. | 653 // Set/CreateRegWorkItems and runs them using WorkItemList. |
| 641 static bool AddRegistryEntries(HKEY root, | 654 static bool AddRegistryEntries(HKEY root, |
| 642 const ScopedVector<RegistryEntry>& entries); | 655 const ScopedVector<RegistryEntry>& entries); |
| 643 | 656 |
| 644 private: | 657 private: |
| 645 DISALLOW_COPY_AND_ASSIGN(ShellUtil); | 658 DISALLOW_COPY_AND_ASSIGN(ShellUtil); |
| 646 }; | 659 }; |
| 647 | 660 |
| 648 | 661 |
| 649 #endif // CHROME_INSTALLER_UTIL_SHELL_UTIL_H_ | 662 #endif // CHROME_INSTALLER_UTIL_SHELL_UTIL_H_ |
| OLD | NEW |