OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
109 // Returns the delegate to control the browser's info bar. This is | 109 // Returns the delegate to control the browser's info bar. This is |
110 // within its own function due to its platform-specific nature. | 110 // within its own function due to its platform-specific nature. |
111 static InfoBarDelegate* GetNewThemeInstalledInfoBarDelegate( | 111 static InfoBarDelegate* GetNewThemeInstalledInfoBarDelegate( |
112 TabContents* tab_contents, Extension* new_theme, | 112 TabContents* tab_contents, Extension* new_theme, |
113 const std::string& previous_theme_id, bool previous_use_system_theme); | 113 const std::string& previous_theme_id, bool previous_use_system_theme); |
114 | 114 |
115 // Implements the showing of the install/uninstall dialog prompt. | 115 // Implements the showing of the install/uninstall dialog prompt. |
116 // NOTE: The implementations of this function is platform-specific. | 116 // NOTE: The implementations of this function is platform-specific. |
117 static void ShowExtensionInstallUIPromptImpl( | 117 static void ShowExtensionInstallUIPromptImpl( |
118 Profile* profile, Delegate* delegate, Extension* extension, | 118 Profile* profile, Delegate* delegate, Extension* extension, |
119 SkBitmap* icon, const string16& warning, PromptType type); | 119 SkBitmap* icon, PromptType type); |
120 | 120 |
121 // Implements the showing of the new install dialog. The implementations of | 121 // Implements the showing of the new install dialog. The implementations of |
122 // this function are platform-specific. | 122 // this function are platform-specific. |
123 static void ShowExtensionInstallUIPrompt2Impl( | 123 static void ShowExtensionInstallUIPrompt2Impl( |
124 Profile* profile, Delegate* delegate, Extension* extension, | 124 Profile* profile, Delegate* delegate, Extension* extension, |
125 SkBitmap* icon, const std::vector<string16>& permissions); | 125 SkBitmap* icon, const std::vector<string16>& permissions); |
126 | 126 |
127 Profile* profile_; | 127 Profile* profile_; |
128 MessageLoop* ui_loop_; | 128 MessageLoop* ui_loop_; |
129 | 129 |
130 // Used to undo theme installation. | 130 // Used to undo theme installation. |
131 std::string previous_theme_id_; | 131 std::string previous_theme_id_; |
132 bool previous_use_system_theme_; | 132 bool previous_use_system_theme_; |
133 | 133 |
134 SkBitmap icon_; // The extensions installation icon. | 134 SkBitmap icon_; // The extensions installation icon. |
135 Extension* extension_; // The extension we are showing the UI for. | 135 Extension* extension_; // The extension we are showing the UI for. |
136 Delegate* delegate_; // The delegate we will call Proceed/Abort on after | 136 Delegate* delegate_; // The delegate we will call Proceed/Abort on after |
137 // confirmation UI. | 137 // confirmation UI. |
138 PromptType prompt_type_; // The type of prompt we are going to show. | 138 PromptType prompt_type_; // The type of prompt we are going to show. |
139 | 139 |
140 // Keeps track of extension images being loaded on the File thread for the | 140 // Keeps track of extension images being loaded on the File thread for the |
141 // purpose of showing the install UI. | 141 // purpose of showing the install UI. |
142 ImageLoadingTracker tracker_; | 142 ImageLoadingTracker tracker_; |
143 }; | 143 }; |
144 | 144 |
145 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_INSTALL_UI_H_ | 145 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_INSTALL_UI_H_ |
OLD | NEW |