Cast: Stop logging kVideoFrameSentToEncoder and rename a couple events.
[chromium-blink-merge.git] / chrome / browser / extensions / extension_error_ui_default.h
blob24b75b26e080c4e48312555131f241a211f6cd89
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.
5 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_ERROR_UI_DEFAULT_H_
6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_ERROR_UI_DEFAULT_H_
8 #include "base/basictypes.h"
9 #include "base/compiler_specific.h"
10 #include "chrome/browser/extensions/extension_error_ui.h"
11 #include "chrome/browser/ui/global_error/global_error.h"
12 #include "extensions/common/extension.h"
14 class Browser;
15 class ExtensionService;
16 class Profile;
18 namespace extensions {
20 class ExtensionErrorUIDefault : public ExtensionErrorUI {
21 public:
22 explicit ExtensionErrorUIDefault(ExtensionErrorUI::Delegate* delegate);
23 virtual ~ExtensionErrorUIDefault();
25 // ExtensionErrorUI implementation:
26 virtual bool ShowErrorInBubbleView() OVERRIDE;
27 virtual void ShowExtensions() OVERRIDE;
28 virtual void Close() OVERRIDE;
30 private:
31 class ExtensionGlobalError : public GlobalErrorWithStandardBubble {
32 public:
33 explicit ExtensionGlobalError(ExtensionErrorUIDefault* error_ui);
35 private:
36 // GlobalError methods.
37 virtual bool HasMenuItem() OVERRIDE;
38 virtual int MenuItemCommandID() OVERRIDE;
39 virtual base::string16 MenuItemLabel() OVERRIDE;
40 virtual void ExecuteMenuItem(Browser* browser) OVERRIDE;
41 virtual base::string16 GetBubbleViewTitle() OVERRIDE;
42 virtual std::vector<base::string16> GetBubbleViewMessages() OVERRIDE;
43 virtual base::string16 GetBubbleViewAcceptButtonLabel() OVERRIDE;
44 virtual base::string16 GetBubbleViewCancelButtonLabel() OVERRIDE;
45 virtual void OnBubbleViewDidClose(Browser* browser) OVERRIDE;
46 virtual void BubbleViewAcceptButtonPressed(Browser* browser) OVERRIDE;
47 virtual void BubbleViewCancelButtonPressed(Browser* browser) OVERRIDE;
49 // The ExtensionErrorUIDefault who owns us.
50 ExtensionErrorUIDefault* error_ui_;
52 DISALLOW_COPY_AND_ASSIGN(ExtensionGlobalError);
55 // The profile associated with this error.
56 Profile* profile_;
58 // The browser the bubble view was shown into.
59 Browser* browser_;
61 scoped_ptr<ExtensionGlobalError> global_error_;
63 DISALLOW_COPY_AND_ASSIGN(ExtensionErrorUIDefault);
66 } // namespace extensions
68 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_ERROR_UI_DEFAULT_H_