| 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_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 | 7 |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 157 | 157 |
| 158 // Will be called when the kSigninAllowed pref has changed. | 158 // Will be called when the kSigninAllowed pref has changed. |
| 159 void OnSigninAllowedPrefChange(); | 159 void OnSigninAllowedPrefChange(); |
| 160 | 160 |
| 161 // Makes this the default browser. Called from WebUI. | 161 // Makes this the default browser. Called from WebUI. |
| 162 void BecomeDefaultBrowser(const base::ListValue* args); | 162 void BecomeDefaultBrowser(const base::ListValue* args); |
| 163 | 163 |
| 164 // Sets the search engine at the given index to be default. Called from WebUI. | 164 // Sets the search engine at the given index to be default. Called from WebUI. |
| 165 void SetDefaultSearchEngine(const base::ListValue* args); | 165 void SetDefaultSearchEngine(const base::ListValue* args); |
| 166 | 166 |
| 167 // Enables/disables auto-launching of Chrome on computer startup. | |
| 168 void ToggleAutoLaunch(const base::ListValue* args); | |
| 169 | |
| 170 // Checks (on the file thread) whether the user is in the auto-launch trial | |
| 171 // and whether Chrome is set to auto-launch at login. Gets a reply on the UI | |
| 172 // thread (see CheckAutoLaunchCallback). A weak pointer to this is passed in | |
| 173 // as a parameter to avoid the need to lock between this function and the | |
| 174 // destructor. |profile_path| is the full path to the current profile. | |
| 175 static void CheckAutoLaunch(base::WeakPtr<BrowserOptionsHandler> weak_this, | |
| 176 const base::FilePath& profile_path); | |
| 177 | |
| 178 // Sets up (on the UI thread) the necessary bindings for toggling auto-launch | |
| 179 // (if the user is part of the auto-launch and makes sure the HTML UI knows | |
| 180 // whether Chrome will auto-launch at login. | |
| 181 void CheckAutoLaunchCallback(bool is_in_auto_launch_group, | |
| 182 bool will_launch_at_login); | |
| 183 | |
| 184 // Returns the string ID for the given default browser state. | 167 // Returns the string ID for the given default browser state. |
| 185 int StatusStringIdForState(ShellIntegration::DefaultWebClientState state); | 168 int StatusStringIdForState(ShellIntegration::DefaultWebClientState state); |
| 186 | 169 |
| 187 // Returns if the "make Chrome default browser" button should be shown. | 170 // Returns if the "make Chrome default browser" button should be shown. |
| 188 bool ShouldShowSetDefaultBrowser(); | 171 bool ShouldShowSetDefaultBrowser(); |
| 189 | 172 |
| 190 // Returns if profiles list should be shown on settings page. | 173 // Returns if profiles list should be shown on settings page. |
| 191 bool ShouldShowMultiProfilesUserList(); | 174 bool ShouldShowMultiProfilesUserList(); |
| 192 | 175 |
| 193 // Returns if access to advanced settings should be allowed. | 176 // Returns if access to advanced settings should be allowed. |
| (...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 418 | 401 |
| 419 // Used to get WeakPtr to self for use on the UI thread. | 402 // Used to get WeakPtr to self for use on the UI thread. |
| 420 base::WeakPtrFactory<BrowserOptionsHandler> weak_ptr_factory_; | 403 base::WeakPtrFactory<BrowserOptionsHandler> weak_ptr_factory_; |
| 421 | 404 |
| 422 DISALLOW_COPY_AND_ASSIGN(BrowserOptionsHandler); | 405 DISALLOW_COPY_AND_ASSIGN(BrowserOptionsHandler); |
| 423 }; | 406 }; |
| 424 | 407 |
| 425 } // namespace options | 408 } // namespace options |
| 426 | 409 |
| 427 #endif // CHROME_BROWSER_UI_WEBUI_OPTIONS_BROWSER_OPTIONS_HANDLER_H_ | 410 #endif // CHROME_BROWSER_UI_WEBUI_OPTIONS_BROWSER_OPTIONS_HANDLER_H_ |
| OLD | NEW |