| 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_EXTENSION_INSTALL_PROMPT_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_INSTALL_PROMPT_H_ |
| 6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_INSTALL_PROMPT_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_INSTALL_PROMPT_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| 11 | 11 |
| 12 #include "base/compiler_specific.h" | 12 #include "base/compiler_specific.h" |
| 13 #include "base/memory/scoped_ptr.h" | 13 #include "base/memory/scoped_ptr.h" |
| 14 #include "base/string16.h" | 14 #include "base/string16.h" |
| 15 #include "chrome/browser/extensions/crx_installer_error.h" |
| 15 #include "chrome/browser/extensions/image_loading_tracker.h" | 16 #include "chrome/browser/extensions/image_loading_tracker.h" |
| 16 #include "chrome/common/extensions/url_pattern.h" | 17 #include "chrome/common/extensions/url_pattern.h" |
| 17 #include "third_party/skia/include/core/SkBitmap.h" | 18 #include "third_party/skia/include/core/SkBitmap.h" |
| 18 #include "ui/gfx/image/image.h" | 19 #include "ui/gfx/image/image.h" |
| 19 #include "ui/gfx/image/image_skia.h" | 20 #include "ui/gfx/image/image_skia.h" |
| 20 #include "ui/gfx/native_widget_types.h" | 21 #include "ui/gfx/native_widget_types.h" |
| 21 | 22 |
| 22 class Browser; | 23 class Browser; |
| 23 class ExtensionInstallUI; | 24 class ExtensionInstallUI; |
| 24 class ExtensionPermissionSet; | 25 class ExtensionPermissionSet; |
| (...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 198 // We *MUST* eventually call either Proceed() or Abort() on |delegate|. | 199 // We *MUST* eventually call either Proceed() or Abort() on |delegate|. |
| 199 virtual void ConfirmPermissions(Delegate* delegate, | 200 virtual void ConfirmPermissions(Delegate* delegate, |
| 200 const extensions::Extension* extension, | 201 const extensions::Extension* extension, |
| 201 const ExtensionPermissionSet* permissions); | 202 const ExtensionPermissionSet* permissions); |
| 202 | 203 |
| 203 // Installation was successful. This is declared virtual for testing. | 204 // Installation was successful. This is declared virtual for testing. |
| 204 virtual void OnInstallSuccess(const extensions::Extension* extension, | 205 virtual void OnInstallSuccess(const extensions::Extension* extension, |
| 205 SkBitmap* icon); | 206 SkBitmap* icon); |
| 206 | 207 |
| 207 // Installation failed. This is declared virtual for testing. | 208 // Installation failed. This is declared virtual for testing. |
| 208 virtual void OnInstallFailure(const string16& error); | 209 virtual void OnInstallFailure(const CrxInstallerError& error); |
| 209 | 210 |
| 210 // ImageLoadingTracker::Observer: | 211 // ImageLoadingTracker::Observer: |
| 211 virtual void OnImageLoaded(const gfx::Image& image, | 212 virtual void OnImageLoaded(const gfx::Image& image, |
| 212 const std::string& extension_id, | 213 const std::string& extension_id, |
| 213 int index) OVERRIDE; | 214 int index) OVERRIDE; |
| 214 | 215 |
| 215 protected: | 216 protected: |
| 216 friend class extensions::ExtensionWebstorePrivateApiTest; | 217 friend class extensions::ExtensionWebstorePrivateApiTest; |
| 217 friend class WebstoreInlineInstallUnpackFailureTest; | 218 friend class WebstoreInlineInstallUnpackFailureTest; |
| 218 | 219 |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 257 | 258 |
| 258 // The type of prompt we are going to show. | 259 // The type of prompt we are going to show. |
| 259 PromptType prompt_type_; | 260 PromptType prompt_type_; |
| 260 | 261 |
| 261 // Keeps track of extension images being loaded on the File thread for the | 262 // Keeps track of extension images being loaded on the File thread for the |
| 262 // purpose of showing the install UI. | 263 // purpose of showing the install UI. |
| 263 ImageLoadingTracker tracker_; | 264 ImageLoadingTracker tracker_; |
| 264 }; | 265 }; |
| 265 | 266 |
| 266 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_INSTALL_PROMPT_H_ | 267 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_INSTALL_PROMPT_H_ |
| OLD | NEW |