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

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

Issue 9718008: Replace extension disabled infobar with a global error. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 9 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_DISABLED_UI_H_
6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_DISABLED_UI_H_
7 #pragma once
8
9 #include "chrome/browser/extensions/extension_uninstall_dialog.h"
10 #include "chrome/browser/ui/global_error.h"
11 #include "content/public/browser/notification_observer.h"
12 #include "content/public/browser/notification_registrar.h"
13
14 class Browser;
15 class Extension;
16 class ExtensionService;
17 class Profile;
18
19 class ExtensionDisabledGlobalError : public GlobalError,
Matt Perry 2012/03/16 23:52:06 Can this go in the .cc file? It's not part of the
Yoyo Zhou 2012/03/20 07:04:08 Done.
20 public content::NotificationObserver,
21 public ExtensionUninstallDialog::Delegate {
22 public:
23 ExtensionDisabledGlobalError(ExtensionService* service,
24 const Extension* extension);
25 virtual ~ExtensionDisabledGlobalError();
26
27 // GlobalError implementation.
28 virtual bool HasBadge() OVERRIDE;
29 virtual bool HasMenuItem() OVERRIDE;
30 virtual int MenuItemCommandID() OVERRIDE;
31 virtual string16 MenuItemLabel() OVERRIDE;
32 virtual void ExecuteMenuItem(Browser* browser) OVERRIDE;
33 virtual bool HasBubbleView() OVERRIDE;
34 virtual string16 GetBubbleViewTitle() OVERRIDE;
35 virtual string16 GetBubbleViewMessage() OVERRIDE;
36 virtual string16 GetBubbleViewAcceptButtonLabel() OVERRIDE;
37 virtual string16 GetBubbleViewCancelButtonLabel() OVERRIDE;
38 virtual void OnBubbleViewDidClose(Browser* browser) OVERRIDE;
39 virtual void BubbleViewAcceptButtonPressed(Browser* browser) OVERRIDE;
40 virtual void BubbleViewCancelButtonPressed(Browser* browser) OVERRIDE;
41
42 // ExtensionUninstallDialog::Delegate implementation.
43 virtual void ExtensionUninstallAccepted() OVERRIDE;
44 virtual void ExtensionUninstallCanceled() OVERRIDE;
45
46 // content::NotificationObserver implementation.
47 virtual void Observe(int type,
48 const content::NotificationSource& source,
49 const content::NotificationDetails& details) OVERRIDE;
50
51 private:
52 ExtensionService* service_;
53 const Extension* extension_;
54
55 scoped_ptr<ExtensionUninstallDialog> uninstall_dialog_;
56
57 content::NotificationRegistrar registrar_;
58 };
59
60 namespace extensions {
61
62 // Shows UI to inform the user that an extension was disabled after upgrading
63 // to higher permissions.
64 void ShowExtensionDisabledUI(ExtensionService* service, Profile* profile,
65 const Extension* extension);
66
67 // Shows the extension install dialog.
68 void ShowExtensionDisabledDialog(ExtensionService* service, Profile* profile,
69 const Extension* extension);
70
71 } // namespace extensions
72
73 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_DISABLED_UI_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698