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

Unified Diff: chrome/browser/ui/gtk/constrained_web_dialog_delegate_gtk.cc

Issue 11280270: Remove TabContentsContainerGtk from ConstrainedWebDialogDelegateGtk. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/gtk/constrained_web_dialog_delegate_gtk.cc
diff --git a/chrome/browser/ui/gtk/constrained_web_dialog_delegate_gtk.cc b/chrome/browser/ui/gtk/constrained_web_dialog_delegate_gtk.cc
index 5b44e39a679ef010b46c92ea44f417212855bdeb..b249d7558ce1b6aecd646e3aa96b9fdd7efce6c3 100644
--- a/chrome/browser/ui/gtk/constrained_web_dialog_delegate_gtk.cc
+++ b/chrome/browser/ui/gtk/constrained_web_dialog_delegate_gtk.cc
@@ -5,11 +5,11 @@
#include "chrome/browser/ui/webui/constrained_web_dialog_delegate_base.h"
#include "chrome/browser/ui/gtk/constrained_window_gtk.h"
-#include "chrome/browser/ui/gtk/tab_contents_container_gtk.h"
#include "chrome/browser/ui/tab_contents/tab_contents.h"
#include "content/public/browser/notification_source.h"
#include "content/public/browser/render_view_host.h"
#include "content/public/browser/web_contents.h"
+#include "content/public/browser/web_contents_view.h"
#include "ui/base/gtk/gtk_hig_constants.h"
#include "ui/gfx/size.h"
#include "ui/web_dialogs/web_dialog_delegate.h"
@@ -56,7 +56,7 @@ class ConstrainedWebDialogDelegateGtk : public ConstrainedWindowGtkDelegate,
// ConstrainedWindowGtkDelegate interface
virtual GtkWidget* GetWidgetRoot() OVERRIDE {
- return tab_contents_container_.widget();
+ return tab()->web_contents()->GetView()->GetNativeView();
}
virtual GtkWidget* GetFocusWidget() OVERRIDE {
return tab()->web_contents()->GetContentNativeView();
@@ -74,8 +74,6 @@ class ConstrainedWebDialogDelegateGtk : public ConstrainedWindowGtkDelegate,
private:
scoped_ptr<ConstrainedWebDialogDelegateBase> impl_;
- TabContentsContainerGtk tab_contents_container_;
-
DISALLOW_COPY_AND_ASSIGN(ConstrainedWebDialogDelegateGtk);
};
@@ -83,13 +81,11 @@ ConstrainedWebDialogDelegateGtk::ConstrainedWebDialogDelegateGtk(
Profile* profile,
WebDialogDelegate* delegate,
WebDialogWebContentsDelegate* tab_delegate)
- : impl_(new ConstrainedWebDialogDelegateBase(profile, delegate, tab_delegate)),
- tab_contents_container_(NULL) {
- tab_contents_container_.SetTab(tab());
-
+ : impl_(new ConstrainedWebDialogDelegateBase(
+ profile, delegate, tab_delegate)) {
gfx::Size dialog_size;
delegate->GetDialogSize(&dialog_size);
- gtk_widget_set_size_request(GTK_WIDGET(tab_contents_container_.widget()),
+ gtk_widget_set_size_request(GTK_WIDGET(GetWidgetRoot()),
dialog_size.width(),
dialog_size.height());
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698