Add new certificateProvider extension API.
[chromium-blink-merge.git] / chrome / browser / ui / webui / print_preview / sticky_settings.h
blobcdde6426b4f8e45b352bb7f0b8cd916d474d69fa
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
3 // found in the LICENSE file.
5 #ifndef CHROME_BROWSER_UI_WEBUI_PRINT_PREVIEW_STICKY_SETTINGS_H_
6 #define CHROME_BROWSER_UI_WEBUI_PRINT_PREVIEW_STICKY_SETTINGS_H_
8 #include "printing/print_job_constants.h"
10 #include <string>
12 #include "base/memory/scoped_ptr.h"
14 class PrintPreviewHandlerTest;
15 class PrefService;
17 namespace base {
18 class DictionaryValue;
19 class FilePath;
22 namespace user_prefs {
23 class PrefRegistrySyncable;
26 namespace printing {
28 // Holds all the settings that should be remembered (sticky) in print preview.
29 // A sticky setting will be restored next time the user launches print preview.
30 // Only one instance of this class is instantiated.
31 class StickySettings {
32 public:
33 StickySettings();
34 ~StickySettings();
36 base::FilePath* save_path();
37 std::string* printer_app_state();
39 // Stores app state for the last used printer.
40 void StoreAppState(const std::string& app_state);
41 // Stores the last path the user used to save to pdf.
42 void StoreSavePath(const base::FilePath& path);
44 void SaveInPrefs(PrefService* profile);
45 void RestoreFromPrefs(PrefService* profile);
46 static void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry);
48 private:
50 scoped_ptr<base::FilePath> save_path_;
51 scoped_ptr<std::string> printer_app_state_;
54 } // namespace printing
56 #endif // CHROME_BROWSER_UI_WEBUI_PRINT_PREVIEW_STICKY_SETTINGS_H_