| Index: chrome/browser/shell_integration.h
|
| diff --git a/chrome/browser/shell_integration.h b/chrome/browser/shell_integration.h
|
| index e71dbfed73fc4b1031f31c99b648f8dc9751cb5e..11168a716c3b187a3a5f55efe948525e42cdc897 100644
|
| --- a/chrome/browser/shell_integration.h
|
| +++ b/chrome/browser/shell_integration.h
|
| @@ -34,6 +34,12 @@ bool SetAsDefaultBrowser();
|
| // shown and this method returns true.
|
| bool SetAsDefaultBrowserInteractive();
|
|
|
| +// Initiates the interaction with the system settings for the default browser.
|
| +// The function takes care of making sure |on_finished_callback| will get called
|
| +// exactly once when the interaction is finished.
|
| +void SetAsDefaultBrowserUsingSystemSettings(
|
| + const base::Closure& on_finished_callback);
|
| +
|
| // Sets Chrome as the default client application for the given protocol
|
| // (only for the current user). Returns false if this operation fails.
|
| bool SetAsDefaultProtocolClient(const std::string& protocol);
|
| @@ -56,6 +62,8 @@ enum DefaultWebClientSetPermission {
|
| SET_DEFAULT_UNATTENDED,
|
| // On Windows 8, a browser can be made default only in an interactive flow.
|
| SET_DEFAULT_INTERACTIVE,
|
| + // On Windows 10+, the system settings page for default apps is opened.
|
| + SET_DEFAULT_OPEN_SETTINGS,
|
| };
|
|
|
| // Returns requirements for making the running browser the user's default.
|
| @@ -232,7 +240,11 @@ class DefaultWebClientWorker
|
|
|
| // Implementation of CheckIsDefault() and SetAsDefault() for subclasses.
|
| virtual DefaultWebClientState CheckIsDefaultImpl() = 0;
|
| - virtual void SetAsDefaultImpl() = 0;
|
| +
|
| + // The callback may be run synchronously or at an arbitrary time later on this
|
| + // thread.
|
| + // Note : Subclasses MUST make sure |on_finished_callback| is execute.
|
| + virtual void SetAsDefaultImpl(const base::Closure& on_finished_callback) = 0;
|
|
|
| // Reports the result for the set-as-default operation.
|
| void ReportSetDefaultResult(DefaultWebClientState state);
|
| @@ -268,7 +280,7 @@ class DefaultBrowserWorker : public DefaultWebClientWorker {
|
| DefaultWebClientState CheckIsDefaultImpl() override;
|
|
|
| // Set Chrome as the default browser.
|
| - void SetAsDefaultImpl() override;
|
| + void SetAsDefaultImpl(const base::Closure& on_finished_callback) override;
|
|
|
| DISALLOW_COPY_AND_ASSIGN(DefaultBrowserWorker);
|
| };
|
| @@ -292,7 +304,7 @@ class DefaultProtocolClientWorker : public DefaultWebClientWorker {
|
| DefaultWebClientState CheckIsDefaultImpl() override;
|
|
|
| // Set Chrome as the default handler for this protocol.
|
| - void SetAsDefaultImpl() override;
|
| + void SetAsDefaultImpl(const base::Closure& on_finished_callback) override;
|
|
|
| std::string protocol_;
|
|
|
|
|