Chromium Code Reviews| Index: chrome/browser/chromeos/printing/printer_pref_manager.h |
| diff --git a/chrome/browser/chromeos/printing/printer_pref_manager.h b/chrome/browser/chromeos/printing/printer_pref_manager.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..e664001f768b60297182ef8a05b7b98e65a77355 |
| --- /dev/null |
| +++ b/chrome/browser/chromeos/printing/printer_pref_manager.h |
| @@ -0,0 +1,42 @@ |
| +// Copyright 2016 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef CHROME_BROWSER_CHROMEOS_PRINTING_PRINTER_PREF_MANAGER_H_ |
| +#define CHROME_BROWSER_CHROMEOS_PRINTING_PRINTER_PREF_MANAGER_H_ |
| + |
| +#include <memory> |
| +#include <vector> |
| + |
| +#include "chromeos/printing/printer_configuration.h" |
| +#include "chromeos/printing/printer_translator.h" |
| + |
| +class Profile; |
| + |
| +namespace user_prefs { |
| +class PrefRegistrySyncable; |
| +} |
| + |
| +namespace chromeos { |
| + |
| +class PrinterPrefManager { |
| + public: |
| + explicit PrinterPrefManager(Profile* profile); |
| + |
| + // Register the printing preferences with the |registry|. |
| + static void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry); |
| + |
| + // Returns the printers that are saved in preferences. |
| + std::vector<std::unique_ptr<Printer>> GetPrinters() const; |
| + |
| + // Add or update a printer. Printers are identified by the id field. Use an |
|
stevenjb
2016/08/01 20:48:16
nit: Adds or Updates
skau
2016/08/01 21:10:10
Done.
|
| + // empty id to add a new printer. |
| + void RegisterPrinter(std::unique_ptr<Printer> printer); |
| + |
| + private: |
| + Profile* profile_; |
| +}; |
| + |
| +} // namespace chromeos |
| + |
| +#endif // CHROME_BROWSER_CHROMEOS_PRINTING_PRINTER_PREF_MANAGER_H_ |