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

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

Issue 10375021: Move Extension into extensions namespace (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Take 6 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
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 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 10
11 #include "base/compiler_specific.h" 11 #include "base/compiler_specific.h"
12 #include "chrome/browser/tab_contents/confirm_infobar_delegate.h" 12 #include "chrome/browser/tab_contents/confirm_infobar_delegate.h"
13 #include "content/public/browser/notification_observer.h" 13 #include "content/public/browser/notification_observer.h"
14 #include "content/public/browser/notification_registrar.h" 14 #include "content/public/browser/notification_registrar.h"
15 15
16 class Extension;
17 class ExtensionService; 16 class ExtensionService;
18 class ThemeService; 17 class ThemeService;
19 18
19 namespace extensions {
20 class Extension;
21 }
22
20 // When a user installs a theme, we display it immediately, but provide an 23 // When a user installs a theme, we display it immediately, but provide an
21 // infobar allowing them to cancel. 24 // infobar allowing them to cancel.
22 class ThemeInstalledInfoBarDelegate : public ConfirmInfoBarDelegate, 25 class ThemeInstalledInfoBarDelegate : public ConfirmInfoBarDelegate,
23 public content::NotificationObserver { 26 public content::NotificationObserver {
24 public: 27 public:
25 ThemeInstalledInfoBarDelegate(InfoBarTabHelper* infobar_helper, 28 ThemeInstalledInfoBarDelegate(InfoBarTabHelper* infobar_helper,
26 ExtensionService* extension_service, 29 ExtensionService* extension_service,
27 ThemeService* theme_service, 30 ThemeService* theme_service,
28 const Extension* new_theme, 31 const extensions::Extension* new_theme,
29 const std::string& previous_theme_id, 32 const std::string& previous_theme_id,
30 bool previous_using_native_theme); 33 bool previous_using_native_theme);
31 34
32 // Returns true if the given theme is the same as the one associated with this 35 // Returns true if the given theme is the same as the one associated with this
33 // info bar. 36 // info bar.
34 bool MatchesTheme(const Extension* theme) const; 37 bool MatchesTheme(const extensions::Extension* theme) const;
35 38
36 protected: 39 protected:
37 virtual ~ThemeInstalledInfoBarDelegate(); 40 virtual ~ThemeInstalledInfoBarDelegate();
38 41
39 ThemeService* theme_service() { return theme_service_; } 42 ThemeService* theme_service() { return theme_service_; }
40 43
41 // ConfirmInfoBarDelegate: 44 // ConfirmInfoBarDelegate:
42 virtual bool Cancel() OVERRIDE; 45 virtual bool Cancel() OVERRIDE;
43 46
44 private: 47 private:
(...skipping 22 matching lines...) Expand all
67 70
68 // Used to undo theme install. 71 // Used to undo theme install.
69 std::string previous_theme_id_; 72 std::string previous_theme_id_;
70 bool previous_using_native_theme_; 73 bool previous_using_native_theme_;
71 74
72 // Registers and unregisters us for notifications. 75 // Registers and unregisters us for notifications.
73 content::NotificationRegistrar registrar_; 76 content::NotificationRegistrar registrar_;
74 }; 77 };
75 78
76 #endif // CHROME_BROWSER_EXTENSIONS_THEME_INSTALLED_INFOBAR_DELEGATE_H_ 79 #endif // CHROME_BROWSER_EXTENSIONS_THEME_INSTALLED_INFOBAR_DELEGATE_H_
OLDNEW
« no previous file with comments | « chrome/browser/extensions/test_extension_service.cc ('k') | chrome/browser/extensions/theme_installed_infobar_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698