OLD | NEW |
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 #ifndef CHROME_BROWSER_CHROMEOS_EXTENSIONS_FILE_BROWSER_PRIVATE_API_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_EXTENSIONS_FILE_BROWSER_PRIVATE_API_H_ |
6 #define CHROME_BROWSER_CHROMEOS_EXTENSIONS_FILE_BROWSER_PRIVATE_API_H_ | 6 #define CHROME_BROWSER_CHROMEOS_EXTENSIONS_FILE_BROWSER_PRIVATE_API_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <map> | 9 #include <map> |
10 #include <string> | 10 #include <string> |
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
239 private: | 239 private: |
240 // Sends gdata mount event to renderers. | 240 // Sends gdata mount event to renderers. |
241 void RaiseGDataMountEvent(gdata::GDataErrorCode error); | 241 void RaiseGDataMountEvent(gdata::GDataErrorCode error); |
242 // A callback method to handle the result of GData authentication request. | 242 // A callback method to handle the result of GData authentication request. |
243 void OnGDataAuthentication(gdata::GDataErrorCode error, | 243 void OnGDataAuthentication(gdata::GDataErrorCode error, |
244 const std::string& token); | 244 const std::string& token); |
245 // A callback method to handle the result of | 245 // A callback method to handle the result of |
246 // GetLocalPathsOnFileThreadAndRunCallbackOnUIThread. | 246 // GetLocalPathsOnFileThreadAndRunCallbackOnUIThread. |
247 void GetLocalPathsResponseOnUIThread(const std::string& mount_type_str, | 247 void GetLocalPathsResponseOnUIThread(const std::string& mount_type_str, |
248 const SelectedFileInfoList& files); | 248 const SelectedFileInfoList& files); |
| 249 // A callback method to handle the result of SetMountedState. |
| 250 void OnMountedStateSet(const std::string& mount_type, |
| 251 const FilePath::StringType& file_name, |
| 252 base::PlatformFileError error, |
| 253 const FilePath& file_path); |
249 | 254 |
250 DECLARE_EXTENSION_FUNCTION_NAME("fileBrowserPrivate.addMount"); | 255 DECLARE_EXTENSION_FUNCTION_NAME("fileBrowserPrivate.addMount"); |
251 }; | 256 }; |
252 | 257 |
253 // Unmounts selected device. Expects mount point path as an argument. | 258 // Unmounts selected device. Expects mount point path as an argument. |
254 class RemoveMountFunction | 259 class RemoveMountFunction |
255 : public FileBrowserFunction { | 260 : public FileBrowserFunction { |
256 public: | 261 public: |
257 RemoveMountFunction(); | 262 RemoveMountFunction(); |
258 | 263 |
259 protected: | 264 protected: |
260 virtual ~RemoveMountFunction(); | 265 virtual ~RemoveMountFunction(); |
261 | 266 |
262 // AsyncExtensionFunction overrides. | 267 // AsyncExtensionFunction overrides. |
263 virtual bool RunImpl() OVERRIDE; | 268 virtual bool RunImpl() OVERRIDE; |
264 | 269 |
265 private: | 270 private: |
266 // A callback method to handle the result of | 271 // A callback method to handle the result of |
267 // GetLocalPathsOnFileThreadAndRunCallbackOnUIThread. | 272 // GetLocalPathsOnFileThreadAndRunCallbackOnUIThread. |
268 void GetLocalPathsResponseOnUIThread(const SelectedFileInfoList& files); | 273 void GetLocalPathsResponseOnUIThread(const SelectedFileInfoList& files); |
269 | 274 |
| 275 // A callback method to handle the result of SetMountedState. |
| 276 void OnMountedStateSet(base::PlatformFileError error, |
| 277 const FilePath& file_path); |
| 278 |
270 DECLARE_EXTENSION_FUNCTION_NAME("fileBrowserPrivate.removeMount"); | 279 DECLARE_EXTENSION_FUNCTION_NAME("fileBrowserPrivate.removeMount"); |
271 }; | 280 }; |
272 | 281 |
273 class GetMountPointsFunction | 282 class GetMountPointsFunction |
274 : public AsyncExtensionFunction { | 283 : public AsyncExtensionFunction { |
275 public: | 284 public: |
276 GetMountPointsFunction(); | 285 GetMountPointsFunction(); |
277 | 286 |
278 protected: | 287 protected: |
279 virtual ~GetMountPointsFunction(); | 288 virtual ~GetMountPointsFunction(); |
(...skipping 300 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
580 | 589 |
581 // Write setting value. | 590 // Write setting value. |
582 class SetGDataPreferencesFunction : public SyncExtensionFunction { | 591 class SetGDataPreferencesFunction : public SyncExtensionFunction { |
583 protected: | 592 protected: |
584 virtual bool RunImpl() OVERRIDE; | 593 virtual bool RunImpl() OVERRIDE; |
585 private: | 594 private: |
586 DECLARE_EXTENSION_FUNCTION_NAME("fileBrowserPrivate.setGDataPreferences"); | 595 DECLARE_EXTENSION_FUNCTION_NAME("fileBrowserPrivate.setGDataPreferences"); |
587 }; | 596 }; |
588 | 597 |
589 #endif // CHROME_BROWSER_CHROMEOS_EXTENSIONS_FILE_BROWSER_PRIVATE_API_H_ | 598 #endif // CHROME_BROWSER_CHROMEOS_EXTENSIONS_FILE_BROWSER_PRIVATE_API_H_ |
OLD | NEW |