Index: chrome/browser/shell_integration.h |
diff --git a/chrome/browser/shell_integration.h b/chrome/browser/shell_integration.h |
index 3a0b3ab052689e444505d79ece8d3f1a2fb7df73..4d81ff242bccfce0c28a087bc41a23a0a8c7607d 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 Windows 8). |
+ static bool StartSetAsDefaultBrowserInteractive(); |
grt (UTC plus 2)
2012/05/28 20:47:02
The name "StartBlaBlah" makes me think that this m
motek.
2012/05/31 21:59:04
Done.
|
+ |
// 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); |
- // Returns true if the running browser can be set as the default browser. |
- static bool CanSetAsDefaultBrowser(); |
+ // 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 the user into UI interaction when this should not be done. |
+ enum DefaultSettingsChangePermission { |
+ CHANGE_DEFAULT_NOT_ALLOWED = 0, |
+ CHANGE_DEFAULT_UNATTENDED, |
+ CHANGE_DEFAULT_INTERACTIVE, |
+ }; |
+ |
+ // Returns requirements for making the running browser the user's default. |
+ static DefaultSettingsChangePermission CanSetAsDefaultBrowser(); |
- // Returns true if the running browser can be set as the default client |
- // application for specific protocols. |
- static bool CanSetAsDefaultProtocolClient(); |
+ // Returns requirements for making the running browser the user's default |
+ // client application for specific protocols. |
+ 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 |