OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 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_MEDIA_GALLERY_MEDIA_GALLERIES_PREFERENCES_H_ | 5 #ifndef CHROME_BROWSER_MEDIA_GALLERY_MEDIA_GALLERIES_PREFERENCES_H_ |
6 #define CHROME_BROWSER_MEDIA_GALLERY_MEDIA_GALLERIES_PREFERENCES_H_ | 6 #define CHROME_BROWSER_MEDIA_GALLERY_MEDIA_GALLERIES_PREFERENCES_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <set> | 9 #include <set> |
10 #include <string> | 10 #include <string> |
11 | 11 |
12 #include "base/basictypes.h" | 12 #include "base/basictypes.h" |
13 #include "base/file_path.h" | 13 #include "base/file_path.h" |
14 #include "base/observer_list.h" | 14 #include "base/observer_list.h" |
15 #include "base/string16.h" | 15 #include "base/string16.h" |
16 #include "chrome/browser/profiles/profile_keyed_service.h" | 16 #include "chrome/browser/profiles/profile_keyed_service.h" |
17 | 17 |
18 class PrefServiceSyncable; | 18 class PrefRegistrySyncable; |
19 class Profile; | 19 class Profile; |
20 | 20 |
21 namespace base { | 21 namespace base { |
22 class DictionaryValue; | 22 class DictionaryValue; |
23 } | 23 } |
24 | 24 |
25 namespace extensions { | 25 namespace extensions { |
26 class Extension; | 26 class Extension; |
27 class ExtensionPrefs; | 27 class ExtensionPrefs; |
28 } | 28 } |
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
122 MediaGalleryPrefId pref_id, | 122 MediaGalleryPrefId pref_id, |
123 bool has_permission); | 123 bool has_permission); |
124 | 124 |
125 const MediaGalleriesPrefInfoMap& known_galleries() const { | 125 const MediaGalleriesPrefInfoMap& known_galleries() const { |
126 return known_galleries_; | 126 return known_galleries_; |
127 } | 127 } |
128 | 128 |
129 // ProfileKeyedService implementation: | 129 // ProfileKeyedService implementation: |
130 virtual void Shutdown() OVERRIDE; | 130 virtual void Shutdown() OVERRIDE; |
131 | 131 |
132 static void RegisterUserPrefs(PrefServiceSyncable* prefs); | 132 static void RegisterUserPrefs(PrefRegistrySyncable* registry); |
133 | 133 |
134 // Returns true if the media gallery preferences system has ever been used | 134 // Returns true if the media gallery preferences system has ever been used |
135 // for this profile. To be exact, it checks if a gallery has ever been added | 135 // for this profile. To be exact, it checks if a gallery has ever been added |
136 // (including defaults). | 136 // (including defaults). |
137 static bool APIHasBeenUsed(Profile* profile); | 137 static bool APIHasBeenUsed(Profile* profile); |
138 | 138 |
139 private: | 139 private: |
140 typedef std::map<std::string /*device id*/, MediaGalleryPrefIdSet> | 140 typedef std::map<std::string /*device id*/, MediaGalleryPrefIdSet> |
141 DeviceIdPrefIdsMap; | 141 DeviceIdPrefIdsMap; |
142 | 142 |
(...skipping 20 matching lines...) Expand all Loading... |
163 DeviceIdPrefIdsMap device_map_; | 163 DeviceIdPrefIdsMap device_map_; |
164 | 164 |
165 ObserverList<GalleryChangeObserver> gallery_change_observers_; | 165 ObserverList<GalleryChangeObserver> gallery_change_observers_; |
166 | 166 |
167 DISALLOW_COPY_AND_ASSIGN(MediaGalleriesPreferences); | 167 DISALLOW_COPY_AND_ASSIGN(MediaGalleriesPreferences); |
168 }; | 168 }; |
169 | 169 |
170 } // namespace chrome | 170 } // namespace chrome |
171 | 171 |
172 #endif // CHROME_BROWSER_MEDIA_GALLERY_MEDIA_GALLERIES_PREFERENCES_H_ | 172 #endif // CHROME_BROWSER_MEDIA_GALLERY_MEDIA_GALLERIES_PREFERENCES_H_ |
OLD | NEW |