Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(5162)

Unified Diff: chrome/browser/shell_integration.h

Issue 1832853003: DefaultBrowserWorker now fully supports opening the settings for Win10 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed comments Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/shell_integration.cc » ('j') | chrome/browser/shell_integration.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/shell_integration.h
diff --git a/chrome/browser/shell_integration.h b/chrome/browser/shell_integration.h
index e71dbfed73fc4b1031f31c99b648f8dc9751cb5e..b9ab2a64ff39915137d5fac33da4672aac6c7364 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 executed.
Alexei Svitkine (slow) 2016/04/06 20:13:06 Nit: No space before :
Patrick Monette 2016/04/06 21:54:34 Done.
+ 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_;
« no previous file with comments | « no previous file | chrome/browser/shell_integration.cc » ('j') | chrome/browser/shell_integration.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698