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.h" | |
sky
2016/04/11 15:06:55
nit: callback_forward.h
Patrick Monette
2016/04/11 15:48:22
Done.
| |
11 #include "base/files/file_path.h" | |
sky
2016/04/11 15:06:55
nit: this include and the next aren't needed.
Patrick Monette
2016/04/11 15:48:22
Done.
| |
12 #include "base/strings/string16.h" | |
13 | |
14 namespace shell_integration { | |
15 namespace win { | |
16 | |
17 // Initiates an OS shell flow which (if followed by the user) should set | |
18 // Chrome as the default browser. Returns false if the flow cannot be | |
19 // initialized, if it is not supported (introduced for Windows 8) or if the | |
20 // user cancels the operation. This is a blocking call and requires a FILE | |
21 // thread. If Chrome is already default browser, no interactive dialog will be | |
22 // shown and this method returns true. | |
23 bool SetAsDefaultBrowserUsingIntentPicker(); | |
24 | |
25 // Initiates the interaction with the system settings for the default browser. | |
26 // The function takes care of making sure |on_finished_callback| will get called | |
27 // exactly once when the interaction is finished. | |
28 void SetAsDefaultBrowserUsingSystemSettings( | |
29 const base::Closure& on_finished_callback); | |
30 | |
31 // Initiates an OS shell flow which (if followed by the user) should set | |
32 // Chrome as the default handler for |protocol|. Returns false if the flow | |
33 // cannot be initialized, if it is not supported (introduced for Windows 8) | |
34 // or if the user cancels the operation. This is a blocking call and requires | |
35 // a FILE thread. If Chrome is already default for |protocol|, no interactive | |
36 // dialog will be shown and this method returns true. | |
37 bool SetAsDefaultProtocolClientUsingIntentPicker(const std::string& protocol); | |
38 | |
39 } // namespace win | |
40 } // namespace shell_integration | |
41 | |
42 #endif // CHROME_BROWSER_SHELL_INTEGRATION_WIN_H_ | |
OLD | NEW |