Chromium Code Reviews| 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 "chrome/browser/autocomplete/autocomplete_controller_delegate.h" | 9 #include "chrome/browser/autocomplete/autocomplete_controller_delegate.h" |
| 10 #include "chrome/browser/prefs/pref_change_registrar.h" | 10 #include "chrome/browser/prefs/pref_change_registrar.h" |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 58 | 58 |
| 59 // Sets the home page to the given string. Called from WebUI. | 59 // Sets the home page to the given string. Called from WebUI. |
| 60 void SetHomePage(const ListValue* args); | 60 void SetHomePage(const ListValue* args); |
| 61 | 61 |
| 62 // Makes this the default browser. Called from WebUI. | 62 // Makes this the default browser. Called from WebUI. |
| 63 void BecomeDefaultBrowser(const ListValue* args); | 63 void BecomeDefaultBrowser(const ListValue* args); |
| 64 | 64 |
| 65 // Sets the search engine at the given index to be default. Called from WebUI. | 65 // Sets the search engine at the given index to be default. Called from WebUI. |
| 66 void SetDefaultSearchEngine(const ListValue* args); | 66 void SetDefaultSearchEngine(const ListValue* args); |
| 67 | 67 |
| 68 // Sets the session restore setting to the integer values (enum) at index 0 of | |
|
csilv
2011/07/28 20:29:36
nit: I think singular "value" is more correct in t
dhollowa
2011/07/28 20:51:38
Done.
| |
| 69 // |args|. Called from WebUI. | |
| 70 void SetRestoreOnStartup(const ListValue* args); | |
| 71 | |
| 68 // Removes the startup page at the given indexes. Called from WebUI. | 72 // Removes the startup page at the given indexes. Called from WebUI. |
| 69 void RemoveStartupPages(const ListValue* args); | 73 void RemoveStartupPages(const ListValue* args); |
| 70 | 74 |
| 71 // Adds a startup page with the given URL after the given index. | 75 // Adds a startup page with the given URL after the given index. |
| 72 // Called from WebUI. | 76 // Called from WebUI. |
| 73 void AddStartupPage(const ListValue* args); | 77 void AddStartupPage(const ListValue* args); |
| 74 | 78 |
| 75 // Changes the startup page at the given index to the given URL. | 79 // Changes the startup page at the given index to the given URL. |
| 76 // Called from WebUI. | 80 // Called from WebUI. |
| 77 void EditStartupPage(const ListValue* args); | 81 void EditStartupPage(const ListValue* args); |
| (...skipping 19 matching lines...) Expand all Loading... | |
| 97 // Returns the string ID for the given default browser state. | 101 // Returns the string ID for the given default browser state. |
| 98 int StatusStringIdForState(ShellIntegration::DefaultWebClientState state); | 102 int StatusStringIdForState(ShellIntegration::DefaultWebClientState state); |
| 99 | 103 |
| 100 // Gets the current default browser state, and asynchronously reports it to | 104 // Gets the current default browser state, and asynchronously reports it to |
| 101 // the WebUI page. | 105 // the WebUI page. |
| 102 void UpdateDefaultBrowserState(); | 106 void UpdateDefaultBrowserState(); |
| 103 | 107 |
| 104 // Updates the UI with the given state for the default browser. | 108 // Updates the UI with the given state for the default browser. |
| 105 void SetDefaultBrowserUIString(int status_string_id); | 109 void SetDefaultBrowserUIString(int status_string_id); |
| 106 | 110 |
| 111 // Updates the UI with the given state for the window restore setting. | |
| 112 void UpdateRestoreOnStartup(); | |
| 113 | |
| 107 // Loads the current set of custom startup pages and reports it to the WebUI. | 114 // Loads the current set of custom startup pages and reports it to the WebUI. |
| 108 void UpdateStartupPages(); | 115 void UpdateStartupPages(); |
| 109 | 116 |
| 110 // Loads the possible default search engine list and reports it to the WebUI. | 117 // Loads the possible default search engine list and reports it to the WebUI. |
| 111 void UpdateSearchEngines(); | 118 void UpdateSearchEngines(); |
| 112 | 119 |
| 113 // Writes the current set of startup pages to prefs. | 120 // Writes the current set of startup pages to prefs. |
| 114 void SaveStartupPagesPref(); | 121 void SaveStartupPagesPref(); |
| 115 | 122 |
| 116 scoped_refptr<ShellIntegration::DefaultBrowserWorker> | 123 scoped_refptr<ShellIntegration::DefaultBrowserWorker> |
| (...skipping 12 matching lines...) Expand all Loading... | |
| 129 // CustomHomePagesTableModel, consider changing it to something more like | 136 // CustomHomePagesTableModel, consider changing it to something more like |
| 130 // TemplateURLService. | 137 // TemplateURLService. |
| 131 scoped_ptr<CustomHomePagesTableModel> startup_custom_pages_table_model_; | 138 scoped_ptr<CustomHomePagesTableModel> startup_custom_pages_table_model_; |
| 132 | 139 |
| 133 scoped_ptr<AutocompleteController> autocomplete_controller_; | 140 scoped_ptr<AutocompleteController> autocomplete_controller_; |
| 134 | 141 |
| 135 DISALLOW_COPY_AND_ASSIGN(BrowserOptionsHandler); | 142 DISALLOW_COPY_AND_ASSIGN(BrowserOptionsHandler); |
| 136 }; | 143 }; |
| 137 | 144 |
| 138 #endif // CHROME_BROWSER_UI_WEBUI_OPTIONS_BROWSER_OPTIONS_HANDLER_H_ | 145 #endif // CHROME_BROWSER_UI_WEBUI_OPTIONS_BROWSER_OPTIONS_HANDLER_H_ |
| OLD | NEW |