Commit 029ad61e authored by avi@chromium.org's avatar avi@chromium.org

Remove TabContentsContainerGtk from ConstrainedWebDialogDelegateGtk.

BUG=107201
TEST=no visible change


Review URL: https://chromiumcodereview.appspot.com/11280270

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@170823 0039d316-1c4b-4281-b951-d872f2087c98
parent dba4f248
...@@ -5,11 +5,11 @@ ...@@ -5,11 +5,11 @@
#include "chrome/browser/ui/webui/constrained_web_dialog_delegate_base.h" #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/constrained_window_gtk.h"
#include "chrome/browser/ui/gtk/tab_contents_container_gtk.h"
#include "chrome/browser/ui/tab_contents/tab_contents.h" #include "chrome/browser/ui/tab_contents/tab_contents.h"
#include "content/public/browser/notification_source.h" #include "content/public/browser/notification_source.h"
#include "content/public/browser/render_view_host.h" #include "content/public/browser/render_view_host.h"
#include "content/public/browser/web_contents.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/base/gtk/gtk_hig_constants.h"
#include "ui/gfx/size.h" #include "ui/gfx/size.h"
#include "ui/web_dialogs/web_dialog_delegate.h" #include "ui/web_dialogs/web_dialog_delegate.h"
...@@ -56,7 +56,7 @@ class ConstrainedWebDialogDelegateGtk : public ConstrainedWindowGtkDelegate, ...@@ -56,7 +56,7 @@ class ConstrainedWebDialogDelegateGtk : public ConstrainedWindowGtkDelegate,
// ConstrainedWindowGtkDelegate interface // ConstrainedWindowGtkDelegate interface
virtual GtkWidget* GetWidgetRoot() OVERRIDE { virtual GtkWidget* GetWidgetRoot() OVERRIDE {
return tab_contents_container_.widget(); return tab()->web_contents()->GetView()->GetNativeView();
} }
virtual GtkWidget* GetFocusWidget() OVERRIDE { virtual GtkWidget* GetFocusWidget() OVERRIDE {
return tab()->web_contents()->GetContentNativeView(); return tab()->web_contents()->GetContentNativeView();
...@@ -74,8 +74,6 @@ class ConstrainedWebDialogDelegateGtk : public ConstrainedWindowGtkDelegate, ...@@ -74,8 +74,6 @@ class ConstrainedWebDialogDelegateGtk : public ConstrainedWindowGtkDelegate,
private: private:
scoped_ptr<ConstrainedWebDialogDelegateBase> impl_; scoped_ptr<ConstrainedWebDialogDelegateBase> impl_;
TabContentsContainerGtk tab_contents_container_;
DISALLOW_COPY_AND_ASSIGN(ConstrainedWebDialogDelegateGtk); DISALLOW_COPY_AND_ASSIGN(ConstrainedWebDialogDelegateGtk);
}; };
...@@ -83,13 +81,11 @@ ConstrainedWebDialogDelegateGtk::ConstrainedWebDialogDelegateGtk( ...@@ -83,13 +81,11 @@ ConstrainedWebDialogDelegateGtk::ConstrainedWebDialogDelegateGtk(
Profile* profile, Profile* profile,
WebDialogDelegate* delegate, WebDialogDelegate* delegate,
WebDialogWebContentsDelegate* tab_delegate) WebDialogWebContentsDelegate* tab_delegate)
: impl_(new ConstrainedWebDialogDelegateBase(profile, delegate, tab_delegate)), : impl_(new ConstrainedWebDialogDelegateBase(
tab_contents_container_(NULL) { profile, delegate, tab_delegate)) {
tab_contents_container_.SetTab(tab());
gfx::Size dialog_size; gfx::Size dialog_size;
delegate->GetDialogSize(&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.width(),
dialog_size.height()); dialog_size.height());
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment