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 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 | 9 |
10 #include <memory> | 10 #include <memory> |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
91 | 91 |
92 // Extra information needed to display an installation or uninstallation | 92 // Extra information needed to display an installation or uninstallation |
93 // prompt. Gets populated with raw data and exposes getters for formatted | 93 // prompt. Gets populated with raw data and exposes getters for formatted |
94 // strings so that the GTK/views/Cocoa install dialogs don't have to repeat | 94 // strings so that the GTK/views/Cocoa install dialogs don't have to repeat |
95 // that logic. | 95 // that logic. |
96 class Prompt { | 96 class Prompt { |
97 public: | 97 public: |
98 explicit Prompt(PromptType type); | 98 explicit Prompt(PromptType type); |
99 ~Prompt(); | 99 ~Prompt(); |
100 | 100 |
101 void SetPermissions(const extensions::PermissionMessages& permissions, | 101 void AddPermissions(const extensions::PermissionMessages& permissions, |
102 PermissionsType permissions_type); | 102 PermissionsType permissions_type); |
103 void SetIsShowingDetails(DetailsType type, | 103 void SetIsShowingDetails(DetailsType type, |
104 size_t index, | 104 size_t index, |
105 bool is_showing_details); | 105 bool is_showing_details); |
106 void SetWebstoreData(const std::string& localized_user_count, | 106 void SetWebstoreData(const std::string& localized_user_count, |
107 bool show_user_count, | 107 bool show_user_count, |
108 double average_rating, | 108 double average_rating, |
109 int rating_count); | 109 int rating_count); |
110 | 110 |
111 PromptType type() const { return type_; } | 111 PromptType type() const { return type_; } |
(...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
382 | 382 |
383 // Whether or not the |show_dialog_callback_| was called. | 383 // Whether or not the |show_dialog_callback_| was called. |
384 bool did_call_show_dialog_; | 384 bool did_call_show_dialog_; |
385 | 385 |
386 base::WeakPtrFactory<ExtensionInstallPrompt> weak_factory_; | 386 base::WeakPtrFactory<ExtensionInstallPrompt> weak_factory_; |
387 | 387 |
388 DISALLOW_COPY_AND_ASSIGN(ExtensionInstallPrompt); | 388 DISALLOW_COPY_AND_ASSIGN(ExtensionInstallPrompt); |
389 }; | 389 }; |
390 | 390 |
391 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_INSTALL_PROMPT_H_ | 391 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_INSTALL_PROMPT_H_ |
OLD | NEW |