| 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_ADVANCED_OPTIONS_HANDLER_H_ | 5 #ifndef CHROME_BROWSER_UI_WEBUI_OPTIONS_ADVANCED_OPTIONS_HANDLER_H_ |
| 6 #define CHROME_BROWSER_UI_WEBUI_OPTIONS_ADVANCED_OPTIONS_HANDLER_H_ | 6 #define CHROME_BROWSER_UI_WEBUI_OPTIONS_ADVANCED_OPTIONS_HANDLER_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "chrome/browser/prefs/pref_member.h" | 9 #include "chrome/browser/prefs/pref_member.h" |
| 10 #include "chrome/browser/printing/cloud_print/cloud_print_setup_handler.h" | 10 #include "chrome/browser/printing/cloud_print/cloud_print_setup_handler.h" |
| 11 #include "chrome/browser/ui/select_file_dialog.h" | 11 #include "chrome/browser/ui/select_file_dialog.h" |
| 12 #include "chrome/browser/ui/webui/options/options_ui.h" | 12 #include "chrome/browser/ui/webui/options/options_ui.h" |
| 13 | 13 |
| 14 #if !defined(OS_CHROMEOS) | 14 #if !defined(OS_CHROMEOS) |
| 15 #include "chrome/browser/prefs/pref_set_observer.h" | 15 #include "chrome/browser/prefs/pref_set_observer.h" |
| 16 #endif // !defined(OS_CHROMEOS) | 16 #endif // !defined(OS_CHROMEOS) |
| 17 | 17 |
| 18 class CloudPrintSetupHandler; | 18 class CloudPrintSetupHandler; |
| 19 | 19 |
| 20 // Chrome advanced options page UI handler. | 20 // Chrome advanced options page UI handler. |
| 21 class AdvancedOptionsHandler | 21 class AdvancedOptionsHandler |
| 22 : public OptionsPageUIHandler, | 22 : public OptionsPageUIHandler, |
| 23 public SelectFileDialog::Listener, | 23 public SelectFileDialog::Listener, |
| 24 public CloudPrintSetupHandlerDelegate { | 24 public CloudPrintSetupHandlerDelegate { |
| 25 public: | 25 public: |
| 26 AdvancedOptionsHandler(); | 26 AdvancedOptionsHandler(); |
| 27 virtual ~AdvancedOptionsHandler(); | 27 virtual ~AdvancedOptionsHandler(); |
| 28 | 28 |
| 29 // OptionsPageUIHandler implementation. | 29 // OptionsPageUIHandler implementation. |
| 30 virtual void GetLocalizedValues(DictionaryValue* localized_strings); | 30 virtual void GetLocalizedValues(DictionaryValue* localized_strings) OVERRIDE; |
| 31 virtual void Initialize(); | 31 virtual void Initialize() OVERRIDE; |
| 32 | 32 |
| 33 // WebUIMessageHandler implementation. | 33 // WebUIMessageHandler implementation. |
| 34 virtual WebUIMessageHandler* Attach(WebUI* web_ui); | 34 virtual WebUIMessageHandler* Attach(WebUI* web_ui) OVERRIDE; |
| 35 virtual void RegisterMessages(); | 35 virtual void RegisterMessages() OVERRIDE; |
| 36 | 36 |
| 37 // content::NotificationObserver implementation. | 37 // content::NotificationObserver implementation. |
| 38 virtual void Observe(int type, | 38 virtual void Observe(int type, |
| 39 const content::NotificationSource& source, | 39 const content::NotificationSource& source, |
| 40 const content::NotificationDetails& details); | 40 const content::NotificationDetails& details) OVERRIDE; |
| 41 | 41 |
| 42 // SelectFileDialog::Listener implementation | 42 // SelectFileDialog::Listener implementation |
| 43 virtual void FileSelected(const FilePath& path, int index, void* params); | 43 virtual void FileSelected(const FilePath& path, |
| 44 int index, |
| 45 void* params) OVERRIDE; |
| 44 | 46 |
| 45 // CloudPrintSetupHandler::Delegate implementation. | 47 // CloudPrintSetupHandler::Delegate implementation. |
| 46 virtual void OnCloudPrintSetupClosed(); | 48 virtual void OnCloudPrintSetupClosed() OVERRIDE; |
| 47 | 49 |
| 48 private: | 50 private: |
| 49 // Callback for the "selectDownloadLocation" message. This will prompt | 51 // Callback for the "selectDownloadLocation" message. This will prompt |
| 50 // the user for a destination folder using platform-specific APIs. | 52 // the user for a destination folder using platform-specific APIs. |
| 51 void HandleSelectDownloadLocation(const ListValue* args); | 53 void HandleSelectDownloadLocation(const ListValue* args); |
| 52 | 54 |
| 53 // Callback for the "autoOpenFileTypesResetToDefault" message. This will | 55 // Callback for the "autoOpenFileTypesResetToDefault" message. This will |
| 54 // remove all auto-open file-type settings. | 56 // remove all auto-open file-type settings. |
| 55 void HandleAutoOpenButton(const ListValue* args); | 57 void HandleAutoOpenButton(const ListValue* args); |
| 56 | 58 |
| (...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 161 IntegerPrefMember default_font_size_; | 163 IntegerPrefMember default_font_size_; |
| 162 | 164 |
| 163 #if !defined(OS_CHROMEOS) | 165 #if !defined(OS_CHROMEOS) |
| 164 scoped_ptr<PrefSetObserver> proxy_prefs_; | 166 scoped_ptr<PrefSetObserver> proxy_prefs_; |
| 165 #endif // !defined(OS_CHROMEOS) | 167 #endif // !defined(OS_CHROMEOS) |
| 166 | 168 |
| 167 DISALLOW_COPY_AND_ASSIGN(AdvancedOptionsHandler); | 169 DISALLOW_COPY_AND_ASSIGN(AdvancedOptionsHandler); |
| 168 }; | 170 }; |
| 169 | 171 |
| 170 #endif // CHROME_BROWSER_UI_WEBUI_OPTIONS_ADVANCED_OPTIONS_HANDLER_H_ | 172 #endif // CHROME_BROWSER_UI_WEBUI_OPTIONS_ADVANCED_OPTIONS_HANDLER_H_ |
| OLD | NEW |