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

Unified Diff: chrome/browser/chromeos/extensions/file_browser_event_router.h

Issue 10834115: Drive: Mount/Unmount GoogleDrive on Files App when the file system is mounted/unmounted. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: rebase Created 8 years, 4 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/chromeos/extensions/file_browser_event_router.h
diff --git a/chrome/browser/chromeos/extensions/file_browser_event_router.h b/chrome/browser/chromeos/extensions/file_browser_event_router.h
index 1e41f85b792179aa6a4d93ce0f640106428a0c34..78705768f2e7c149549f493b67b7d239877f9dad 100644
--- a/chrome/browser/chromeos/extensions/file_browser_event_router.h
+++ b/chrome/browser/chromeos/extensions/file_browser_event_router.h
@@ -52,6 +52,10 @@ class FileBrowserEventRouter
void RemoveFileWatch(const FilePath& file_path,
const std::string& extension_id);
+ // Mounts Drive on File browser. |callback| will be called after raising a
+ // mount request event to file manager on JS-side.
+ void MountDrive(const base::Closure& callback);
+
// CrosDisksClient::Observer overrides.
virtual void DiskChanged(chromeos::disks::DiskMountManagerEventType event,
const chromeos::disks::DiskMountManager::Disk* disk)
@@ -82,6 +86,8 @@ class FileBrowserEventRouter
// gdata::GDataFileSystemInterface::Observer overrides.
virtual void OnDirectoryChanged(const FilePath& directory_path) OVERRIDE;
virtual void OnDocumentFeedFetched(int num_accumulated_entries) OVERRIDE;
+ virtual void OnFileSystemMounted() OVERRIDE;
+ virtual void OnFileSystemUnmounting() OVERRIDE;
private:
friend class FileBrowserEventRouterFactory;
@@ -186,6 +192,11 @@ class FileBrowserEventRouter
// zero.
void HandleRemoteUpdateRequestOnUIThread(bool start);
+ // Used to implement MountDrive(). Called after the authentication.
+ void OnAuthenticated(const base::Closure& callback,
+ gdata::GDataErrorCode error,
+ const std::string& tokeni);
+
scoped_refptr<FileWatcherDelegate> delegate_;
WatcherMap file_watchers_;
scoped_ptr<FileBrowserNotifications> notifications_;

Powered by Google App Engine
This is Rietveld 408576698