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

Side by Side Diff: chrome/browser/chromeos/extensions/file_manager/file_browser_private_api.cc

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
« no previous file with comments | « no previous file | chrome/browser/chromeos/extensions/file_manager/private_api_dialog.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #include "chrome/browser/chromeos/extensions/file_manager/file_browser_private_a pi.h" 5 #include "chrome/browser/chromeos/extensions/file_manager/file_browser_private_a pi.h"
6 6
7 #include "chrome/browser/chromeos/extensions/file_manager/event_router.h" 7 #include "chrome/browser/chromeos/extensions/file_manager/event_router.h"
8 #include "chrome/browser/chromeos/extensions/file_manager/file_browser_private_a pi_factory.h" 8 #include "chrome/browser/chromeos/extensions/file_manager/file_browser_private_a pi_factory.h"
9 #include "chrome/browser/chromeos/extensions/file_manager/private_api_dialog.h" 9 #include "chrome/browser/chromeos/extensions/file_manager/private_api_dialog.h"
10 #include "chrome/browser/chromeos/extensions/file_manager/private_api_drive.h" 10 #include "chrome/browser/chromeos/extensions/file_manager/private_api_drive.h"
11 #include "chrome/browser/chromeos/extensions/file_manager/private_api_file_syste m.h" 11 #include "chrome/browser/chromeos/extensions/file_manager/private_api_file_syste m.h"
12 #include "chrome/browser/chromeos/extensions/file_manager/private_api_misc.h" 12 #include "chrome/browser/chromeos/extensions/file_manager/private_api_misc.h"
13 #include "chrome/browser/chromeos/extensions/file_manager/private_api_mount.h" 13 #include "chrome/browser/chromeos/extensions/file_manager/private_api_mount.h"
14 #include "chrome/browser/chromeos/extensions/file_manager/private_api_strings.h" 14 #include "chrome/browser/chromeos/extensions/file_manager/private_api_strings.h"
15 #include "chrome/browser/chromeos/extensions/file_manager/private_api_tasks.h" 15 #include "chrome/browser/chromeos/extensions/file_manager/private_api_tasks.h"
16 #include "chrome/browser/chromeos/extensions/file_manager/private_api_util.h" 16 #include "chrome/browser/chromeos/extensions/file_manager/private_api_util.h"
17 #include "chrome/browser/extensions/extension_function_registry.h" 17 #include "chrome/browser/extensions/extension_function_registry.h"
18 18
19 namespace file_manager { 19 namespace file_manager {
20 20
21 FileBrowserPrivateAPI::FileBrowserPrivateAPI(Profile* profile) 21 FileBrowserPrivateAPI::FileBrowserPrivateAPI(Profile* profile)
22 : event_router_(new EventRouter(profile)) { 22 : event_router_(new EventRouter(profile)) {
23 ExtensionFunctionRegistry* registry = 23 ExtensionFunctionRegistry* registry =
24 ExtensionFunctionRegistry::GetInstance(); 24 ExtensionFunctionRegistry::GetInstance();
25 // Tasks related functions. 25 // Tasks related functions.
26 registry->RegisterFunction<extensions::ExecuteTaskFunction>(); 26 registry->RegisterFunction<
27 registry->RegisterFunction<extensions::GetFileTasksFunction>(); 27 extensions::FileBrowserPrivateExecuteTaskFunction>();
28 registry->RegisterFunction<extensions::SetDefaultTaskFunction>(); 28 registry->RegisterFunction<
29 extensions::FileBrowserPrivateGetFileTasksFunction>();
30 registry->RegisterFunction<
31 extensions::FileBrowserPrivateSetDefaultTaskFunction>();
29 32
30 // Drive related functions. 33 // Drive related functions.
31 registry->RegisterFunction<extensions::GetDriveEntryPropertiesFunction>(); 34 registry->RegisterFunction<
32 registry->RegisterFunction<extensions::PinDriveFileFunction>(); 35 extensions::FileBrowserPrivateGetDriveEntryPropertiesFunction>();
33 registry->RegisterFunction<extensions::GetDriveFilesFunction>(); 36 registry->RegisterFunction<
34 registry->RegisterFunction<extensions::CancelFileTransfersFunction>(); 37 extensions::FileBrowserPrivatePinDriveFileFunction>();
35 registry->RegisterFunction<extensions::SearchDriveFunction>(); 38 registry->RegisterFunction<
36 registry->RegisterFunction<extensions::SearchDriveMetadataFunction>(); 39 extensions::FileBrowserPrivateGetDriveFilesFunction>();
37 registry->RegisterFunction<extensions::ClearDriveCacheFunction>(); 40 registry->RegisterFunction<
38 registry->RegisterFunction<extensions::GetDriveConnectionStateFunction>(); 41 extensions::FileBrowserPrivateCancelFileTransfersFunction>();
39 registry->RegisterFunction<extensions::RequestAccessTokenFunction>(); 42 registry->RegisterFunction<
40 registry->RegisterFunction<extensions::GetShareUrlFunction>(); 43 extensions::FileBrowserPrivateSearchDriveFunction>();
44 registry->RegisterFunction<
45 extensions::FileBrowserPrivateSearchDriveMetadataFunction>();
46 registry->RegisterFunction<
47 extensions::FileBrowserPrivateClearDriveCacheFunction>();
48 registry->RegisterFunction<
49 extensions::FileBrowserPrivateGetDriveConnectionStateFunction>();
50 registry->RegisterFunction<
51 extensions::FileBrowserPrivateRequestAccessTokenFunction>();
52 registry->RegisterFunction<
53 extensions::FileBrowserPrivateGetShareUrlFunction>();
41 54
42 // Select file dialog related functions. 55 // Select file dialog related functions.
43 registry->RegisterFunction<extensions::CancelFileDialogFunction>(); 56 registry->RegisterFunction<
44 registry->RegisterFunction<extensions::SelectFileFunction>(); 57 extensions::FileBrowserPrivateCancelDialogFunction>();
45 registry->RegisterFunction<extensions::SelectFilesFunction>(); 58 registry->RegisterFunction<
59 extensions::FileBrowserPrivateSelectFileFunction>();
60 registry->RegisterFunction<
61 extensions::FileBrowserPrivateSelectFilesFunction>();
46 62
47 // Mount points related functions. 63 // Mount points related functions.
48 registry->RegisterFunction<extensions::AddMountFunction>(); 64 registry->RegisterFunction<extensions::FileBrowserPrivateAddMountFunction>();
49 registry->RegisterFunction<extensions::RemoveMountFunction>(); 65 registry->RegisterFunction<
50 registry->RegisterFunction<extensions::GetMountPointsFunction>(); 66 extensions::FileBrowserPrivateRemoveMountFunction>();
67 registry->RegisterFunction<
68 extensions::FileBrowserPrivateGetMountPointsFunction>();
51 69
52 // Hundreds of strings for the file manager. 70 // Hundreds of strings for the file manager.
53 registry->RegisterFunction<extensions::GetStringsFunction>(); 71 registry->RegisterFunction<
72 extensions::FileBrowserPrivateGetStringsFunction>();
54 73
55 // File system related functions. 74 // File system related functions.
56 registry->RegisterFunction<extensions::RequestFileSystemFunction>(); 75 registry->RegisterFunction<
57 registry->RegisterFunction<extensions::AddFileWatchFunction>(); 76 extensions::FileBrowserPrivateRequestFileSystemFunction>();
58 registry->RegisterFunction<extensions::RemoveFileWatchFunction>(); 77 registry->RegisterFunction<
59 registry->RegisterFunction<extensions::SetLastModifiedFunction>(); 78 extensions::FileBrowserPrivateAddFileWatchFunction>();
60 registry->RegisterFunction<extensions::GetSizeStatsFunction>(); 79 registry->RegisterFunction<
61 registry->RegisterFunction<extensions::GetVolumeMetadataFunction>(); 80 extensions::FileBrowserPrivateRemoveFileWatchFunction>();
62 registry->RegisterFunction<extensions::ValidatePathNameLengthFunction>(); 81 registry->RegisterFunction<
63 registry->RegisterFunction<extensions::FormatDeviceFunction>(); 82 extensions::FileBrowserPrivateSetLastModifiedFunction>();
83 registry->RegisterFunction<
84 extensions::FileBrowserPrivateGetSizeStatsFunction>();
85 registry->RegisterFunction<
86 extensions::FileBrowserPrivateGetVolumeMetadataFunction>();
87 registry->RegisterFunction<
88 extensions::FileBrowserPrivateValidatePathNameLengthFunction>();
89 registry->RegisterFunction<
90 extensions::FileBrowserPrivateFormatDeviceFunction>();
64 91
65 // Miscellaneous functions. 92 // Miscellaneous functions.
66 registry->RegisterFunction<extensions::LogoutUserFunction>(); 93 registry->RegisterFunction<
67 registry->RegisterFunction<extensions::GetPreferencesFunction>(); 94 extensions::FileBrowserPrivateLogoutUserFunction>();
68 registry->RegisterFunction<extensions::SetPreferencesFunction>(); 95 registry->RegisterFunction<
69 registry->RegisterFunction<extensions::ZipSelectionFunction>(); 96 extensions::FileBrowserPrivateGetPreferencesFunction>();
70 registry->RegisterFunction<extensions::ZoomFunction>(); 97 registry->RegisterFunction<
98 extensions::FileBrowserPrivateSetPreferencesFunction>();
99 registry->RegisterFunction<
100 extensions::FileBrowserPrivateZipSelectionFunction>();
101 registry->RegisterFunction<extensions::FileBrowserPrivateZoomFunction>();
71 event_router_->ObserveFileSystemEvents(); 102 event_router_->ObserveFileSystemEvents();
72 } 103 }
73 104
74 FileBrowserPrivateAPI::~FileBrowserPrivateAPI() { 105 FileBrowserPrivateAPI::~FileBrowserPrivateAPI() {
75 } 106 }
76 107
77 void FileBrowserPrivateAPI::Shutdown() { 108 void FileBrowserPrivateAPI::Shutdown() {
78 event_router_->Shutdown(); 109 event_router_->Shutdown();
79 } 110 }
80 111
81 // static 112 // static
82 FileBrowserPrivateAPI* FileBrowserPrivateAPI::Get(Profile* profile) { 113 FileBrowserPrivateAPI* FileBrowserPrivateAPI::Get(Profile* profile) {
83 return FileBrowserPrivateAPIFactory::GetForProfile(profile); 114 return FileBrowserPrivateAPIFactory::GetForProfile(profile);
84 } 115 }
85 116
86 } // namespace file_manager 117 } // namespace file_manager
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/chromeos/extensions/file_manager/private_api_dialog.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698