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

Unified Diff: chrome/browser/ui/cocoa/extensions/extension_view_mac.mm

Issue 10913243: extensions: Add ExtensionView interface. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: add GetNativeView to interface, will override it later 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/cocoa/extensions/extension_view_mac.mm
diff --git a/chrome/browser/ui/cocoa/extensions/extension_view_mac.mm b/chrome/browser/ui/cocoa/extensions/extension_view_mac.mm
index 642face2872681e82b47f115c9d81cb2dd81c263..760ef07be26685f8fc27e1ac61447509c5ed8dc6 100644
--- a/chrome/browser/ui/cocoa/extensions/extension_view_mac.mm
+++ b/chrome/browser/ui/cocoa/extensions/extension_view_mac.mm
@@ -43,10 +43,6 @@ content::RenderViewHost* ExtensionViewMac::render_view_host() const {
return extension_host_->render_view_host();
}
-void ExtensionViewMac::DidStopLoading() {
- ShowIfCompletelyLoaded();
-}
-
void ExtensionViewMac::SetBackground(const SkBitmap& background) {
if (!pending_background_.empty() && render_view_host()->GetView()) {
render_view_host()->GetView()->SetBackground(background);
@@ -56,6 +52,14 @@ void ExtensionViewMac::SetBackground(const SkBitmap& background) {
ShowIfCompletelyLoaded();
}
+Browser* ExtensionViewMac::GetBrowser() {
+ return browser_;
+}
+
+const Browser* ExtensionViewMac::GetBrowser() const {
+ return browser_;
+}
+
void ExtensionViewMac::ResizeDueToAutoResize(const gfx::Size& new_size) {
if (container_)
container_->OnExtensionSizeChanged(this, new_size);
@@ -77,6 +81,10 @@ void ExtensionViewMac::RenderViewCreated() {
}
}
+void ExtensionViewMac::DidStopLoading() {
+ ShowIfCompletelyLoaded();
+}
+
void ExtensionViewMac::WindowFrameChanged() {
if (render_view_host()->GetView())
render_view_host()->GetView()->WindowFrameChanged();
@@ -95,3 +103,11 @@ void ExtensionViewMac::ShowIfCompletelyLoaded() {
container_->OnExtensionViewDidShow(this);
}
}
+
+// static
+ExtensionView* ExtensionView::Create(extensions::ExtensionHost* host,
+ Browser* browser) {
+ ExtensionViewMac* extension_view = new ExtensionViewMac(host, browser);
+ extension_view->Init();
+ return extension_view;
+}

Powered by Google App Engine
This is Rietveld 408576698