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

Side by Side Diff: chrome/browser/media_gallery/media_file_system_registry.h

Issue 10933137: Media Galleries: Change the media gallery name to be a JSON value with the name and pref id. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: dcheck Created 8 years, 3 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 // MediaFileSystemRegistry registers pictures directories and media devices as 5 // MediaFileSystemRegistry registers pictures directories and media devices as
6 // File API filesystems and keeps track of the path to filesystem ID mappings. 6 // File API filesystems and keeps track of the path to filesystem ID mappings.
7 7
8 #ifndef CHROME_BROWSER_MEDIA_GALLERY_MEDIA_FILE_SYSTEM_REGISTRY_H_ 8 #ifndef CHROME_BROWSER_MEDIA_GALLERY_MEDIA_FILE_SYSTEM_REGISTRY_H_
9 #define CHROME_BROWSER_MEDIA_GALLERY_MEDIA_FILE_SYSTEM_REGISTRY_H_ 9 #define CHROME_BROWSER_MEDIA_GALLERY_MEDIA_FILE_SYSTEM_REGISTRY_H_
10 10
(...skipping 24 matching lines...) Expand all
35 class IsolatedContext; 35 class IsolatedContext;
36 } 36 }
37 37
38 namespace chrome { 38 namespace chrome {
39 39
40 class ExtensionGalleriesHost; 40 class ExtensionGalleriesHost;
41 class MediaGalleriesPreferences; 41 class MediaGalleriesPreferences;
42 class ScopedMediaDeviceMapEntry; 42 class ScopedMediaDeviceMapEntry;
43 43
44 struct MediaFileSystemInfo { 44 struct MediaFileSystemInfo {
45 string16 name; 45 MediaFileSystemInfo(const std::string& fs_name,
46 const FilePath& fs_path,
47 const std::string& filesystem_id);
48 MediaFileSystemInfo();
49
50 std::string name; // JSON string, must not contain slashes.
51 FilePath path;
46 std::string fsid; 52 std::string fsid;
47 FilePath path;
48 }; 53 };
49 54
50 typedef base::Callback<void(const std::vector<MediaFileSystemInfo>&)> 55 typedef base::Callback<void(const std::vector<MediaFileSystemInfo>&)>
51 MediaFileSystemsCallback; 56 MediaFileSystemsCallback;
52 57
53 class MediaFileSystemRegistry 58 class MediaFileSystemRegistry
54 : public base::SystemMonitor::DevicesChangedObserver { 59 : public base::SystemMonitor::DevicesChangedObserver {
55 public: 60 public:
56 // The instance is lazily created per browser process. 61 // The instance is lazily created per browser process.
57 static MediaFileSystemRegistry* GetInstance(); 62 static MediaFileSystemRegistry* GetInstance();
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 // Only accessed on the UI thread. 130 // Only accessed on the UI thread.
126 MTPDeviceDelegateMap mtp_delegate_map_; 131 MTPDeviceDelegateMap mtp_delegate_map_;
127 #endif 132 #endif
128 133
129 DISALLOW_COPY_AND_ASSIGN(MediaFileSystemRegistry); 134 DISALLOW_COPY_AND_ASSIGN(MediaFileSystemRegistry);
130 }; 135 };
131 136
132 } // namespace chrome 137 } // namespace chrome
133 138
134 #endif // CHROME_BROWSER_MEDIA_GALLERY_MEDIA_FILE_SYSTEM_REGISTRY_H_ 139 #endif // CHROME_BROWSER_MEDIA_GALLERY_MEDIA_FILE_SYSTEM_REGISTRY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698