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

Side by Side Diff: chrome/browser/ui/webui/options/browser_options_handler.h

Issue 7522025: Turn on session restore by default for mac on Lion (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: JS nits and comment correction Created 9 years, 4 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
OLDNEW
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
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 value (enum) at index 0 of
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 22 matching lines...) Expand all
100 // Returns the string ID for the given default browser state. 104 // Returns the string ID for the given default browser state.
101 int StatusStringIdForState(ShellIntegration::DefaultWebClientState state); 105 int StatusStringIdForState(ShellIntegration::DefaultWebClientState state);
102 106
103 // Gets the current default browser state, and asynchronously reports it to 107 // Gets the current default browser state, and asynchronously reports it to
104 // the WebUI page. 108 // the WebUI page.
105 void UpdateDefaultBrowserState(); 109 void UpdateDefaultBrowserState();
106 110
107 // Updates the UI with the given state for the default browser. 111 // Updates the UI with the given state for the default browser.
108 void SetDefaultBrowserUIString(int status_string_id); 112 void SetDefaultBrowserUIString(int status_string_id);
109 113
114 // Updates the UI with the given state for the window restore setting.
115 void UpdateRestoreOnStartup();
116
110 // Loads the current set of custom startup pages and reports it to the WebUI. 117 // Loads the current set of custom startup pages and reports it to the WebUI.
111 void UpdateStartupPages(); 118 void UpdateStartupPages();
112 119
113 // Loads the possible default search engine list and reports it to the WebUI. 120 // Loads the possible default search engine list and reports it to the WebUI.
114 void UpdateSearchEngines(); 121 void UpdateSearchEngines();
115 122
116 // Writes the current set of startup pages to prefs. 123 // Writes the current set of startup pages to prefs.
117 void SaveStartupPagesPref(); 124 void SaveStartupPagesPref();
118 125
119 scoped_refptr<ShellIntegration::DefaultBrowserWorker> 126 scoped_refptr<ShellIntegration::DefaultBrowserWorker>
(...skipping 12 matching lines...) Expand all
132 // CustomHomePagesTableModel, consider changing it to something more like 139 // CustomHomePagesTableModel, consider changing it to something more like
133 // TemplateURLService. 140 // TemplateURLService.
134 scoped_ptr<CustomHomePagesTableModel> startup_custom_pages_table_model_; 141 scoped_ptr<CustomHomePagesTableModel> startup_custom_pages_table_model_;
135 142
136 scoped_ptr<AutocompleteController> autocomplete_controller_; 143 scoped_ptr<AutocompleteController> autocomplete_controller_;
137 144
138 DISALLOW_COPY_AND_ASSIGN(BrowserOptionsHandler); 145 DISALLOW_COPY_AND_ASSIGN(BrowserOptionsHandler);
139 }; 146 };
140 147
141 #endif // CHROME_BROWSER_UI_WEBUI_OPTIONS_BROWSER_OPTIONS_HANDLER_H_ 148 #endif // CHROME_BROWSER_UI_WEBUI_OPTIONS_BROWSER_OPTIONS_HANDLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698