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

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

Issue 6926001: Replace the virtual InfoBarDelegate::InfoBarClosed() function with a non-virtual one. This is a ... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 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
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_EXTENSION_INFOBAR_DELEGATE_H_ 5 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_INFOBAR_DELEGATE_H_
6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_INFOBAR_DELEGATE_H_ 6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_INFOBAR_DELEGATE_H_
7 #pragma once 7 #pragma once
8 8
9 #include "chrome/browser/tab_contents/confirm_infobar_delegate.h" 9 #include "chrome/browser/tab_contents/confirm_infobar_delegate.h"
10 10
(...skipping 25 matching lines...) Expand all
36 ExtensionHost* extension_host() { return extension_host_.get(); } 36 ExtensionHost* extension_host() { return extension_host_.get(); }
37 37
38 void set_observer(DelegateObserver* observer) { observer_ = observer; } 38 void set_observer(DelegateObserver* observer) { observer_ = observer; }
39 39
40 bool closing() const { return closing_; } 40 bool closing() const { return closing_; }
41 41
42 private: 42 private:
43 virtual ~ExtensionInfoBarDelegate(); 43 virtual ~ExtensionInfoBarDelegate();
44 44
45 // InfoBarDelegate: 45 // InfoBarDelegate:
46 virtual InfoBar* CreateInfoBar(); 46 virtual InfoBar* CreateInfoBar() OVERRIDE;
47 virtual bool EqualsDelegate(InfoBarDelegate* delegate) const; 47 virtual bool EqualsDelegate(InfoBarDelegate* delegate) const OVERRIDE;
48 virtual void InfoBarDismissed(); 48 virtual void InfoBarDismissed() OVERRIDE;
49 virtual void InfoBarClosed(); 49 virtual Type GetInfoBarType() const OVERRIDE;
50 virtual Type GetInfoBarType() const; 50 virtual ExtensionInfoBarDelegate* AsExtensionInfoBarDelegate() OVERRIDE;
51 virtual ExtensionInfoBarDelegate* AsExtensionInfoBarDelegate();
52 51
53 // NotificationObserver: 52 // NotificationObserver:
54 virtual void Observe(NotificationType type, 53 virtual void Observe(NotificationType type,
55 const NotificationSource& source, 54 const NotificationSource& source,
56 const NotificationDetails& details); 55 const NotificationDetails& details) OVERRIDE;
57 56
58 // The extension host we are showing the InfoBar for. The delegate needs to 57 // The extension host we are showing the InfoBar for. The delegate needs to
59 // own this since the InfoBar gets deleted and recreated when you switch tabs 58 // own this since the InfoBar gets deleted and recreated when you switch tabs
60 // and come back (and we don't want the user's interaction with the InfoBar to 59 // and come back (and we don't want the user's interaction with the InfoBar to
61 // get lost at that point). 60 // get lost at that point).
62 scoped_ptr<ExtensionHost> extension_host_; 61 scoped_ptr<ExtensionHost> extension_host_;
63 62
64 // The observer monitoring when the delegate dies. 63 // The observer monitoring when the delegate dies.
65 DelegateObserver* observer_; 64 DelegateObserver* observer_;
66 65
67 const Extension* extension_; 66 const Extension* extension_;
68 TabContents* tab_contents_; 67 TabContents* tab_contents_;
69 NotificationRegistrar registrar_; 68 NotificationRegistrar registrar_;
70 69
71 // Whether we are currently animating to close. This is used to ignore 70 // Whether we are currently animating to close. This is used to ignore
72 // ExtensionView::PreferredSizeChanged notifications. 71 // ExtensionView::PreferredSizeChanged notifications.
73 bool closing_; 72 bool closing_;
74 73
75 DISALLOW_COPY_AND_ASSIGN(ExtensionInfoBarDelegate); 74 DISALLOW_COPY_AND_ASSIGN(ExtensionInfoBarDelegate);
76 }; 75 };
77 76
78 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_INFOBAR_DELEGATE_H_ 77 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_INFOBAR_DELEGATE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698