Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(403)

Side by Side Diff: chrome/browser/extensions/extension_install_ui_default.h

Issue 10388252: Refactoring ExtenionInstallUI to abstract the Browser references. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Synced + mac fix Created 8 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(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 TabContents;
13 typedef TabContents TabContentsWrapper;
14
15 class ExtensionInstallUIDefault : public ExtensionInstallUI {
16 public:
17 explicit ExtensionInstallUIDefault(Profile* profile);
18 virtual ~ExtensionInstallUIDefault();
19
20 // ExtensionInstallUI implementation:
21 virtual void OnInstallSuccess(const extensions::Extension* extension,
22 SkBitmap* icon) OVERRIDE;
23 virtual void OnInstallFailure(const string16& error) OVERRIDE;
24 virtual void SetSkipPostInstallUI(bool skip_ui) OVERRIDE;
25 virtual void SetUseAppInstalledBubble(bool use_bubble) OVERRIDE;
26
27 private:
28 // Shows an infobar for a newly-installed theme. previous_theme_id should be
29 // empty if the previous theme was the system/default theme.
30 static void ShowThemeInfoBar(const std::string& previous_theme_id,
31 bool previous_using_native_theme,
32 const extensions::Extension* new_theme,
33 Profile* profile);
34
35 // Returns the delegate to control the browser's info bar. This is
36 // within its own function due to its platform-specific nature.
37 static InfoBarDelegate* GetNewThemeInstalledInfoBarDelegate(
38 TabContentsWrapper* tab_contents,
39 const extensions::Extension* new_theme,
40 const std::string& previous_theme_id,
41 bool previous_using_native_theme);
42
43 Profile* profile_;
44
45 // Whether or not to show the default UI after completing the installation.
46 bool skip_post_install_ui_;
47
48 // Used to undo theme installation.
49 std::string previous_theme_id_;
50 bool previous_using_native_theme_;
51
52 // Whether to show an installed bubble on app install, or use the default
53 // action of opening a new tab page.
54 bool use_app_installed_bubble_;
55
56 DISALLOW_IMPLICIT_CONSTRUCTORS(ExtensionInstallUIDefault);
57 };
58
59 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_INSTALL_UI_DEFAULT_H_
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_install_ui_android.cc ('k') | chrome/browser/extensions/extension_install_ui_default.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698