| Index: chrome/browser/extensions/api/media_galleries/media_galleries_api.h
|
| diff --git a/chrome/browser/extensions/api/media_galleries/media_galleries_api.h b/chrome/browser/extensions/api/media_galleries/media_galleries_api.h
|
| index 2307232d601574336040b2b53a6776b9bfb8dd31..ea40115cd93eb87123f071359b9e71f28ccbfc8a 100644
|
| --- a/chrome/browser/extensions/api/media_galleries/media_galleries_api.h
|
| +++ b/chrome/browser/extensions/api/media_galleries/media_galleries_api.h
|
| @@ -20,7 +20,6 @@
|
| #include "chrome/browser/extensions/chrome_extension_function.h"
|
| #include "chrome/browser/media_galleries/gallery_watch_manager_observer.h"
|
| #include "chrome/browser/media_galleries/media_file_system_registry.h"
|
| -#include "chrome/browser/media_galleries/media_scan_manager_observer.h"
|
| #include "chrome/common/extensions/api/media_galleries.h"
|
| #include "chrome/common/media_galleries/metadata_types.h"
|
| #include "components/storage_monitor/media_storage_util.h"
|
| @@ -30,8 +29,6 @@
|
|
|
| namespace MediaGalleries = extensions::api::media_galleries;
|
|
|
| -class MediaGalleriesScanResultController;
|
| -
|
| namespace content {
|
| class BlobHandle;
|
| class WebContents;
|
| @@ -49,7 +46,6 @@ class Extension;
|
| // Created at the same time as the Profile. This is also the event router.
|
| class MediaGalleriesEventRouter : public BrowserContextKeyedAPI,
|
| public GalleryWatchManagerObserver,
|
| - public MediaScanManagerObserver,
|
| public extensions::EventRouter::Observer {
|
| public:
|
| // KeyedService implementation.
|
| @@ -63,15 +59,6 @@ class MediaGalleriesEventRouter : public BrowserContextKeyedAPI,
|
| static MediaGalleriesEventRouter* Get(content::BrowserContext* context);
|
|
|
| bool ExtensionHasGalleryChangeListener(const std::string& extension_id) const;
|
| - bool ExtensionHasScanProgressListener(const std::string& extension_id) const;
|
| -
|
| - // MediaScanManagerObserver implementation.
|
| - void OnScanStarted(const std::string& extension_id) override;
|
| - void OnScanCancelled(const std::string& extension_id) override;
|
| - void OnScanFinished(const std::string& extension_id,
|
| - int gallery_count,
|
| - const MediaGalleryScanResult& file_counts) override;
|
| - void OnScanError(const std::string& extension_id) override;
|
|
|
| private:
|
| friend class BrowserContextKeyedAPIFactory<MediaGalleriesEventRouter>;
|
| @@ -214,64 +201,6 @@ class MediaGalleriesDropPermissionForMediaFileSystemFunction
|
| void OnPreferencesInit(MediaGalleryPrefId pref_id);
|
| };
|
|
|
| -class MediaGalleriesStartMediaScanFunction
|
| - : public ChromeAsyncExtensionFunction {
|
| - public:
|
| - DECLARE_EXTENSION_FUNCTION("mediaGalleries.startMediaScan",
|
| - MEDIAGALLERIES_STARTMEDIASCAN)
|
| -
|
| - protected:
|
| - ~MediaGalleriesStartMediaScanFunction() override;
|
| - bool RunAsync() override;
|
| -
|
| - private:
|
| - // Bottom half for RunAsync, invoked after the preferences is initialized.
|
| - void OnPreferencesInit();
|
| -};
|
| -
|
| -class MediaGalleriesCancelMediaScanFunction
|
| - : public ChromeAsyncExtensionFunction {
|
| - public:
|
| - DECLARE_EXTENSION_FUNCTION("mediaGalleries.cancelMediaScan",
|
| - MEDIAGALLERIES_CANCELMEDIASCAN)
|
| -
|
| - protected:
|
| - ~MediaGalleriesCancelMediaScanFunction() override;
|
| - bool RunAsync() override;
|
| -
|
| - private:
|
| - // Bottom half for RunAsync, invoked after the preferences is initialized.
|
| - void OnPreferencesInit();
|
| -};
|
| -
|
| -class MediaGalleriesAddScanResultsFunction
|
| - : public ChromeAsyncExtensionFunction {
|
| - public:
|
| - DECLARE_EXTENSION_FUNCTION("mediaGalleries.addScanResults",
|
| - MEDIAGALLERIES_ADDSCANRESULTS)
|
| -
|
| - protected:
|
| - ~MediaGalleriesAddScanResultsFunction() override;
|
| - bool RunAsync() override;
|
| -
|
| - // Pulled out for testing.
|
| - virtual MediaGalleriesScanResultController* MakeDialog(
|
| - content::WebContents* web_contents,
|
| - const extensions::Extension& extension,
|
| - const base::Closure& on_finish);
|
| -
|
| - private:
|
| - // Bottom half for RunAsync, invoked after the preferences is initialized.
|
| - void OnPreferencesInit();
|
| -
|
| - // Grabs galleries from the media file system registry and passes them to
|
| - // ReturnGalleries().
|
| - void GetAndReturnGalleries();
|
| -
|
| - // Returns galleries to the caller.
|
| - void ReturnGalleries(const std::vector<MediaFileSystemInfo>& filesystems);
|
| -};
|
| -
|
| class MediaGalleriesGetMetadataFunction : public ChromeAsyncExtensionFunction {
|
| public:
|
| DECLARE_EXTENSION_FUNCTION("mediaGalleries.getMetadata",
|
|
|