OLD | NEW |
(Empty) | |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef CHROME_BROWSER_SHELL_INTEGRATION_WIN_H_ |
| 6 #define CHROME_BROWSER_SHELL_INTEGRATION_WIN_H_ |
| 7 |
| 8 #include <string> |
| 9 |
| 10 #include "base/callback_forward.h" |
| 11 |
| 12 namespace shell_integration { |
| 13 namespace win { |
| 14 |
| 15 // Initiates an OS shell flow which (if followed by the user) should set |
| 16 // Chrome as the default browser. Returns false if the flow cannot be |
| 17 // initialized, if it is not supported (introduced for Windows 8) or if the |
| 18 // user cancels the operation. This is a blocking call and requires a FILE |
| 19 // thread. If Chrome is already default browser, no interactive dialog will be |
| 20 // shown and this method returns true. |
| 21 bool SetAsDefaultBrowserUsingIntentPicker(); |
| 22 |
| 23 // Initiates the interaction with the system settings for the default browser. |
| 24 // The function takes care of making sure |on_finished_callback| will get called |
| 25 // exactly once when the interaction is finished. |
| 26 void SetAsDefaultBrowserUsingSystemSettings( |
| 27 const base::Closure& on_finished_callback); |
| 28 |
| 29 // Initiates an OS shell flow which (if followed by the user) should set |
| 30 // Chrome as the default handler for |protocol|. Returns false if the flow |
| 31 // cannot be initialized, if it is not supported (introduced for Windows 8) |
| 32 // or if the user cancels the operation. This is a blocking call and requires |
| 33 // a FILE thread. If Chrome is already default for |protocol|, no interactive |
| 34 // dialog will be shown and this method returns true. |
| 35 bool SetAsDefaultProtocolClientUsingIntentPicker(const std::string& protocol); |
| 36 |
| 37 } // namespace win |
| 38 } // namespace shell_integration |
| 39 |
| 40 #endif // CHROME_BROWSER_SHELL_INTEGRATION_WIN_H_ |
OLD | NEW |