Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(112)

Side by Side Diff: chrome/browser/extensions/api/media_galleries_private/media_galleries_private_api.h

Issue 15742010: Use MediaGalleryPreferences directly in GalleryWatchStateTracker interface. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Make sure to get all call sites Created 7 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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_EXTENSIONS_API_MEDIA_GALLERIES_PRIVATE_MEDIA_GALLERIES_PR IVATE_API_H_ 5 #ifndef CHROME_BROWSER_EXTENSIONS_API_MEDIA_GALLERIES_PRIVATE_MEDIA_GALLERIES_PR IVATE_API_H_
6 #define CHROME_BROWSER_EXTENSIONS_API_MEDIA_GALLERIES_PRIVATE_MEDIA_GALLERIES_PR IVATE_API_H_ 6 #define CHROME_BROWSER_EXTENSIONS_API_MEDIA_GALLERIES_PRIVATE_MEDIA_GALLERIES_PR IVATE_API_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 67
68 // EventRouter::Observer implementation. 68 // EventRouter::Observer implementation.
69 virtual void OnListenerAdded(const EventListenerInfo& details) OVERRIDE; 69 virtual void OnListenerAdded(const EventListenerInfo& details) OVERRIDE;
70 70
71 MediaGalleriesPrivateEventRouter* GetEventRouter(); 71 MediaGalleriesPrivateEventRouter* GetEventRouter();
72 GalleryWatchStateTracker* GetGalleryWatchStateTracker(); 72 GalleryWatchStateTracker* GetGalleryWatchStateTracker();
73 73
74 private: 74 private:
75 friend class ProfileKeyedAPIFactory<MediaGalleriesPrivateAPI>; 75 friend class ProfileKeyedAPIFactory<MediaGalleriesPrivateAPI>;
76 76
77 void MaybeInitializeEventRouter(); 77 void MaybeInitializeEventRouterAndTracker();
78 78
79 // ProfileKeyedAPI implementation. 79 // ProfileKeyedAPI implementation.
80 static const char* service_name() { 80 static const char* service_name() {
81 return "MediaGalleriesPrivateAPI"; 81 return "MediaGalleriesPrivateAPI";
82 } 82 }
83 static const bool kServiceIsNULLWhileTesting = true; 83 static const bool kServiceIsNULLWhileTesting = true;
84 84
85 // Current profile. 85 // Current profile.
86 Profile* profile_; 86 Profile* profile_;
87 87
88 GalleryWatchStateTracker tracker_; 88 scoped_ptr<GalleryWatchStateTracker> tracker_;
89 89
90 // Created lazily on first access. 90 // Created lazily on first access.
91 scoped_ptr<MediaGalleriesPrivateEventRouter> 91 scoped_ptr<MediaGalleriesPrivateEventRouter>
92 media_galleries_private_event_router_; 92 media_galleries_private_event_router_;
93 93
94 DISALLOW_COPY_AND_ASSIGN(MediaGalleriesPrivateAPI); 94 DISALLOW_COPY_AND_ASSIGN(MediaGalleriesPrivateAPI);
95 }; 95 };
96 96
97 // Implements the chrome.mediaGalleriesPrivate.addGalleryWatch method. 97 // Implements the chrome.mediaGalleriesPrivate.addGalleryWatch method.
98 class MediaGalleriesPrivateAddGalleryWatchFunction 98 class MediaGalleriesPrivateAddGalleryWatchFunction
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
181 protected: 181 protected:
182 virtual ~MediaGalleriesPrivateGetHandlersFunction(); 182 virtual ~MediaGalleriesPrivateGetHandlersFunction();
183 183
184 // AsyncExtensionFunction overrides. 184 // AsyncExtensionFunction overrides.
185 virtual bool RunImpl() OVERRIDE; 185 virtual bool RunImpl() OVERRIDE;
186 }; 186 };
187 187
188 } // namespace extensions 188 } // namespace extensions
189 189
190 #endif // CHROME_BROWSER_EXTENSIONS_API_MEDIA_GALLERIES_PRIVATE_MEDIA_GALLERIES _PRIVATE_API_H_ 190 #endif // CHROME_BROWSER_EXTENSIONS_API_MEDIA_GALLERIES_PRIVATE_MEDIA_GALLERIES _PRIVATE_API_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698