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

Unified Diff: chrome/browser/ui/gtk/extensions/extension_popup_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_popup_gtk.cc
===================================================================
--- chrome/browser/ui/gtk/extensions/extension_popup_gtk.cc (revision 158218)
+++ chrome/browser/ui/gtk/extensions/extension_popup_gtk.cc (working copy)
@@ -16,7 +16,6 @@
#include "chrome/browser/debugger/devtools_window.h"
#include "chrome/browser/extensions/extension_host.h"
#include "chrome/browser/extensions/extension_process_manager.h"
-#include "chrome/browser/extensions/extension_view.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/browser_window.h"
@@ -49,7 +48,7 @@
host_(host),
anchor_(anchor),
weak_factory_(this) {
- host_->GetExtensionView()->SetContainer(this);
+ host_->view()->SetContainer(this);
being_inspected_ = show_action == SHOW_AND_INSPECT;
// If the host had somehow finished loading, then we'd miss the notification
@@ -139,18 +138,16 @@
delete this;
}
-void ExtensionPopupGtk::OnExtensionSizeChanged(ExtensionView* view,
- const gfx::Size& new_size) {
+void ExtensionPopupGtk::OnExtensionSizeChanged(
+ ExtensionViewGtk* view,
+ const gfx::Size& new_size) {
int width = std::max(kMinWidth, std::min(kMaxWidth, new_size.width()));
int height = std::max(kMinHeight, std::min(kMaxHeight, new_size.height()));
- view->GetRenderViewHost()->GetView()->SetSize(gfx::Size(width, height));
- gtk_widget_set_size_request(view->GetNativeView(), width, height);
+ view->render_view_host()->GetView()->SetSize(gfx::Size(width, height));
+ gtk_widget_set_size_request(view->native_view(), width, height);
}
-void ExtensionPopupGtk::OnExtensionViewDidShow(ExtensionView* view) {
-}
-
bool ExtensionPopupGtk::DestroyPopup() {
if (!bubble_) {
NOTREACHED();
@@ -182,8 +179,7 @@
// This border is necessary so the bubble's corners do not get cut off by the
// render view.
gtk_container_set_border_width(GTK_CONTAINER(border_box), 2);
- gtk_container_add(GTK_CONTAINER(border_box),
- host_->GetExtensionView()->GetNativeView());
+ gtk_container_add(GTK_CONTAINER(border_box), host_->view()->native_view());
// We'll be in the upper-right corner of the window for LTR languages, so we
// want to put the arrow at the upper-right corner of the bubble to match the
@@ -208,7 +204,6 @@
gfx::Rect ExtensionPopupGtk::GetViewBounds() {
GtkAllocation allocation;
- gtk_widget_get_allocation(host_->GetExtensionView()->GetNativeView(),
- &allocation);
+ gtk_widget_get_allocation(host_->view()->native_view(), &allocation);
return gfx::Rect(allocation);
}
« no previous file with comments | « chrome/browser/ui/gtk/extensions/extension_popup_gtk.h ('k') | chrome/browser/ui/gtk/extensions/extension_view_gtk.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698