| OLD | NEW |
| 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 "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
| 10 #include "chrome/browser/tab_contents/confirm_infobar_delegate.h" | 10 #include "chrome/browser/tab_contents/confirm_infobar_delegate.h" |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 52 virtual bool EqualsDelegate(InfoBarDelegate* delegate) const OVERRIDE; | 52 virtual bool EqualsDelegate(InfoBarDelegate* delegate) const OVERRIDE; |
| 53 virtual void InfoBarDismissed() OVERRIDE; | 53 virtual void InfoBarDismissed() OVERRIDE; |
| 54 virtual Type GetInfoBarType() const OVERRIDE; | 54 virtual Type GetInfoBarType() const OVERRIDE; |
| 55 virtual ExtensionInfoBarDelegate* AsExtensionInfoBarDelegate() OVERRIDE; | 55 virtual ExtensionInfoBarDelegate* AsExtensionInfoBarDelegate() OVERRIDE; |
| 56 | 56 |
| 57 // NotificationObserver: | 57 // NotificationObserver: |
| 58 virtual void Observe(int type, | 58 virtual void Observe(int type, |
| 59 const NotificationSource& source, | 59 const NotificationSource& source, |
| 60 const NotificationDetails& details) OVERRIDE; | 60 const NotificationDetails& details) OVERRIDE; |
| 61 | 61 |
| 62 Browser* browser_; |
| 63 |
| 62 // The extension host we are showing the InfoBar for. The delegate needs to | 64 // The extension host we are showing the InfoBar for. The delegate needs to |
| 63 // own this since the InfoBar gets deleted and recreated when you switch tabs | 65 // own this since the InfoBar gets deleted and recreated when you switch tabs |
| 64 // and come back (and we don't want the user's interaction with the InfoBar to | 66 // and come back (and we don't want the user's interaction with the InfoBar to |
| 65 // get lost at that point). | 67 // get lost at that point). |
| 66 scoped_ptr<ExtensionHost> extension_host_; | 68 scoped_ptr<ExtensionHost> extension_host_; |
| 67 | 69 |
| 68 // The observer monitoring when the delegate dies. | 70 // The observer monitoring when the delegate dies. |
| 69 DelegateObserver* observer_; | 71 DelegateObserver* observer_; |
| 70 | 72 |
| 71 const Extension* extension_; | 73 const Extension* extension_; |
| 72 NotificationRegistrar registrar_; | 74 NotificationRegistrar registrar_; |
| 73 | 75 |
| 74 // The requested height of the infobar (in pixels). | 76 // The requested height of the infobar (in pixels). |
| 75 int height_; | 77 int height_; |
| 76 | 78 |
| 77 // Whether we are currently animating to close. This is used to ignore | 79 // Whether we are currently animating to close. This is used to ignore |
| 78 // ExtensionView::PreferredSizeChanged notifications. | 80 // ExtensionView::PreferredSizeChanged notifications. |
| 79 bool closing_; | 81 bool closing_; |
| 80 | 82 |
| 81 DISALLOW_COPY_AND_ASSIGN(ExtensionInfoBarDelegate); | 83 DISALLOW_COPY_AND_ASSIGN(ExtensionInfoBarDelegate); |
| 82 }; | 84 }; |
| 83 | 85 |
| 84 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_INFOBAR_DELEGATE_H_ | 86 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_INFOBAR_DELEGATE_H_ |
| OLD | NEW |