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 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
58 string16 GetAcceptButtonLabel() const; | 58 string16 GetAcceptButtonLabel() const; |
59 bool HasAbortButtonLabel() const; | 59 bool HasAbortButtonLabel() const; |
60 string16 GetAbortButtonLabel() const; | 60 string16 GetAbortButtonLabel() const; |
61 string16 GetPermissionsHeader() const; | 61 string16 GetPermissionsHeader() const; |
62 | 62 |
63 // Getters for webstore metadata. Only populated when the type is | 63 // Getters for webstore metadata. Only populated when the type is |
64 // INLINE_INSTALL_PROMPT. | 64 // INLINE_INSTALL_PROMPT. |
65 | 65 |
66 // The star display logic replicates the one used by the webstore (from | 66 // The star display logic replicates the one used by the webstore (from |
67 // components.ratingutils.setFractionalYellowStars). Callers pass in an | 67 // components.ratingutils.setFractionalYellowStars). Callers pass in an |
68 // "appender", which will be called back with the resource ID that they | 68 // "appender", which will be repeatedly called back with the star images |
69 // need to load/append. | 69 // that they append to the star display area. |
70 typedef void*(*StarAppender)(int, void*); | 70 typedef void(*StarAppender)(const SkBitmap*, void*); |
71 void AppendRatingStars(StarAppender appender, void* data) const; | 71 void AppendRatingStars(StarAppender appender, void* data) const; |
72 string16 GetRatingCount() const; | 72 string16 GetRatingCount() const; |
73 string16 GetUserCount() const; | 73 string16 GetUserCount() const; |
74 size_t GetPermissionCount() const; | 74 size_t GetPermissionCount() const; |
75 string16 GetPermission(int index) const; | 75 string16 GetPermission(int index) const; |
76 | 76 |
77 private: | 77 private: |
78 PromptType type_; | 78 PromptType type_; |
79 // Permissions that are being requested (may not be all of an extension's | 79 // Permissions that are being requested (may not be all of an extension's |
80 // permissions if only additional ones are being requested) | 80 // permissions if only additional ones are being requested) |
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
209 // Keeps track of extension images being loaded on the File thread for the | 209 // Keeps track of extension images being loaded on the File thread for the |
210 // purpose of showing the install UI. | 210 // purpose of showing the install UI. |
211 ImageLoadingTracker tracker_; | 211 ImageLoadingTracker tracker_; |
212 | 212 |
213 // Whether to show an installed bubble on app install, or use the default | 213 // Whether to show an installed bubble on app install, or use the default |
214 // action of opening a new tab page. | 214 // action of opening a new tab page. |
215 bool use_app_installed_bubble_; | 215 bool use_app_installed_bubble_; |
216 }; | 216 }; |
217 | 217 |
218 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_INSTALL_UI_H_ | 218 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_INSTALL_UI_H_ |
OLD | NEW |