Chromium Code Reviews| Index: chrome/browser/ui/views/extensions/extension_popup.cc |
| diff --git a/chrome/browser/ui/views/extensions/extension_popup.cc b/chrome/browser/ui/views/extensions/extension_popup.cc |
| index ab5acf55e254af333393ac33632bd4afbd233ad8..019ba9469adef34659725166196c8503ef019fb8 100644 |
| --- a/chrome/browser/ui/views/extensions/extension_popup.cc |
| +++ b/chrome/browser/ui/views/extensions/extension_popup.cc |
| @@ -12,6 +12,7 @@ |
| #include "chrome/browser/profiles/profile.h" |
| #include "chrome/browser/ui/browser.h" |
| #include "chrome/browser/ui/browser_window.h" |
| +#include "chrome/browser/ui/views/extensions/extension_view_views.h" |
| #include "chrome/common/chrome_notification_types.h" |
| #include "content/public/browser/notification_details.h" |
| #include "content/public/browser/notification_source.h" |
| @@ -75,8 +76,10 @@ ExtensionPopup::ExtensionPopup( |
| const int margin = views::BubbleBorder::GetCornerRadius() / 2; |
| set_margins(gfx::Insets(margin, margin, margin, margin)); |
| SetLayoutManager(new views::FillLayout()); |
| - AddChildView(host->view()); |
| - host->view()->SetContainer(this); |
| + ExtensionViewViews* view = |
| + static_cast<ExtensionViewViews*>(host->GetExtensionView()); |
|
tfarina
2012/09/16 10:54:02
Aaron, Ben, the problem of doing this is that Exte
|
| + AddChildView(view); |
| + view->SetContainer(this); |
| // Use OnNativeFocusChange to check for child window activation on deactivate. |
| set_close_on_deactivate(false); |
| // Make the bubble move with its anchor (during inspection, etc.). |
| @@ -142,7 +145,8 @@ void ExtensionPopup::Observe(int type, |
| } |
| } |
| -void ExtensionPopup::OnExtensionSizeChanged(ExtensionViewViews* view) { |
| +void ExtensionPopup::OnExtensionSizeChanged(ExtensionView* view, |
| + const gfx::Size& new_size) { |
| SizeToContents(); |
| } |