OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 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 | 7 |
8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
9 #include "base/scoped_observer.h" | 9 #include "base/scoped_observer.h" |
10 #include "chrome/browser/infobars/confirm_infobar_delegate.h" | 10 #include "chrome/browser/infobars/confirm_infobar_delegate.h" |
(...skipping 27 matching lines...) Expand all Loading... |
38 static void Create(content::WebContents* web_contents, | 38 static void Create(content::WebContents* web_contents, |
39 Browser* browser, | 39 Browser* browser, |
40 const extensions::Extension* extension, | 40 const extensions::Extension* extension, |
41 const GURL& url, | 41 const GURL& url, |
42 int height); | 42 int height); |
43 | 43 |
44 const extensions::Extension* extension() { return extension_; } | 44 const extensions::Extension* extension() { return extension_; } |
45 extensions::ExtensionViewHost* extension_view_host() { | 45 extensions::ExtensionViewHost* extension_view_host() { |
46 return extension_view_host_.get(); | 46 return extension_view_host_.get(); |
47 } | 47 } |
| 48 const extensions::ExtensionViewHost* extension_view_host() const { |
| 49 return extension_view_host_.get(); |
| 50 } |
| 51 |
48 int height() { return height_; } | 52 int height() { return height_; } |
49 | 53 |
50 bool closing() const { return closing_; } | 54 bool closing() const { return closing_; } |
51 | 55 |
52 // Returns the WebContents associated with the ExtensionInfoBarDelegate. | 56 // Returns the WebContents associated with the ExtensionInfoBarDelegate. |
53 content::WebContents* GetWebContents(); | 57 content::WebContents* GetWebContents(); |
54 | 58 |
55 private: | 59 private: |
56 ExtensionInfoBarDelegate(Browser* browser, | 60 ExtensionInfoBarDelegate(Browser* browser, |
57 const extensions::Extension* extension, | 61 const extensions::Extension* extension, |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
100 int height_; | 104 int height_; |
101 | 105 |
102 // Whether we are currently animating to close. This is used to ignore | 106 // Whether we are currently animating to close. This is used to ignore |
103 // ExtensionView::PreferredSizeChanged notifications. | 107 // ExtensionView::PreferredSizeChanged notifications. |
104 bool closing_; | 108 bool closing_; |
105 | 109 |
106 DISALLOW_COPY_AND_ASSIGN(ExtensionInfoBarDelegate); | 110 DISALLOW_COPY_AND_ASSIGN(ExtensionInfoBarDelegate); |
107 }; | 111 }; |
108 | 112 |
109 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_INFOBAR_DELEGATE_H_ | 113 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_INFOBAR_DELEGATE_H_ |
OLD | NEW |