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

Unified Diff: chrome/browser/ui/webui/options2/browser_options_handler2.h

Issue 9560005: [uber page] Merge advanced options page into browser options. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Rebase again. Created 8 years, 10 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/webui/options2/browser_options_handler2.h
===================================================================
--- chrome/browser/ui/webui/options2/browser_options_handler2.h (revision 124465)
+++ chrome/browser/ui/webui/options2/browser_options_handler2.h (working copy)
@@ -11,13 +11,20 @@
#include "base/memory/weak_ptr.h"
#include "chrome/browser/autocomplete/autocomplete_controller_delegate.h"
#include "chrome/browser/prefs/pref_member.h"
+#include "chrome/browser/printing/cloud_print/cloud_print_setup_handler.h"
#include "chrome/browser/search_engines/template_url_service_observer.h"
#include "chrome/browser/shell_integration.h"
#include "chrome/browser/sync/profile_sync_service_observer.h"
+#include "chrome/browser/ui/select_file_dialog.h"
#include "chrome/browser/ui/webui/options2/options_ui2.h"
#include "ui/base/models/table_model_observer.h"
+#if !defined(OS_CHROMEOS)
+#include "chrome/browser/prefs/pref_set_observer.h"
+#endif // !defined(OS_CHROMEOS)
+
class AutocompleteController;
+class CloudPrintSetupHandler;
class CustomHomePagesTableModel;
class TemplateURLService;
@@ -26,8 +33,10 @@
// Chrome browser options page UI handler.
class BrowserOptionsHandler
: public OptionsPageUIHandler,
+ public AutocompleteControllerDelegate,
+ public CloudPrintSetupHandlerDelegate,
public ProfileSyncServiceObserver,
- public AutocompleteControllerDelegate,
+ public SelectFileDialog::Listener,
public ShellIntegration::DefaultWebClientObserver,
public TemplateURLServiceObserver {
public:
@@ -59,6 +68,14 @@
const content::NotificationSource& source,
const content::NotificationDetails& details) OVERRIDE;
+ // SelectFileDialog::Listener implementation
+ virtual void FileSelected(const FilePath& path,
+ int index,
+ void* params) OVERRIDE;
+
+ // CloudPrintSetupHandler::Delegate implementation.
+ virtual void OnCloudPrintSetupClosed() OVERRIDE;
+
// Makes this the default browser. Called from WebUI.
void BecomeDefaultBrowser(const base::ListValue* args);
@@ -136,6 +153,126 @@
void UpdateAccountPicture();
#endif
+ // Callback for the "selectDownloadLocation" message. This will prompt the
+ // user for a destination folder using platform-specific APIs.
+ void HandleSelectDownloadLocation(const ListValue* args);
+
+ // Callback for the "autoOpenFileTypesResetToDefault" message. This will
+ // remove all auto-open file-type settings.
+ void HandleAutoOpenButton(const ListValue* args);
+
+ // Callback for the "metricsReportingCheckboxAction" message. This is called
+ // if the user toggles the metrics reporting checkbox.
+ void HandleMetricsReportingCheckbox(const ListValue* args);
+
+ // Callback for the "defaultFontSizeAction" message. This is called if the
+ // user changes the default font size. |args| is an array that contains
+ // one item, the font size as a numeric value.
+ void HandleDefaultFontSize(const ListValue* args);
+
+ // Callback for the "defaultZoomFactorAction" message. This is called if the
+ // user changes the default zoom factor. |args| is an array that contains
+ // one item, the zoom factor as a numeric value.
+ void HandleDefaultZoomFactor(const ListValue* args);
+
+ // Callback for the "Check for server certificate revocation" checkbox. This
+ // is called if the user toggles the "Check for server certificate revocation"
+ // checkbox.
+ void HandleCheckRevocationCheckbox(const ListValue* args);
+
+ // Callback for the "Use SSL 3.0" checkbox. This is called if the user toggles
+ // the "Use SSL 3.0" checkbox.
+ void HandleUseSSL3Checkbox(const ListValue* args);
+
+ // Callback for the "Use TLS 1.0" checkbox. This is called if the user toggles
+ // the "Use TLS 1.0" checkbox.
+ void HandleUseTLS1Checkbox(const ListValue* args);
+
+#if !defined(OS_CHROMEOS)
+ // Callback for the "showNetworkProxySettings" message. This will invoke
+ // an appropriate dialog for configuring proxy settings.
+ void ShowNetworkProxySettings(const ListValue* args);
+#endif
+
+#if !defined(USE_NSS)
+ // Callback for the "showManageSSLCertificates" message. This will invoke
+ // an appropriate certificate management action based on the platform.
+ void ShowManageSSLCertificates(const ListValue* args);
+#endif
+
+ // Callback for the Cloud Print manage button. This will open a new
+ // tab pointed at the management URL.
+ void ShowCloudPrintManagePage(const ListValue* args);
+
+ // Register localized strings used by Cloud Print
+ void RegisterCloudPrintStrings(DictionaryValue* localized_strings);
+
+#if !defined(OS_CHROMEOS)
+ // Callback for the Sign in to Cloud Print button. This will start
+ // the authentication process.
+ void ShowCloudPrintSetupDialog(const ListValue* args);
+
+ // Callback for the Disable Cloud Print button. This will sign out
+ // of cloud print.
+ void HandleDisableCloudPrintConnector(const ListValue* args);
+
+ // Pings the service to send us it's current notion of the enabled state.
+ void RefreshCloudPrintStatusFromService();
+
+ // Setup the enabled or disabled state of the cloud print connector
+ // management UI.
+ void SetupCloudPrintConnectorSection();
+
+ // Remove cloud print connector section if cloud print connector management
+ // UI is disabled.
+ void RemoveCloudPrintConnectorSection();
+#endif
+
+#if defined(OS_CHROMEOS)
+ // Called when the accessibility checkbox values are changed.
+ // |args| will contain the checkbox checked state as a string
+ // ("true" or "false").
+ void SpokenFeedbackChangeCallback(const base::ListValue* args);
+ void HighContrastChangeCallback(const base::ListValue* args);
+ void ScreenMagnifierChangeCallback(const base::ListValue* args);
+ void VirtualKeyboardChangeCallback(const base::ListValue* args);
+#endif
+
+#if !defined(OS_MACOSX) && !defined(OS_CHROMEOS)
+ // Sets up the checked state for the "Continue running background apps..."
+ // checkbox.
+ void SetupBackgroundModeSettings();
+
+ // Callback for the "Continue running background apps..." checkbox.
+ void HandleBackgroundModeCheckbox(const ListValue* args);
+#endif
+
+ // Setup the checked state for the metrics reporting checkbox.
+ void SetupMetricsReportingCheckbox();
+
+ // Setup the visibility for the metrics reporting setting.
+ void SetupMetricsReportingSettingVisibility();
+
+ // Setup the font size selector control.
+ void SetupFontSizeSelector();
+
+ // Setup the page zoom selector control.
+ void SetupPageZoomSelector();
+
+ // Setup the enabled state of the reset button.
+ void SetupAutoOpenFileTypesDisabledAttribute();
+
+ // Setup the proxy settings section UI.
+ void SetupProxySettingsSection();
+
+ // Setup the checked state for SSL related checkboxes.
+ void SetupSSLConfigSettings();
+
+#if defined(OS_CHROMEOS)
+ // Setup the accessibility features for ChromeOS.
+ void SetupAccessibilityFeatures();
+#endif
+
// Returns a newly created dictionary with a number of properties that
// correspond to the status of sync.
DictionaryValue* GetSyncStateDictionary();
@@ -157,6 +294,31 @@
// True if the multiprofiles switch is enabled.
bool multiprofile_;
+ scoped_refptr<SelectFileDialog> select_folder_dialog_;
+
+#if !defined(OS_CHROMEOS)
+ BooleanPrefMember enable_metrics_recording_;
+ StringPrefMember cloud_print_connector_email_;
+ BooleanPrefMember cloud_print_connector_enabled_;
+ bool cloud_print_connector_ui_enabled_;
+ scoped_ptr<CloudPrintSetupHandler> cloud_print_setup_handler_;
+#endif
+
+ // SSLConfigService prefs.
+ BooleanPrefMember rev_checking_enabled_;
+
+#if !defined(OS_MACOSX) && !defined(OS_CHROMEOS)
+ BooleanPrefMember background_mode_enabled_;
+#endif
+
+ StringPrefMember auto_open_files_;
+ IntegerPrefMember default_font_size_;
+ DoublePrefMember default_zoom_level_;
+
+#if !defined(OS_CHROMEOS)
+ scoped_ptr<PrefSetObserver> proxy_prefs_;
+#endif // !defined(OS_CHROMEOS)
+
DISALLOW_COPY_AND_ASSIGN(BrowserOptionsHandler);
};

Powered by Google App Engine
This is Rietveld 408576698