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

Unified Diff: chrome/browser/shell_integration.h

Issue 10453041: Support for interactive set-chrome-as-default in Windows. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 7 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
Index: chrome/browser/shell_integration.h
diff --git a/chrome/browser/shell_integration.h b/chrome/browser/shell_integration.h
index 3a0b3ab052689e444505d79ece8d3f1a2fb7df73..7d60c2bbf52c9aed548b4ea42878106f3ea2ae10 100644
--- a/chrome/browser/shell_integration.h
+++ b/chrome/browser/shell_integration.h
@@ -23,16 +23,30 @@ class ShellIntegration {
// false if this operation fails.
static bool SetAsDefaultBrowser();
+ // Initializes an OS shell flow which (if followed by the user) should set
+ // Chrome as the default browser. Returns false if the flow cannot be
+ // initialized or if it is not supported (introduced for Windows8).
grt (UTC plus 2) 2012/05/25 20:27:38 Windows8 -> Windows 8
motek. 2012/05/28 17:40:33 Done.
+ static bool StartSetAsDefaultBrowserInteractive();
+
// Sets Chrome as the default client application for the given protocol
// (only for the current user). Returns false if this operation fails.
static bool SetAsDefaultProtocolClient(const std::string& protocol);
+ // In Windows 8 a browser can be made default-in-metro only in an interactive
+ // flow. We will distinguish between two types of permissions here to avoid
+ // forcing user into UI interaction when this should not be done.
grt (UTC plus 2) 2012/05/25 20:27:38 user -> the user
motek. 2012/05/28 17:40:33 Done.
+ enum DefaultSettingsChangePermission {
+ CHANGE_DEFAULT_NOT_ALLOWED = 0,
+ CHANGE_DEFAULT_UNATTENDED,
+ CHANGE_DEFAULT_INTERACTIVE,
+ };
+
// Returns true if the running browser can be set as the default browser.
grt (UTC plus 2) 2012/05/25 20:27:38 update comment. suggest something like: "Returns
motek. 2012/05/28 17:40:33 Done.
- static bool CanSetAsDefaultBrowser();
+ static DefaultSettingsChangePermission CanSetAsDefaultBrowser();
// Returns true if the running browser can be set as the default client
grt (UTC plus 2) 2012/05/25 20:27:38 here, too
motek. 2012/05/28 17:40:33 Done.
// application for specific protocols.
- static bool CanSetAsDefaultProtocolClient();
+ static DefaultSettingsChangePermission CanSetAsDefaultProtocolClient();
// On Linux, it may not be possible to determine or set the default browser
// on some desktop environments or configurations. So, we use this enum and

Powered by Google App Engine
This is Rietveld 408576698