| OLD | NEW |
| 1 // Copyright (c) 2011 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_EXTENSION_FILE_BROWSER_PRIVATE_API_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_FILE_BROWSER_PRIVATE_API_H_ |
| 6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_FILE_BROWSER_PRIVATE_API_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_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> |
| 11 #include <vector> | 11 #include <vector> |
| 12 | 12 |
| 13 #include "base/platform_file.h" | 13 #include "base/platform_file.h" |
| 14 #include "chrome/browser/extensions/extension_function.h" | 14 #include "chrome/browser/extensions/extension_function.h" |
| 15 #include "googleurl/src/url_util.h" | 15 #include "googleurl/src/url_util.h" |
| 16 #include "webkit/fileapi/file_system_callback_dispatcher.h" | 16 #include "webkit/fileapi/file_system_callback_dispatcher.h" |
| 17 | 17 |
| 18 #ifdef OS_CHROMEOS | |
| 19 #include "chrome/browser/chromeos/disks/disk_mount_manager.h" | |
| 20 #endif | |
| 21 | |
| 22 class GURL; | 18 class GURL; |
| 23 | 19 |
| 24 // Implements the chrome.fileBrowserPrivate.requestLocalFileSystem method. | 20 // Implements the chrome.fileBrowserPrivate.requestLocalFileSystem method. |
| 25 class RequestLocalFileSystemFunction : public AsyncExtensionFunction { | 21 class RequestLocalFileSystemFunction : public AsyncExtensionFunction { |
| 26 protected: | 22 protected: |
| 27 // AsyncExtensionFunction overrides. | 23 // AsyncExtensionFunction overrides. |
| 28 virtual bool RunImpl() OVERRIDE; | 24 virtual bool RunImpl() OVERRIDE; |
| 29 | 25 |
| 30 private: | 26 private: |
| 31 class LocalFileSystemCallbackDispatcher; | 27 class LocalFileSystemCallbackDispatcher; |
| (...skipping 299 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 331 : public SyncExtensionFunction { | 327 : public SyncExtensionFunction { |
| 332 public: | 328 public: |
| 333 GetVolumeMetadataFunction(); | 329 GetVolumeMetadataFunction(); |
| 334 | 330 |
| 335 protected: | 331 protected: |
| 336 virtual ~GetVolumeMetadataFunction(); | 332 virtual ~GetVolumeMetadataFunction(); |
| 337 | 333 |
| 338 virtual bool RunImpl() OVERRIDE; | 334 virtual bool RunImpl() OVERRIDE; |
| 339 | 335 |
| 340 private: | 336 private: |
| 341 #if defined(OS_CHROMEOS) | |
| 342 std::string DeviceTypeToString(chromeos::DeviceType type); | |
| 343 #endif | |
| 344 | |
| 345 DECLARE_EXTENSION_FUNCTION_NAME("fileBrowserPrivate.getVolumeMetadata"); | 337 DECLARE_EXTENSION_FUNCTION_NAME("fileBrowserPrivate.getVolumeMetadata"); |
| 346 }; | 338 }; |
| 347 | 339 |
| 348 // File Dialog Strings. | 340 // File Dialog Strings. |
| 349 class FileDialogStringsFunction : public SyncExtensionFunction { | 341 class FileDialogStringsFunction : public SyncExtensionFunction { |
| 350 public: | 342 public: |
| 351 FileDialogStringsFunction() {} | 343 FileDialogStringsFunction() {} |
| 352 | 344 |
| 353 protected: | 345 protected: |
| 354 virtual ~FileDialogStringsFunction() {} | 346 virtual ~FileDialogStringsFunction() {} |
| 355 | 347 |
| 356 // SyncExtensionFunction overrides. | 348 // SyncExtensionFunction overrides. |
| 357 virtual bool RunImpl() OVERRIDE; | 349 virtual bool RunImpl() OVERRIDE; |
| 358 | 350 |
| 359 private: | 351 private: |
| 360 DECLARE_EXTENSION_FUNCTION_NAME("fileBrowserPrivate.getStrings"); | 352 DECLARE_EXTENSION_FUNCTION_NAME("fileBrowserPrivate.getStrings"); |
| 361 }; | 353 }; |
| 362 | 354 |
| 363 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_FILE_BROWSER_PRIVATE_API_H_ | 355 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_FILE_BROWSER_PRIVATE_API_H_ |
| OLD | NEW |