| 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_DEFAULT_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_INSTALL_UI_DEFAULT_H_ |
| 6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_INSTALL_UI_DEFAULT_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_INSTALL_UI_DEFAULT_H_ |
| 7 | 7 |
| 8 #include "chrome/browser/extensions/extension_install_ui.h" | 8 #include "chrome/browser/extensions/extension_install_ui.h" |
| 9 | 9 |
| 10 class InfoBarDelegate; | 10 class InfoBarDelegate; |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 | 21 |
| 22 // ExtensionInstallUI implementation: | 22 // ExtensionInstallUI implementation: |
| 23 virtual void OnInstallSuccess(const extensions::Extension* extension, | 23 virtual void OnInstallSuccess(const extensions::Extension* extension, |
| 24 SkBitmap* icon) OVERRIDE; | 24 SkBitmap* icon) OVERRIDE; |
| 25 virtual void OnInstallFailure( | 25 virtual void OnInstallFailure( |
| 26 const extensions::CrxInstallerError& error) OVERRIDE; | 26 const extensions::CrxInstallerError& error) OVERRIDE; |
| 27 virtual void SetSkipPostInstallUI(bool skip_ui) OVERRIDE; | 27 virtual void SetSkipPostInstallUI(bool skip_ui) OVERRIDE; |
| 28 virtual void SetUseAppInstalledBubble(bool use_bubble) OVERRIDE; | 28 virtual void SetUseAppInstalledBubble(bool use_bubble) OVERRIDE; |
| 29 | 29 |
| 30 private: | 30 private: |
| 31 // Shows an infobar for a newly-installed theme. previous_theme_id should be | |
| 32 // empty if the previous theme was the system/default theme. | |
| 33 static void ShowThemeInfoBar(const std::string& previous_theme_id, | |
| 34 bool previous_using_native_theme, | |
| 35 const extensions::Extension* new_theme, | |
| 36 Profile* profile); | |
| 37 | |
| 38 // Returns the delegate to control the browser's info bar. This is | |
| 39 // within its own function due to its platform-specific nature. | |
| 40 static InfoBarDelegate* GetNewThemeInstalledInfoBarDelegate( | |
| 41 content::WebContents* web_contents, | |
| 42 const extensions::Extension* new_theme, | |
| 43 const std::string& previous_theme_id, | |
| 44 bool previous_using_native_theme); | |
| 45 | |
| 46 // Whether or not to show the default UI after completing the installation. | 31 // Whether or not to show the default UI after completing the installation. |
| 47 bool skip_post_install_ui_; | 32 bool skip_post_install_ui_; |
| 48 | 33 |
| 49 // Used to undo theme installation. | 34 // Used to undo theme installation. |
| 50 std::string previous_theme_id_; | 35 std::string previous_theme_id_; |
| 51 bool previous_using_native_theme_; | 36 bool previous_using_native_theme_; |
| 52 | 37 |
| 53 // Whether to show an installed bubble on app install, or use the default | 38 // Whether to show an installed bubble on app install, or use the default |
| 54 // action of opening a new tab page. | 39 // action of opening a new tab page. |
| 55 bool use_app_installed_bubble_; | 40 bool use_app_installed_bubble_; |
| 56 | 41 |
| 57 DISALLOW_IMPLICIT_CONSTRUCTORS(ExtensionInstallUIDefault); | 42 DISALLOW_IMPLICIT_CONSTRUCTORS(ExtensionInstallUIDefault); |
| 58 }; | 43 }; |
| 59 | 44 |
| 60 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_INSTALL_UI_DEFAULT_H_ | 45 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_INSTALL_UI_DEFAULT_H_ |
| OLD | NEW |