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

Unified Diff: chrome/browser/ui/views/extensions/extension_popup.cc

Issue 10913243: extensions: Add ExtensionView interface. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: weak Created 8 years, 3 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 side-by-side diff with in-line comments
Download patch
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..015ed5d9b66da1ef2b32422d8aecb317d3bc2ac0 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,8 @@ 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);
+ AddChildView(static_cast<ExtensionViewViews*>(host->GetExtensionView()));
+ host->GetExtensionView()->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,10 +143,14 @@ void ExtensionPopup::Observe(int type,
}
}
-void ExtensionPopup::OnExtensionSizeChanged(ExtensionViewViews* view) {
+void ExtensionPopup::OnExtensionSizeChanged(ExtensionView* view,
+ const gfx::Size& new_size) {
SizeToContents();
}
+void ExtensionPopup::OnExtensionViewDidShow(ExtensionView* view) {
+}
+
gfx::Size ExtensionPopup::GetPreferredSize() {
// Constrain the size to popup min/max.
gfx::Size sz = views::View::GetPreferredSize();
« no previous file with comments | « chrome/browser/ui/views/extensions/extension_popup.h ('k') | chrome/browser/ui/views/extensions/extension_view_views.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698