OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_INSTALL_UI_DEFAULT_H_ |
| 6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_INSTALL_UI_DEFAULT_H_ |
| 7 #pragma once |
| 8 |
| 9 #include "chrome/browser/extensions/extension_install_ui.h" |
| 10 |
| 11 class InfoBarDelegate; |
| 12 class TabContentsWrapper; |
| 13 |
| 14 class ExtensionInstallUIDefault : public ExtensionInstallUI { |
| 15 public: |
| 16 explicit ExtensionInstallUIDefault(Profile* profile); |
| 17 virtual ~ExtensionInstallUIDefault(); |
| 18 |
| 19 // ExtensionInstallUI implementation: |
| 20 virtual void OnInstallSuccess(const extensions::Extension* extension, |
| 21 SkBitmap* icon); |
| 22 virtual void OnInstallFailure(const string16& error); |
| 23 virtual void SetSkipPostInstallUI(bool skip_ui); |
| 24 |
| 25 private: |
| 26 // Shows an infobar for a newly-installed theme. previous_theme_id should be |
| 27 // empty if the previous theme was the system/default theme. |
| 28 static void ShowThemeInfoBar(const std::string& previous_theme_id, |
| 29 bool previous_using_native_theme, |
| 30 const extensions::Extension* new_theme, |
| 31 Profile* profile); |
| 32 |
| 33 // Returns the delegate to control the browser's info bar. This is |
| 34 // within its own function due to its platform-specific nature. |
| 35 static InfoBarDelegate* GetNewThemeInstalledInfoBarDelegate( |
| 36 TabContentsWrapper* tab_contents, |
| 37 const extensions::Extension* new_theme, |
| 38 const std::string& previous_theme_id, |
| 39 bool previous_using_native_theme); |
| 40 |
| 41 Profile* profile_; |
| 42 |
| 43 // Whether or not to show the default UI after completing the installation. |
| 44 bool skip_post_install_ui_; |
| 45 |
| 46 // Used to undo theme installation. |
| 47 std::string previous_theme_id_; |
| 48 bool previous_using_native_theme_; |
| 49 |
| 50 DISALLOW_IMPLICIT_CONSTRUCTORS(ExtensionInstallUIDefault); |
| 51 }; |
| 52 |
| 53 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_INSTALL_UI_DEFAULT_H_ |
OLD | NEW |