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

Unified Diff: chrome/browser/ui/gtk/extensions/extension_view_gtk.cc

Issue 10961066: Revert 158199 - extensions: Add ExtensionView interface. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: 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/gtk/extensions/extension_view_gtk.cc
===================================================================
--- chrome/browser/ui/gtk/extensions/extension_view_gtk.cc (revision 158218)
+++ chrome/browser/ui/gtk/extensions/extension_view_gtk.cc (working copy)
@@ -19,40 +19,24 @@
container_(NULL) {
}
-ExtensionViewGtk::~ExtensionViewGtk() {
-}
-
void ExtensionViewGtk::Init() {
CreateWidgetHostView();
}
-void ExtensionViewGtk::SetBackground(const SkBitmap& background) {
- if (GetRenderViewHost()->IsRenderViewLive() &&
- GetRenderViewHost()->GetView()) {
- GetRenderViewHost()->GetView()->SetBackground(background);
- } else {
- pending_background_ = background;
- }
-}
-
-Browser* ExtensionViewGtk::GetBrowser() {
- return browser_;
-}
-
-const Browser* ExtensionViewGtk::GetBrowser() const {
- return browser_;
-}
-
-gfx::NativeView ExtensionViewGtk::GetNativeView() {
+gfx::NativeView ExtensionViewGtk::native_view() {
return extension_host_->host_contents()->GetView()->GetNativeView();
}
-content::RenderViewHost* ExtensionViewGtk::GetRenderViewHost() const {
+content::RenderViewHost* ExtensionViewGtk::render_view_host() const {
return extension_host_->render_view_host();
}
-void ExtensionViewGtk::SetContainer(ExtensionViewContainer* container) {
- container_ = container;
+void ExtensionViewGtk::SetBackground(const SkBitmap& background) {
+ if (render_view_host()->IsRenderViewLive() && render_view_host()->GetView()) {
+ render_view_host()->GetView()->SetBackground(background);
+ } else {
+ pending_background_ = background;
+ }
}
void ExtensionViewGtk::ResizeDueToAutoResize(const gfx::Size& new_size) {
@@ -60,9 +44,13 @@
container_->OnExtensionSizeChanged(this, new_size);
}
+void ExtensionViewGtk::CreateWidgetHostView() {
+ extension_host_->CreateRenderViewSoon();
+}
+
void ExtensionViewGtk::RenderViewCreated() {
- if (!pending_background_.empty() && GetRenderViewHost()->GetView()) {
- GetRenderViewHost()->GetView()->SetBackground(pending_background_);
+ if (!pending_background_.empty() && render_view_host()->GetView()) {
+ render_view_host()->GetView()->SetBackground(pending_background_);
pending_background_.reset();
}
@@ -72,26 +60,6 @@
ExtensionPopupGtk::kMinHeight);
gfx::Size max_size(ExtensionPopupGtk::kMaxWidth,
ExtensionPopupGtk::kMaxHeight);
- GetRenderViewHost()->EnableAutoResize(min_size, max_size);
+ render_view_host()->EnableAutoResize(min_size, max_size);
}
}
-
-void ExtensionViewGtk::DidStopLoading() {
- NOTIMPLEMENTED();
-}
-
-void ExtensionViewGtk::WindowFrameChanged() {
- NOTIMPLEMENTED();
-}
-
-void ExtensionViewGtk::CreateWidgetHostView() {
- extension_host_->CreateRenderViewSoon();
-}
-
-// static
-ExtensionView* ExtensionView::Create(extensions::ExtensionHost* host,
- Browser* browser) {
- ExtensionViewGtk* extension_view = new ExtensionViewGtk(host, browser);
- extension_view->Init();
- return extension_view;
-}
« no previous file with comments | « chrome/browser/ui/gtk/extensions/extension_view_gtk.h ('k') | chrome/browser/ui/gtk/extensions/shell_window_gtk.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698