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

Side by Side Diff: chrome/installer/util/auto_launch_util.h

Issue 9972012: Resolve the conflict that auto-launch has with the background mode feature (part 1). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 8 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
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_INSTALLER_UTIL_AUTO_LAUNCH_UTIL_H_ 5 #ifndef CHROME_INSTALLER_UTIL_AUTO_LAUNCH_UTIL_H_
6 #define CHROME_INSTALLER_UTIL_AUTO_LAUNCH_UTIL_H_ 6 #define CHROME_INSTALLER_UTIL_AUTO_LAUNCH_UTIL_H_
7 #pragma once 7 #pragma once
8 8
9 #include "base/string16.h" 9 #include "base/string16.h"
10 10
11 class FilePath; 11 class FilePath;
12 12
13 // A namespace containing the platform specific implementation of setting Chrome 13 // A namespace containing the platform specific implementation of setting Chrome
14 // to launch on computer startup. 14 // to launch on computer startup.
15 namespace auto_launch_util { 15 namespace auto_launch_util {
16 16
17 // Returns whether the Chrome executable specified in |application_path| is set 17 // Returns whether the Chrome executable specified in |application_path| is set
grt (UTC plus 2) 2012/04/17 15:08:58 Suggest: "...the Chrome executable in the director
18 // to auto-launch at computer startup. NOTE: |application_path| is optional and 18 // to auto-launch at computer startup with a given |command_line_switch|.
grt (UTC plus 2) 2012/04/17 15:08:58 remove reference to |command_line_switch| from com
19 // should be blank in most cases (as it will default to the application path of 19 // NOTE: |application_path| is optional and should be blank in most cases (as
grt (UTC plus 2) 2012/04/17 15:08:58 nit: move the optional argument(s) after all requi
20 // the current executable). |profile_directory| is the name of the directory 20 // it will default to the application path of the current executable).
21 // (leaf, not the full path) that contains the profile that should be opened at 21 // |profile_directory| is the name of the directory (leaf, not the full path)
22 // computer startup. 22 // that contains the profile that should be opened at computer startup.
23 bool WillLaunchAtLogin(const FilePath& application_path, 23 bool LaunchWithWindowAtLoginRequested(const FilePath& application_path,
24 const string16& profile_directory); 24 const string16& profile_directory);
25 // Same as above, except checks whether Chrome is set to launch in Background
grt (UTC plus 2) 2012/04/17 15:08:58 nit: newline before comment
26 // Mode. NOTE: Chrome being set to launch in the background (without a window)
27 // does not necessarily mean that Chrome *will* launch without a window, since
28 // the auto-start feature requires a window. In this case the function
29 // LaunchWithWindowAtLoginRequested will also return true.
30 bool LaunchInBackgroundAtLoginRequested(const FilePath& application_path,
31 const string16& profile_directory);
grt (UTC plus 2) 2012/04/17 15:08:58 nit: indentation
25 32
26 // Configures whether the Chrome executable should auto-launch at computer 33 // Disables all auto-start features. |profile_directory| is the name of the
grt (UTC plus 2) 2012/04/17 15:08:58 nit: newline before comment
27 // startup. |application_path| is needed when |auto_launch| is true AND when 34 // directory (leaf, not the full path) that contains the profile that was set
28 // the caller is not the process being set to auto-launch, ie. the installer. 35 // to be opened at computer startup.
29 // This is because |application_path|, if left blank, defaults to the 36 void DisableAllAutostartFeatures(const string16& profile_directory);
grt (UTC plus 2) 2012/04/17 15:08:58 Please harmonize on one term (one of: Autostart, A
30 // application path of the current executable. If |auto_launch| is true, then it 37
31 // will auto-launch, otherwise it will be configured not to. |profile_directory| 38 // Configures Chrome to auto-launch at computer startup and show a window.
32 // is the name of the directory (leaf, not the full path) that contains the 39 // |application_path| is needed when the caller is not the process being set to
33 // profile that should be opened at computer startup. 40 // auto-launch, ie. the installer. This is because |application_path|, if left
34 void SetWillLaunchAtLogin(bool auto_launch, 41 // blank, defaults to the application path of the current executable.
35 const FilePath& application_path, 42 // |profile_directory| is the name of the directory (leaf, not the full path)
36 const string16& profile_directory); 43 // that contains the profile that should be opened at computer startup.
44 void EnableAutoStartAtLogin(const FilePath& application_path,
45 const string16& profile_directory);
46
47 // Disables auto-starting Chrome at computer startup. |profile_directory| is the
48 // name of the directory (leaf, not the full path) that contains the profile
49 // that was set to be opened at computer startup.
50 void DisableAutoStartAtLogin(const string16& profile_directory);
51
52 // Enables Chrome to start in the background at computer startup (without a
53 // window being shown, except if EnableAutoStartAtLogin has been called).
54 // In short, EnableBackgroundModeAtLogin is the no-window version of calling
55 // EnableAutoStartAtLogin). If both are called, the no-window setting is
56 // ignored.
57 void EnableBackgroundModeAtLogin();
58
59 // Disables auto-starting Chrome in background mode at computer startup.
60 void DisableBackgroundModeAtLogin();
37 61
38 } // namespace auto_launch_util 62 } // namespace auto_launch_util
39 63
40 #endif // CHROME_INSTALLER_UTIL_AUTO_LAUNCH_UTIL_H_ 64 #endif // CHROME_INSTALLER_UTIL_AUTO_LAUNCH_UTIL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698