OLD | NEW |
---|---|
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CHROME_BROWSER_SHELL_INTEGRATION_H_ | 5 #ifndef CHROME_BROWSER_SHELL_INTEGRATION_H_ |
6 #define CHROME_BROWSER_SHELL_INTEGRATION_H_ | 6 #define CHROME_BROWSER_SHELL_INTEGRATION_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
11 #include "base/file_path.h" | 11 #include "base/file_path.h" |
12 #include "base/memory/ref_counted.h" | 12 #include "base/memory/ref_counted.h" |
13 #include "base/string16.h" | 13 #include "base/string16.h" |
14 #include "googleurl/src/gurl.h" | 14 #include "googleurl/src/gurl.h" |
15 #include "ui/gfx/image/image.h" | 15 #include "ui/gfx/image/image.h" |
16 | 16 |
17 class CommandLine; | 17 class CommandLine; |
18 | 18 |
19 namespace shell_integration { | |
20 | |
21 namespace internals { | |
22 | |
23 // Migrates all shortcuts in |path| which point to |chrome_exe| such that they | |
24 // have the appropriate AppUserModelId. Also makes sure those shortcuts have | |
25 // the dual_mode property set if such is requested by |check_dual_mode|. | |
26 // Returns the number of shortcuts migrated. | |
27 // This method should not be called prior to Windows 7. | |
28 int MigrateShortcutsInPath( | |
grt (UTC plus 2)
2013/01/03 02:30:44
Name this MigrateShortcutsInPathInternal, add to t
gab
2013/01/03 21:14:57
Done.
| |
29 const FilePath& chrome_exe, const FilePath& path, bool check_dual_mode); | |
30 | |
31 } // namespace internals | |
32 | |
33 } // namespace shell_integration | |
34 | |
19 class ShellIntegration { | 35 class ShellIntegration { |
20 public: | 36 public: |
21 // Sets Chrome as the default browser (only for the current user). Returns | 37 // Sets Chrome as the default browser (only for the current user). Returns |
22 // false if this operation fails. | 38 // false if this operation fails. |
23 static bool SetAsDefaultBrowser(); | 39 static bool SetAsDefaultBrowser(); |
24 | 40 |
25 // Initiates an OS shell flow which (if followed by the user) should set | 41 // Initiates an OS shell flow which (if followed by the user) should set |
26 // Chrome as the default browser. Returns false if the flow cannot be | 42 // Chrome as the default browser. Returns false if the flow cannot be |
27 // initialized, if it is not supported (introduced for Windows 8) or if the | 43 // initialized, if it is not supported (introduced for Windows 8) or if the |
28 // user cancels the operation. This is a blocking call and requires a FILE | 44 // user cancels the operation. This is a blocking call and requires a FILE |
(...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
301 // Set Chrome as the default handler for this protocol. | 317 // Set Chrome as the default handler for this protocol. |
302 virtual bool SetAsDefault(bool interactive_permitted) OVERRIDE; | 318 virtual bool SetAsDefault(bool interactive_permitted) OVERRIDE; |
303 | 319 |
304 std::string protocol_; | 320 std::string protocol_; |
305 | 321 |
306 DISALLOW_COPY_AND_ASSIGN(DefaultProtocolClientWorker); | 322 DISALLOW_COPY_AND_ASSIGN(DefaultProtocolClientWorker); |
307 }; | 323 }; |
308 }; | 324 }; |
309 | 325 |
310 #endif // CHROME_BROWSER_SHELL_INTEGRATION_H_ | 326 #endif // CHROME_BROWSER_SHELL_INTEGRATION_H_ |
OLD | NEW |