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

Side by Side Diff: chrome/browser/chromeos/extensions/file_manager/private_api_mount.h

Issue 23715003: Files.app: Rename the FileBrowserPrivateAPI's functions. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed the comments. Created 7 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 // This file provides task related API functions. 5 // This file provides task related API functions.
6 6
7 #ifndef CHROME_BROWSER_CHROMEOS_EXTENSIONS_FILE_MANAGER_PRIVATE_API_MOUNT_H_ 7 #ifndef CHROME_BROWSER_CHROMEOS_EXTENSIONS_FILE_MANAGER_PRIVATE_API_MOUNT_H_
8 #define CHROME_BROWSER_CHROMEOS_EXTENSIONS_FILE_MANAGER_PRIVATE_API_MOUNT_H_ 8 #define CHROME_BROWSER_CHROMEOS_EXTENSIONS_FILE_MANAGER_PRIVATE_API_MOUNT_H_
9 9
10 #include <string> 10 #include <string>
11 #include <vector> 11 #include <vector>
12 12
13 #include "base/files/file_path.h" 13 #include "base/files/file_path.h"
14 #include "chrome/browser/chromeos/drive/file_errors.h" 14 #include "chrome/browser/chromeos/drive/file_errors.h"
15 #include "chrome/browser/chromeos/extensions/file_manager/private_api_base.h" 15 #include "chrome/browser/chromeos/extensions/file_manager/private_api_base.h"
16 16
17 namespace ui { 17 namespace ui {
18 struct SelectedFileInfo; 18 struct SelectedFileInfo;
19 } 19 }
20 20
21 namespace extensions { 21 namespace extensions {
22 22
23 // Implements chrome.fileBrowserPrivate.addMount method. 23 // Implements chrome.fileBrowserPrivate.addMount method.
24 // Mounts a device or a file. 24 // Mounts a device or a file.
25 class AddMountFunction : public LoggedAsyncExtensionFunction { 25 class FileBrowserPrivateAddMountFunction : public LoggedAsyncExtensionFunction {
26 public: 26 public:
27 DECLARE_EXTENSION_FUNCTION("fileBrowserPrivate.addMount", 27 DECLARE_EXTENSION_FUNCTION("fileBrowserPrivate.addMount",
28 FILEBROWSERPRIVATE_ADDMOUNT) 28 FILEBROWSERPRIVATE_ADDMOUNT)
29 29
30 AddMountFunction(); 30 FileBrowserPrivateAddMountFunction();
31 31
32 protected: 32 protected:
33 virtual ~AddMountFunction(); 33 virtual ~FileBrowserPrivateAddMountFunction();
34 34
35 // AsyncExtensionFunction overrides. 35 // AsyncExtensionFunction overrides.
36 virtual bool RunImpl() OVERRIDE; 36 virtual bool RunImpl() OVERRIDE;
37 37
38 private: 38 private:
39 // A callback method to handle the result of MarkCacheAsMounted. 39 // A callback method to handle the result of MarkCacheAsMounted.
40 void OnMountedStateSet(const std::string& mount_type, 40 void OnMountedStateSet(const std::string& mount_type,
41 const base::FilePath::StringType& file_name, 41 const base::FilePath::StringType& file_name,
42 drive::FileError error, 42 drive::FileError error,
43 const base::FilePath& file_path); 43 const base::FilePath& file_path);
44 }; 44 };
45 45
46 // Implements chrome.fileBrowserPrivate.removeMount method. 46 // Implements chrome.fileBrowserPrivate.removeMount method.
47 // Unmounts selected device. Expects mount point path as an argument. 47 // Unmounts selected device. Expects mount point path as an argument.
48 class RemoveMountFunction : public LoggedAsyncExtensionFunction { 48 class FileBrowserPrivateRemoveMountFunction
49 : public LoggedAsyncExtensionFunction {
49 public: 50 public:
50 DECLARE_EXTENSION_FUNCTION("fileBrowserPrivate.removeMount", 51 DECLARE_EXTENSION_FUNCTION("fileBrowserPrivate.removeMount",
51 FILEBROWSERPRIVATE_REMOVEMOUNT) 52 FILEBROWSERPRIVATE_REMOVEMOUNT)
52 53
53 RemoveMountFunction(); 54 FileBrowserPrivateRemoveMountFunction();
54 55
55 protected: 56 protected:
56 virtual ~RemoveMountFunction(); 57 virtual ~FileBrowserPrivateRemoveMountFunction();
57 58
58 // AsyncExtensionFunction overrides. 59 // AsyncExtensionFunction overrides.
59 virtual bool RunImpl() OVERRIDE; 60 virtual bool RunImpl() OVERRIDE;
60 61
61 private: 62 private:
62 // A callback method to handle the result of GetSelectedFileInfo. 63 // A callback method to handle the result of GetSelectedFileInfo.
63 void GetSelectedFileInfoResponse( 64 void GetSelectedFileInfoResponse(
64 const std::vector<ui::SelectedFileInfo>& files); 65 const std::vector<ui::SelectedFileInfo>& files);
65 }; 66 };
66 67
67 // Implements chrome.fileBrowserPrivate.getMountPoints method. 68 // Implements chrome.fileBrowserPrivate.getMountPoints method.
68 class GetMountPointsFunction : public LoggedAsyncExtensionFunction { 69 class FileBrowserPrivateGetMountPointsFunction
70 : public LoggedAsyncExtensionFunction {
69 public: 71 public:
70 DECLARE_EXTENSION_FUNCTION("fileBrowserPrivate.getMountPoints", 72 DECLARE_EXTENSION_FUNCTION("fileBrowserPrivate.getMountPoints",
71 FILEBROWSERPRIVATE_GETMOUNTPOINTS) 73 FILEBROWSERPRIVATE_GETMOUNTPOINTS)
72 74
73 GetMountPointsFunction(); 75 FileBrowserPrivateGetMountPointsFunction();
74 76
75 protected: 77 protected:
76 virtual ~GetMountPointsFunction(); 78 virtual ~FileBrowserPrivateGetMountPointsFunction();
77 79
78 // AsyncExtensionFunction overrides. 80 // AsyncExtensionFunction overrides.
79 virtual bool RunImpl() OVERRIDE; 81 virtual bool RunImpl() OVERRIDE;
80 }; 82 };
81 83
82 } // namespace extensions 84 } // namespace extensions
83 85
84 #endif // CHROME_BROWSER_CHROMEOS_EXTENSIONS_FILE_MANAGER_PRIVATE_API_MOUNT_H_ 86 #endif // CHROME_BROWSER_CHROMEOS_EXTENSIONS_FILE_MANAGER_PRIVATE_API_MOUNT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698