| 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 |
| 11 #include "chrome/browser/chromeos/extensions/file_manager/private_api_base.h" | 11 #include "chrome/browser/chromeos/extensions/file_manager/private_api_base.h" |
| 12 #include "chrome/common/extensions/webstore_install_result.h" |
| 12 #include "google_apis/drive/gdata_errorcode.h" | 13 #include "google_apis/drive/gdata_errorcode.h" |
| 13 | 14 |
| 14 namespace google_apis { | 15 namespace google_apis { |
| 15 class AuthServiceInterface; | 16 class AuthServiceInterface; |
| 16 } | 17 } |
| 17 | 18 |
| 18 namespace extensions { | 19 namespace extensions { |
| 19 | 20 |
| 20 // Implements the chrome.fileBrowserPrivate.logoutUserForReauthentication | 21 // Implements the chrome.fileBrowserPrivate.logoutUserForReauthentication |
| 21 // method. | 22 // method. |
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 101 : public LoggedAsyncExtensionFunction { | 102 : public LoggedAsyncExtensionFunction { |
| 102 public: | 103 public: |
| 103 DECLARE_EXTENSION_FUNCTION("fileBrowserPrivate.installWebstoreItem", | 104 DECLARE_EXTENSION_FUNCTION("fileBrowserPrivate.installWebstoreItem", |
| 104 FILEBROWSERPRIVATE_INSTALLWEBSTOREITEM); | 105 FILEBROWSERPRIVATE_INSTALLWEBSTOREITEM); |
| 105 | 106 |
| 106 protected: | 107 protected: |
| 107 virtual ~FileBrowserPrivateInstallWebstoreItemFunction() {} | 108 virtual ~FileBrowserPrivateInstallWebstoreItemFunction() {} |
| 108 | 109 |
| 109 // AsyncExtensionFunction overrides. | 110 // AsyncExtensionFunction overrides. |
| 110 virtual bool RunAsync() OVERRIDE; | 111 virtual bool RunAsync() OVERRIDE; |
| 111 void OnInstallComplete(bool success, const std::string& error); | 112 void OnInstallComplete(bool success, |
| 113 const std::string& error, |
| 114 extensions::webstore_install::Result result); |
| 112 | 115 |
| 113 private: | 116 private: |
| 114 std::string webstore_item_id_; | 117 std::string webstore_item_id_; |
| 115 }; | 118 }; |
| 116 | 119 |
| 117 class FileBrowserPrivateRequestWebStoreAccessTokenFunction | 120 class FileBrowserPrivateRequestWebStoreAccessTokenFunction |
| 118 : public LoggedAsyncExtensionFunction { | 121 : public LoggedAsyncExtensionFunction { |
| 119 public: | 122 public: |
| 120 DECLARE_EXTENSION_FUNCTION("fileBrowserPrivate.requestWebStoreAccessToken", | 123 DECLARE_EXTENSION_FUNCTION("fileBrowserPrivate.requestWebStoreAccessToken", |
| 121 FILEBROWSERPRIVATE_REQUESTWEBSTOREACCESSTOKEN); | 124 FILEBROWSERPRIVATE_REQUESTWEBSTOREACCESSTOKEN); |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 169 | 172 |
| 170 protected: | 173 protected: |
| 171 virtual ~FileBrowserPrivateOpenInspectorFunction() {} | 174 virtual ~FileBrowserPrivateOpenInspectorFunction() {} |
| 172 | 175 |
| 173 virtual bool RunSync() OVERRIDE; | 176 virtual bool RunSync() OVERRIDE; |
| 174 }; | 177 }; |
| 175 | 178 |
| 176 } // namespace extensions | 179 } // namespace extensions |
| 177 | 180 |
| 178 #endif // CHROME_BROWSER_CHROMEOS_EXTENSIONS_FILE_MANAGER_PRIVATE_API_MISC_H_ | 181 #endif // CHROME_BROWSER_CHROMEOS_EXTENSIONS_FILE_MANAGER_PRIVATE_API_MISC_H_ |
| OLD | NEW |