| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 75 SkBitmap* image, const ExtensionResource& resource, int index); | 75 SkBitmap* image, const ExtensionResource& resource, int index); |
| 76 | 76 |
| 77 protected: | 77 protected: |
| 78 friend class ExtensionWebstorePrivateApiTest; | 78 friend class ExtensionWebstorePrivateApiTest; |
| 79 | 79 |
| 80 // Disables showing UI (ErrorBox, etc.) for install failures. To be used only | 80 // Disables showing UI (ErrorBox, etc.) for install failures. To be used only |
| 81 // in tests. | 81 // in tests. |
| 82 static void DisableFailureUIForTests(); | 82 static void DisableFailureUIForTests(); |
| 83 | 83 |
| 84 private: | 84 private: |
| 85 friend class GalleryInstallApiTestObserver; |
| 86 |
| 85 // Show an infobar for a newly-installed theme. previous_theme_id | 87 // Show an infobar for a newly-installed theme. previous_theme_id |
| 86 // should be empty if the previous theme was the system/default | 88 // should be empty if the previous theme was the system/default |
| 87 // theme. | 89 // theme. |
| 88 static void ShowThemeInfoBar( | 90 static void ShowThemeInfoBar( |
| 89 const std::string& previous_theme_id, bool previous_using_native_theme, | 91 const std::string& previous_theme_id, bool previous_using_native_theme, |
| 90 const Extension* new_theme, Profile* profile); | 92 const Extension* new_theme, Profile* profile); |
| 91 | 93 |
| 92 // Sets the icon that will be used in any UI. If |icon| is NULL, or contains | 94 // Sets the icon that will be used in any UI. If |icon| is NULL, or contains |
| 93 // an empty bitmap, then a default icon will be used instead. | 95 // an empty bitmap, then a default icon will be used instead. |
| 94 void SetIcon(SkBitmap* icon); | 96 void SetIcon(SkBitmap* icon); |
| (...skipping 29 matching lines...) Expand all Loading... |
| 124 | 126 |
| 125 // The type of prompt we are going to show. | 127 // The type of prompt we are going to show. |
| 126 PromptType prompt_type_; | 128 PromptType prompt_type_; |
| 127 | 129 |
| 128 // Keeps track of extension images being loaded on the File thread for the | 130 // Keeps track of extension images being loaded on the File thread for the |
| 129 // purpose of showing the install UI. | 131 // purpose of showing the install UI. |
| 130 ImageLoadingTracker tracker_; | 132 ImageLoadingTracker tracker_; |
| 131 }; | 133 }; |
| 132 | 134 |
| 133 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_INSTALL_UI_H_ | 135 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_INSTALL_UI_H_ |
| OLD | NEW |