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

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: Minor clean-ups Created 8 years, 7 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 TabContentsWrapper;
13
14 class ExtensionInstallUIDefault : public ExtensionInstallUI {
15 public:
16 explicit ExtensionInstallUIDefault(Profile* profile);
17 virtual ~ExtensionInstallUIDefault();
18
19 virtual void OnInstallSuccess(const extensions::Extension* extension,
20 SkBitmap* icon);
21 virtual void OnInstallFailure(const string16& error);
22
23 private:
24 // Shows an infobar for a newly-installed theme. previous_theme_id should be
25 // empty if the previous theme was the system/default theme.
26 static void ShowThemeInfoBar(const std::string& previous_theme_id,
27 bool previous_using_native_theme,
28 const extensions::Extension* new_theme,
29 Profile* profile);
30
31 // Returns the delegate to control the browser's info bar. This is
32 // within its own function due to its platform-specific nature.
33 static InfoBarDelegate* GetNewThemeInstalledInfoBarDelegate(
34 TabContentsWrapper* tab_contents,
35 const extensions::Extension* new_theme,
36 const std::string& previous_theme_id,
37 bool previous_using_native_theme);
38
39 // Used to undo theme installation.
40 std::string previous_theme_id_;
41 bool previous_using_native_theme_;
42
43 DISALLOW_IMPLICIT_CONSTRUCTORS(ExtensionInstallUIDefault);
44 };
45
46 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_INSTALL_UI_DEFAULT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698