OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2010 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. |
| 4 |
| 5 #ifndef CHROME_BROWSER_TABS_PINNED_TAB_CODEC_H_ |
| 6 #define CHROME_BROWSER_TABS_PINNED_TAB_CODEC_H_ |
| 7 |
| 8 #include <string> |
| 9 #include <vector> |
| 10 |
| 11 #include "chrome/browser/browser_init.h" |
| 12 #include "googleurl/src/gurl.h" |
| 13 |
| 14 class Browser; |
| 15 class PrefService; |
| 16 class Profile; |
| 17 |
| 18 // PinnedTabCodec is used to read and write the set of pinned tabs to |
| 19 // preferences. When Chrome exits the sets of pinned tabs are written to prefs. |
| 20 // On startup if the user has not chosen to restore the last session the set of |
| 21 // pinned tabs is opened. |
| 22 // |
| 23 // The entries are stored in preferences as a list of dictionaries, with each |
| 24 // dictionary describing the entry. |
| 25 class PinnedTabCodec { |
| 26 public: |
| 27 // Registers the preference used by this class. |
| 28 static void RegisterUserPrefs(PrefService* prefs); |
| 29 |
| 30 // Resets the preferences state. |
| 31 static void WritePinnedTabs(Profile* profile); |
| 32 |
| 33 // Reads and returns the set of pinned tabs to restore from preferences. |
| 34 static std::vector<BrowserInit::LaunchWithProfile::Tab> ReadPinnedTabs( |
| 35 Profile* profile); |
| 36 |
| 37 private: |
| 38 PinnedTabCodec(); |
| 39 ~PinnedTabCodec(); |
| 40 |
| 41 DISALLOW_COPY_AND_ASSIGN(PinnedTabCodec); |
| 42 }; |
| 43 |
| 44 #endif // CHROME_BROWSER_TABS_PINNED_TAB_CODEC_H_ |
OLD | NEW |