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

Unified Diff: chrome/browser/media_galleries/media_file_system_registry.h

Issue 185393012: Change media galleries to external file system type to add toURL support (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 6 years, 9 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/media_galleries/media_file_system_registry.h
diff --git a/chrome/browser/media_galleries/media_file_system_registry.h b/chrome/browser/media_galleries/media_file_system_registry.h
index 04065ff756eb57546cc4d3072a3974726cb1ad5d..93446987565dc3adc8ccdded0912ed8ce5d62a62 100644
--- a/chrome/browser/media_galleries/media_file_system_registry.h
+++ b/chrome/browser/media_galleries/media_file_system_registry.h
@@ -14,6 +14,7 @@
#include <vector>
#include "base/basictypes.h"
+#include "base/files/file.h"
#include "base/files/file_path.h"
#include "base/memory/ref_counted.h"
#include "base/memory/scoped_ptr.h"
@@ -80,6 +81,14 @@ class MediaFileSystemRegistry
const extensions::Extension* extension,
const MediaFileSystemsCallback& callback);
+ // Attempt to register the file system for |pref_id|. If |extension| does not
+ // have permission to |pref_id|, sends |callback| FILE_ERROR_NOT_FOUND.
+ void RegisterMediaFileSystemForExtension(
+ const content::RenderViewHost* rvh,
+ const extensions::Extension* extension,
+ MediaGalleryPrefId pref_id,
+ const base::Callback<void(base::File::Error result)>& callback);
+
// Returns the media galleries preferences for the specified |profile|.
// Caller is responsible for ensuring that the preferences are initialized
// before use.
@@ -110,6 +119,12 @@ class MediaFileSystemRegistry
virtual void OnGalleryRemoved(MediaGalleriesPreferences* pref,
MediaGalleryPrefId pref_id) OVERRIDE;
+ // Look up or create the extension gallery host.
+ ExtensionGalleriesHost* GetExtensionGalleryHost(
+ Profile* profile,
+ MediaGalleriesPreferences* preferences,
+ const std::string& extension_id);
+
void OnExtensionGalleriesHostEmpty(Profile* profile,
const std::string& extension_id);

Powered by Google App Engine
This is Rietveld 408576698