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

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

Issue 244893004: Improve some naming (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: merge and ShouldInitWithSystemTheme Created 6 years, 8 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
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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_THEME_INSTALLED_INFOBAR_DELEGATE_H_ 5 #ifndef CHROME_BROWSER_EXTENSIONS_THEME_INSTALLED_INFOBAR_DELEGATE_H_
6 #define CHROME_BROWSER_EXTENSIONS_THEME_INSTALLED_INFOBAR_DELEGATE_H_ 6 #define CHROME_BROWSER_EXTENSIONS_THEME_INSTALLED_INFOBAR_DELEGATE_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
(...skipping 13 matching lines...) Expand all
24 // When a user installs a theme, we display it immediately, but provide an 24 // When a user installs a theme, we display it immediately, but provide an
25 // infobar allowing them to cancel. 25 // infobar allowing them to cancel.
26 class ThemeInstalledInfoBarDelegate : public ConfirmInfoBarDelegate, 26 class ThemeInstalledInfoBarDelegate : public ConfirmInfoBarDelegate,
27 public content::NotificationObserver { 27 public content::NotificationObserver {
28 public: 28 public:
29 // Creates a theme installed infobar and delegate and adds the infobar to the 29 // Creates a theme installed infobar and delegate and adds the infobar to the
30 // last active tab on |profile|. 30 // last active tab on |profile|.
31 static void Create(const extensions::Extension* new_theme, 31 static void Create(const extensions::Extension* new_theme,
32 Profile* profile, 32 Profile* profile,
33 const std::string& previous_theme_id, 33 const std::string& previous_theme_id,
34 bool previous_using_native_theme); 34 bool previous_using_system_theme);
35 35
36 private: 36 private:
37 ThemeInstalledInfoBarDelegate(ExtensionService* extension_service, 37 ThemeInstalledInfoBarDelegate(ExtensionService* extension_service,
38 ThemeService* theme_service, 38 ThemeService* theme_service,
39 const extensions::Extension* new_theme, 39 const extensions::Extension* new_theme,
40 const std::string& previous_theme_id, 40 const std::string& previous_theme_id,
41 bool previous_using_native_theme); 41 bool previous_using_system_theme);
42 virtual ~ThemeInstalledInfoBarDelegate(); 42 virtual ~ThemeInstalledInfoBarDelegate();
43 43
44 // ConfirmInfoBarDelegate: 44 // ConfirmInfoBarDelegate:
45 virtual int GetIconID() const OVERRIDE; 45 virtual int GetIconID() const OVERRIDE;
46 virtual Type GetInfoBarType() const OVERRIDE; 46 virtual Type GetInfoBarType() const OVERRIDE;
47 virtual ThemeInstalledInfoBarDelegate* 47 virtual ThemeInstalledInfoBarDelegate*
48 AsThemePreviewInfobarDelegate() OVERRIDE; 48 AsThemePreviewInfobarDelegate() OVERRIDE;
49 virtual base::string16 GetMessageText() const OVERRIDE; 49 virtual base::string16 GetMessageText() const OVERRIDE;
50 virtual int GetButtons() const OVERRIDE; 50 virtual int GetButtons() const OVERRIDE;
51 virtual base::string16 GetButtonLabel(InfoBarButton button) const OVERRIDE; 51 virtual base::string16 GetButtonLabel(InfoBarButton button) const OVERRIDE;
52 virtual bool Cancel() OVERRIDE; 52 virtual bool Cancel() OVERRIDE;
53 53
54 // content::NotificationObserver: 54 // content::NotificationObserver:
55 virtual void Observe(int type, 55 virtual void Observe(int type,
56 const content::NotificationSource& source, 56 const content::NotificationSource& source,
57 const content::NotificationDetails& details) OVERRIDE; 57 const content::NotificationDetails& details) OVERRIDE;
58 58
59 ExtensionService* extension_service_; 59 ExtensionService* extension_service_;
60 ThemeService* theme_service_; 60 ThemeService* theme_service_;
61 61
62 // Name of theme that's just been installed. 62 // Name of theme that's just been installed.
63 std::string name_; 63 std::string name_;
64 64
65 // ID of theme that's just been installed. 65 // ID of theme that's just been installed.
66 std::string theme_id_; 66 std::string theme_id_;
67 67
68 // Used to undo theme install. 68 // Used to undo theme install.
69 std::string previous_theme_id_; 69 std::string previous_theme_id_;
70 bool previous_using_native_theme_; 70 bool previous_using_system_theme_;
71 71
72 // Registers and unregisters us for notifications. 72 // Registers and unregisters us for notifications.
73 content::NotificationRegistrar registrar_; 73 content::NotificationRegistrar registrar_;
74 }; 74 };
75 75
76 #endif // CHROME_BROWSER_EXTENSIONS_THEME_INSTALLED_INFOBAR_DELEGATE_H_ 76 #endif // CHROME_BROWSER_EXTENSIONS_THEME_INSTALLED_INFOBAR_DELEGATE_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/extensions/theme_installed_infobar_delegate.cc » ('j') | chrome/browser/themes/theme_service.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698