| OLD | NEW |
| 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 miscellaneous API functions, which don't belong to | 5 // This file provides miscellaneous API functions, which don't belong to |
| 6 // other files. | 6 // other files. |
| 7 | 7 |
| 8 #ifndef CHROME_BROWSER_CHROMEOS_EXTENSIONS_FILE_MANAGER_PRIVATE_API_MISC_H_ | 8 #ifndef CHROME_BROWSER_CHROMEOS_EXTENSIONS_FILE_MANAGER_PRIVATE_API_MISC_H_ |
| 9 #define CHROME_BROWSER_CHROMEOS_EXTENSIONS_FILE_MANAGER_PRIVATE_API_MISC_H_ | 9 #define CHROME_BROWSER_CHROMEOS_EXTENSIONS_FILE_MANAGER_PRIVATE_API_MISC_H_ |
| 10 | 10 |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 69 public: | 69 public: |
| 70 DECLARE_EXTENSION_FUNCTION("fileBrowserPrivate.zipSelection", | 70 DECLARE_EXTENSION_FUNCTION("fileBrowserPrivate.zipSelection", |
| 71 FILEBROWSERPRIVATE_ZIPSELECTION) | 71 FILEBROWSERPRIVATE_ZIPSELECTION) |
| 72 | 72 |
| 73 FileBrowserPrivateZipSelectionFunction(); | 73 FileBrowserPrivateZipSelectionFunction(); |
| 74 | 74 |
| 75 protected: | 75 protected: |
| 76 virtual ~FileBrowserPrivateZipSelectionFunction(); | 76 virtual ~FileBrowserPrivateZipSelectionFunction(); |
| 77 | 77 |
| 78 // AsyncExtensionFunction overrides. | 78 // AsyncExtensionFunction overrides. |
| 79 virtual bool RunImpl() OVERRIDE; | 79 virtual bool RunAsync() OVERRIDE; |
| 80 | 80 |
| 81 // extensions::ZipFileCreator::Delegate overrides. | 81 // extensions::ZipFileCreator::Delegate overrides. |
| 82 virtual void OnZipDone(bool success) OVERRIDE; | 82 virtual void OnZipDone(bool success) OVERRIDE; |
| 83 | 83 |
| 84 private: | 84 private: |
| 85 scoped_refptr<file_manager::ZipFileCreator> zip_file_creator_; | 85 scoped_refptr<file_manager::ZipFileCreator> zip_file_creator_; |
| 86 }; | 86 }; |
| 87 | 87 |
| 88 // Implements the chrome.fileBrowserPrivate.zoom method. | 88 // Implements the chrome.fileBrowserPrivate.zoom method. |
| 89 // Changes the zoom level of the file manager by internally calling | 89 // Changes the zoom level of the file manager by internally calling |
| (...skipping 15 matching lines...) Expand all Loading... |
| 105 class FileBrowserPrivateInstallWebstoreItemFunction | 105 class FileBrowserPrivateInstallWebstoreItemFunction |
| 106 : public LoggedAsyncExtensionFunction { | 106 : public LoggedAsyncExtensionFunction { |
| 107 public: | 107 public: |
| 108 DECLARE_EXTENSION_FUNCTION("fileBrowserPrivate.installWebstoreItem", | 108 DECLARE_EXTENSION_FUNCTION("fileBrowserPrivate.installWebstoreItem", |
| 109 FILEBROWSERPRIVATE_INSTALLWEBSTOREITEM); | 109 FILEBROWSERPRIVATE_INSTALLWEBSTOREITEM); |
| 110 | 110 |
| 111 protected: | 111 protected: |
| 112 virtual ~FileBrowserPrivateInstallWebstoreItemFunction() {} | 112 virtual ~FileBrowserPrivateInstallWebstoreItemFunction() {} |
| 113 | 113 |
| 114 // AsyncExtensionFunction overrides. | 114 // AsyncExtensionFunction overrides. |
| 115 virtual bool RunImpl() OVERRIDE; | 115 virtual bool RunAsync() OVERRIDE; |
| 116 void OnInstallComplete(bool success, const std::string& error); | 116 void OnInstallComplete(bool success, const std::string& error); |
| 117 | 117 |
| 118 private: | 118 private: |
| 119 std::string webstore_item_id_; | 119 std::string webstore_item_id_; |
| 120 }; | 120 }; |
| 121 | 121 |
| 122 class FileBrowserPrivateRequestWebStoreAccessTokenFunction | 122 class FileBrowserPrivateRequestWebStoreAccessTokenFunction |
| 123 : public LoggedAsyncExtensionFunction { | 123 : public LoggedAsyncExtensionFunction { |
| 124 public: | 124 public: |
| 125 DECLARE_EXTENSION_FUNCTION("fileBrowserPrivate.requestWebStoreAccessToken", | 125 DECLARE_EXTENSION_FUNCTION("fileBrowserPrivate.requestWebStoreAccessToken", |
| 126 FILEBROWSERPRIVATE_REQUESTWEBSTOREACCESSTOKEN); | 126 FILEBROWSERPRIVATE_REQUESTWEBSTOREACCESSTOKEN); |
| 127 | 127 |
| 128 FileBrowserPrivateRequestWebStoreAccessTokenFunction(); | 128 FileBrowserPrivateRequestWebStoreAccessTokenFunction(); |
| 129 | 129 |
| 130 protected: | 130 protected: |
| 131 virtual ~FileBrowserPrivateRequestWebStoreAccessTokenFunction(); | 131 virtual ~FileBrowserPrivateRequestWebStoreAccessTokenFunction(); |
| 132 virtual bool RunImpl() OVERRIDE; | 132 virtual bool RunAsync() OVERRIDE; |
| 133 | 133 |
| 134 private: | 134 private: |
| 135 scoped_ptr<google_apis::AuthServiceInterface> auth_service_; | 135 scoped_ptr<google_apis::AuthServiceInterface> auth_service_; |
| 136 | 136 |
| 137 void OnAccessTokenFetched(google_apis::GDataErrorCode code, | 137 void OnAccessTokenFetched(google_apis::GDataErrorCode code, |
| 138 const std::string& access_token); | 138 const std::string& access_token); |
| 139 | 139 |
| 140 }; | 140 }; |
| 141 | 141 |
| 142 class FileBrowserPrivateGetProfilesFunction | 142 class FileBrowserPrivateGetProfilesFunction |
| (...skipping 18 matching lines...) Expand all Loading... |
| 161 protected: | 161 protected: |
| 162 virtual ~FileBrowserPrivateVisitDesktopFunction() {} | 162 virtual ~FileBrowserPrivateVisitDesktopFunction() {} |
| 163 | 163 |
| 164 // AsyncExtensionFunction overrides. | 164 // AsyncExtensionFunction overrides. |
| 165 virtual bool RunSync() OVERRIDE; | 165 virtual bool RunSync() OVERRIDE; |
| 166 }; | 166 }; |
| 167 | 167 |
| 168 } // namespace extensions | 168 } // namespace extensions |
| 169 | 169 |
| 170 #endif // CHROME_BROWSER_CHROMEOS_EXTENSIONS_FILE_MANAGER_PRIVATE_API_MISC_H_ | 170 #endif // CHROME_BROWSER_CHROMEOS_EXTENSIONS_FILE_MANAGER_PRIVATE_API_MISC_H_ |
| OLD | NEW |