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_EXTENSIONS_API_DEVELOPER_PRIVATE_DEVELOPER_PRIVATE_API_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_API_DEVELOPER_PRIVATE_DEVELOPER_PRIVATE_API_H_ |
6 #define CHROME_BROWSER_EXTENSIONS_API_DEVELOPER_PRIVATE_DEVELOPER_PRIVATE_API_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_API_DEVELOPER_PRIVATE_DEVELOPER_PRIVATE_API_H_ |
7 | 7 |
8 #include "base/platform_file.h" | 8 #include "base/platform_file.h" |
9 #include "chrome/browser/extensions/api/developer_private/entry_picker.h" | 9 #include "chrome/browser/extensions/api/developer_private/entry_picker.h" |
10 #include "chrome/browser/extensions/api/file_system/file_system_api.h" | 10 #include "chrome/browser/extensions/api/file_system/file_system_api.h" |
(...skipping 365 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
376 DECLARE_EXTENSION_FUNCTION("developerPrivate.loadProjectToSyncfs", | 376 DECLARE_EXTENSION_FUNCTION("developerPrivate.loadProjectToSyncfs", |
377 DEVELOPERPRIVATE_LOADPROJECTTOSYNCFS); | 377 DEVELOPERPRIVATE_LOADPROJECTTOSYNCFS); |
378 | 378 |
379 DeveloperPrivateLoadProjectToSyncfsFunction(); | 379 DeveloperPrivateLoadProjectToSyncfsFunction(); |
380 | 380 |
381 protected: | 381 protected: |
382 virtual ~DeveloperPrivateLoadProjectToSyncfsFunction(); | 382 virtual ~DeveloperPrivateLoadProjectToSyncfsFunction(); |
383 | 383 |
384 // ExtensionFunction | 384 // ExtensionFunction |
385 virtual bool RunImpl() OVERRIDE; | 385 virtual bool RunImpl() OVERRIDE; |
| 386 |
| 387 void CopyFolder(const base::FilePath::StringType& project_name); |
| 388 |
| 389 void CopyFiles(const std::vector<base::FilePath>& paths); |
| 390 |
| 391 void CopyFilesCallback(const base::PlatformFileError result); |
| 392 |
| 393 private: |
| 394 // Number of pending copy files callbacks. |
| 395 // It should only be modified on the IO Thread. |
| 396 int pendingCallbacksCount_; |
| 397 |
| 398 // True only when all the copyFiles job are successful. |
| 399 // It should only be modified on the IO thread. |
| 400 bool success_; |
| 401 |
| 402 scoped_refptr<fileapi::FileSystemContext> context_; |
386 }; | 403 }; |
387 | 404 |
388 class DeveloperPrivateGetProjectsInfoFunction : public AsyncExtensionFunction { | 405 class DeveloperPrivateGetProjectsInfoFunction : public AsyncExtensionFunction { |
389 public: | 406 public: |
390 DECLARE_EXTENSION_FUNCTION("developerPrivate.getProjectsInfo", | 407 DECLARE_EXTENSION_FUNCTION("developerPrivate.getProjectsInfo", |
391 DEVELOPERPRIVATE_GETPROJECTSINFO); | 408 DEVELOPERPRIVATE_GETPROJECTSINFO); |
392 | 409 |
393 DeveloperPrivateGetProjectsInfoFunction(); | 410 DeveloperPrivateGetProjectsInfoFunction(); |
394 | 411 |
395 protected: | 412 protected: |
(...skipping 12 matching lines...) Expand all Loading... |
408 | 425 |
409 DeveloperPrivateLoadProjectFunction(); | 426 DeveloperPrivateLoadProjectFunction(); |
410 | 427 |
411 protected: | 428 protected: |
412 virtual ~DeveloperPrivateLoadProjectFunction(); | 429 virtual ~DeveloperPrivateLoadProjectFunction(); |
413 | 430 |
414 // ExtensionFunction | 431 // ExtensionFunction |
415 virtual bool RunImpl() OVERRIDE; | 432 virtual bool RunImpl() OVERRIDE; |
416 }; | 433 }; |
417 | 434 |
418 | |
419 | |
420 } // namespace api | 435 } // namespace api |
421 | 436 |
422 } // namespace extensions | 437 } // namespace extensions |
423 | 438 |
424 #endif // CHROME_BROWSER_EXTENSIONS_API_DEVELOPER_PRIVATE_DEVELOPER_PRIVATE_API
_H_ | 439 #endif // CHROME_BROWSER_EXTENSIONS_API_DEVELOPER_PRIVATE_DEVELOPER_PRIVATE_API
_H_ |
OLD | NEW |