| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_UI_WEBUI_OPTIONS_BROWSER_OPTIONS_HANDLER_H_ | 5 #ifndef CHROME_BROWSER_UI_WEBUI_OPTIONS_BROWSER_OPTIONS_HANDLER_H_ |
| 6 #define CHROME_BROWSER_UI_WEBUI_OPTIONS_BROWSER_OPTIONS_HANDLER_H_ | 6 #define CHROME_BROWSER_UI_WEBUI_OPTIONS_BROWSER_OPTIONS_HANDLER_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "base/memory/ref_counted.h" | 9 #include "base/memory/ref_counted.h" |
| 10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 91 void DisableInstant(const ListValue* args); | 91 void DisableInstant(const ListValue* args); |
| 92 | 92 |
| 93 // Enables/disables auto-launching of Chrome on computer startup. | 93 // Enables/disables auto-launching of Chrome on computer startup. |
| 94 void ToggleAutoLaunch(const ListValue* args); | 94 void ToggleAutoLaunch(const ListValue* args); |
| 95 | 95 |
| 96 // Checks (on the file thread) whether the user is in the auto-launch trial | 96 // Checks (on the file thread) whether the user is in the auto-launch trial |
| 97 // and whether Chrome is set to auto-launch at login. Gets a reply on the UI | 97 // and whether Chrome is set to auto-launch at login. Gets a reply on the UI |
| 98 // thread (see CheckAutoLaunchCallback). A weak pointer to this is passed in | 98 // thread (see CheckAutoLaunchCallback). A weak pointer to this is passed in |
| 99 // as a parameter to avoid the need to lock between this function and the | 99 // as a parameter to avoid the need to lock between this function and the |
| 100 // destructor. | 100 // destructor. |
| 101 void CheckAutoLaunch(base::WeakPtr<BrowserOptionsHandler> weak_this, |
| 102 const FilePath& profile_path); |
| 101 | 103 |
| 102 void CheckAutoLaunch(base::WeakPtr<BrowserOptionsHandler> weak_this); | |
| 103 // Sets up (on the UI thread) the necessary bindings for toggling auto-launch | 104 // Sets up (on the UI thread) the necessary bindings for toggling auto-launch |
| 104 // (if the user is part of the auto-launch and makes sure the HTML UI knows | 105 // (if the user is part of the auto-launch and makes sure the HTML UI knows |
| 105 // whether Chrome will auto-launch at login. | 106 // whether Chrome will auto-launch at login. |
| 106 void CheckAutoLaunchCallback(bool is_in_auto_launch_group, | 107 void CheckAutoLaunchCallback(bool is_in_auto_launch_group, |
| 107 bool will_launch_at_login); | 108 bool will_launch_at_login); |
| 108 | 109 |
| 109 // Called to request information about the Instant field trial. | 110 // Called to request information about the Instant field trial. |
| 110 void GetInstantFieldTrialStatus(const ListValue* args); | 111 void GetInstantFieldTrialStatus(const ListValue* args); |
| 111 | 112 |
| 112 // Returns the string ID for the given default browser state. | 113 // Returns the string ID for the given default browser state. |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 149 | 150 |
| 150 // Used to get |weak_ptr_| to self for use on the File thread. | 151 // Used to get |weak_ptr_| to self for use on the File thread. |
| 151 base::WeakPtrFactory<BrowserOptionsHandler> weak_ptr_factory_for_file_; | 152 base::WeakPtrFactory<BrowserOptionsHandler> weak_ptr_factory_for_file_; |
| 152 // Used to post update tasks to the UI thread. | 153 // Used to post update tasks to the UI thread. |
| 153 base::WeakPtrFactory<BrowserOptionsHandler> weak_ptr_factory_for_ui_; | 154 base::WeakPtrFactory<BrowserOptionsHandler> weak_ptr_factory_for_ui_; |
| 154 | 155 |
| 155 DISALLOW_COPY_AND_ASSIGN(BrowserOptionsHandler); | 156 DISALLOW_COPY_AND_ASSIGN(BrowserOptionsHandler); |
| 156 }; | 157 }; |
| 157 | 158 |
| 158 #endif // CHROME_BROWSER_UI_WEBUI_OPTIONS_BROWSER_OPTIONS_HANDLER_H_ | 159 #endif // CHROME_BROWSER_UI_WEBUI_OPTIONS_BROWSER_OPTIONS_HANDLER_H_ |
| OLD | NEW |