| 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_UI_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_INSTALL_UI_H_ |
| 6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_INSTALL_UI_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_INSTALL_UI_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 13 matching lines...) Expand all Loading... |
| 24 class InfoBarDelegate; | 24 class InfoBarDelegate; |
| 25 class TabContentsWrapper; | 25 class TabContentsWrapper; |
| 26 | 26 |
| 27 namespace base { | 27 namespace base { |
| 28 class DictionaryValue; | 28 class DictionaryValue; |
| 29 } | 29 } |
| 30 | 30 |
| 31 namespace extensions { | 31 namespace extensions { |
| 32 class BundleInstaller; | 32 class BundleInstaller; |
| 33 class Extension; | 33 class Extension; |
| 34 class ExtensionNoConfirmWebstorePrivateApiTest; | 34 class ExtensionWebstorePrivateApiTest; |
| 35 } // namespace extensions | 35 } // namespace extensions |
| 36 | 36 |
| 37 // Displays all the UI around extension installation. | 37 // Displays all the UI around extension installation. |
| 38 class ExtensionInstallUI : public ImageLoadingTracker::Observer { | 38 class ExtensionInstallUI : public ImageLoadingTracker::Observer { |
| 39 public: | 39 public: |
| 40 enum PromptType { | 40 enum PromptType { |
| 41 UNSET_PROMPT_TYPE = -1, | 41 UNSET_PROMPT_TYPE = -1, |
| 42 INSTALL_PROMPT = 0, | 42 INSTALL_PROMPT = 0, |
| 43 INLINE_INSTALL_PROMPT, | 43 INLINE_INSTALL_PROMPT, |
| 44 BUNDLE_INSTALL_PROMPT, | 44 BUNDLE_INSTALL_PROMPT, |
| (...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 219 | 219 |
| 220 // ImageLoadingTracker::Observer: | 220 // ImageLoadingTracker::Observer: |
| 221 virtual void OnImageLoaded(const gfx::Image& image, | 221 virtual void OnImageLoaded(const gfx::Image& image, |
| 222 const std::string& extension_id, | 222 const std::string& extension_id, |
| 223 int index) OVERRIDE; | 223 int index) OVERRIDE; |
| 224 | 224 |
| 225 // Opens apps UI and animates the app icon for the app with id |app_id|. | 225 // Opens apps UI and animates the app icon for the app with id |app_id|. |
| 226 static void OpenAppInstalledUI(Browser* browser, const std::string& app_id); | 226 static void OpenAppInstalledUI(Browser* browser, const std::string& app_id); |
| 227 | 227 |
| 228 protected: | 228 protected: |
| 229 friend class extensions::ExtensionNoConfirmWebstorePrivateApiTest; | 229 friend class extensions::ExtensionWebstorePrivateApiTest; |
| 230 friend class WebstoreInlineInstallUnpackFailureTest; | 230 friend class WebstoreInlineInstallUnpackFailureTest; |
| 231 | 231 |
| 232 // Disables showing UI (ErrorBox, etc.) for install failures. To be used only | 232 // Disables showing UI (ErrorBox, etc.) for install failures. To be used only |
| 233 // in tests. | 233 // in tests. |
| 234 static void DisableFailureUIForTests(); | 234 static void DisableFailureUIForTests(); |
| 235 | 235 |
| 236 private: | 236 private: |
| 237 friend class GalleryInstallApiTestObserver; | 237 friend class GalleryInstallApiTestObserver; |
| 238 | 238 |
| 239 // Show an infobar for a newly-installed theme. previous_theme_id | 239 // Show an infobar for a newly-installed theme. previous_theme_id |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 297 | 297 |
| 298 // Whether to show an installed bubble on app install, or use the default | 298 // Whether to show an installed bubble on app install, or use the default |
| 299 // action of opening a new tab page. | 299 // action of opening a new tab page. |
| 300 bool use_app_installed_bubble_; | 300 bool use_app_installed_bubble_; |
| 301 | 301 |
| 302 // Whether or not to show the default UI after completing the installation. | 302 // Whether or not to show the default UI after completing the installation. |
| 303 bool skip_post_install_ui_; | 303 bool skip_post_install_ui_; |
| 304 }; | 304 }; |
| 305 | 305 |
| 306 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_INSTALL_UI_H_ | 306 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_INSTALL_UI_H_ |
| OLD | NEW |