Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(233)

Side by Side Diff: chrome/browser/extensions/api/webstore_private/webstore_private_api.h

Issue 10911158: Pass on download or installation errors from WebstoreInstaller to the CompleteInstall function. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase and rename error204->empty Created 8 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/extensions/api/webstore_private/webstore_private_api.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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_WEBSTORE_PRIVATE_WEBSTORE_PRIVATE_API_H_ 5 #ifndef CHROME_BROWSER_EXTENSIONS_API_WEBSTORE_PRIVATE_WEBSTORE_PRIVATE_API_H_
6 #define CHROME_BROWSER_EXTENSIONS_API_WEBSTORE_PRIVATE_WEBSTORE_PRIVATE_API_H_ 6 #define CHROME_BROWSER_EXTENSIONS_API_WEBSTORE_PRIVATE_WEBSTORE_PRIVATE_API_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "chrome/browser/extensions/bundle_installer.h" 10 #include "chrome/browser/extensions/bundle_installer.h"
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 SkBitmap icon_; 142 SkBitmap icon_;
143 143
144 // A dummy Extension object we create for the purposes of using 144 // A dummy Extension object we create for the purposes of using
145 // ExtensionInstallPrompt to prompt for confirmation of the install. 145 // ExtensionInstallPrompt to prompt for confirmation of the install.
146 scoped_refptr<extensions::Extension> dummy_extension_; 146 scoped_refptr<extensions::Extension> dummy_extension_;
147 147
148 // The class that displays the install prompt. 148 // The class that displays the install prompt.
149 scoped_ptr<ExtensionInstallPrompt> install_prompt_; 149 scoped_ptr<ExtensionInstallPrompt> install_prompt_;
150 }; 150 };
151 151
152 class CompleteInstallFunction : public SyncExtensionFunction { 152 class CompleteInstallFunction
153 : public AsyncExtensionFunction,
154 public WebstoreInstaller::Delegate {
153 public: 155 public:
154 DECLARE_EXTENSION_FUNCTION_NAME("webstorePrivate.completeInstall"); 156 DECLARE_EXTENSION_FUNCTION_NAME("webstorePrivate.completeInstall");
155 157
158 // WebstoreInstaller::Delegate:
159 virtual void OnExtensionInstallSuccess(const std::string& id) OVERRIDE;
160 virtual void OnExtensionInstallFailure(const std::string& id,
161 const std::string& error) OVERRIDE;
156 protected: 162 protected:
157 virtual ~CompleteInstallFunction() {} 163 virtual ~CompleteInstallFunction() {}
158 164
159 // ExtensionFunction: 165 // ExtensionFunction:
160 virtual bool RunImpl() OVERRIDE; 166 virtual bool RunImpl() OVERRIDE;
161 }; 167 };
162 168
163 class GetBrowserLoginFunction : public SyncExtensionFunction { 169 class GetBrowserLoginFunction : public SyncExtensionFunction {
164 public: 170 public:
165 DECLARE_EXTENSION_FUNCTION_NAME("webstorePrivate.getBrowserLogin"); 171 DECLARE_EXTENSION_FUNCTION_NAME("webstorePrivate.getBrowserLogin");
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
209 215
210 private: 216 private:
211 void CreateResult(bool webgl_allowed); 217 void CreateResult(bool webgl_allowed);
212 218
213 scoped_refptr<GPUFeatureChecker> feature_checker_; 219 scoped_refptr<GPUFeatureChecker> feature_checker_;
214 }; 220 };
215 221
216 } // namespace extensions 222 } // namespace extensions
217 223
218 #endif // CHROME_BROWSER_EXTENSIONS_API_WEBSTORE_PRIVATE_WEBSTORE_PRIVATE_API_H _ 224 #endif // CHROME_BROWSER_EXTENSIONS_API_WEBSTORE_PRIVATE_WEBSTORE_PRIVATE_API_H _
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/extensions/api/webstore_private/webstore_private_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698