Chromium Code Reviews| Index: chrome/browser/ui/webui/options/browser_options_handler.h |
| =================================================================== |
| --- chrome/browser/ui/webui/options/browser_options_handler.h (revision 114230) |
| +++ chrome/browser/ui/webui/options/browser_options_handler.h (working copy) |
| @@ -8,6 +8,7 @@ |
| #include "base/memory/ref_counted.h" |
| #include "base/memory/scoped_ptr.h" |
| +#include "base/memory/weak_ptr.h" |
| #include "chrome/browser/autocomplete/autocomplete_controller_delegate.h" |
| #include "chrome/browser/prefs/pref_change_registrar.h" |
| #include "chrome/browser/prefs/pref_member.h" |
| @@ -89,6 +90,19 @@ |
| void EnableInstant(const ListValue* args); |
| void DisableInstant(const ListValue* args); |
| + // Enables/disables auto-launching of Chrome on computer startup. |
| + void ToggleAutoLaunch(const ListValue* args); |
| + |
| + // Checks (on the file thread) whether the user is in the auto-launch trial |
| + // and whether Chrome is set to auto-launch at login. Gets a reply on the UI |
| + // thread (see CheckAutoLaunchCallback). |
| + void CheckAutoLaunch(base::WeakPtr<BrowserOptionsHandler> weak_this); |
|
Jói
2011/12/14 16:44:13
I would add a comment saying a weak pointer to thi
|
| + // Sets up (on the UI thread) the necessary bindings for toggling auto-launch |
|
Jói
2011/12/14 16:44:13
Suggest a blank line before this.
|
| + // (if the user is part of the auto-launch and makes sure the HTML UI knows |
| + // whether Chrome will auto-launch at login. |
| + void CheckAutoLaunchCallback(bool is_in_auto_launch_group, |
| + bool will_launch_at_login); |
| + |
| // Called to request information about the Instant field trial. |
| void GetInstantFieldTrialStatus(const ListValue* args); |
| @@ -130,6 +144,11 @@ |
| scoped_ptr<AutocompleteController> autocomplete_controller_; |
| + // Used to get |weak_ptr_| to self on the File thread. |
|
Jói
2011/12/14 16:44:13
to self on the File thread -> to self for use on t
|
| + base::WeakPtrFactory<BrowserOptionsHandler> weak_ptr_factory_for_file_; |
| + // Used to post update tasks to the UI thread. |
| + base::WeakPtrFactory<BrowserOptionsHandler> weak_ptr_factory_for_ui_; |
| + |
| DISALLOW_COPY_AND_ASSIGN(BrowserOptionsHandler); |
| }; |