Chromium Code Reviews| Index: content/shell/shell_gtk.cc |
| diff --git a/content/shell/shell_gtk.cc b/content/shell/shell_gtk.cc |
| index 22d6b330484c30c9fdd06899f3234041727b582b..8dc187b65ef14a771c8e0587610011bb18a2ed05 100644 |
| --- a/content/shell/shell_gtk.cc |
| +++ b/content/shell/shell_gtk.cc |
| @@ -101,16 +101,18 @@ void Shell::PlatformSetIsLoading(bool loading) { |
| } |
| void Shell::PlatformCreateWindow(int width, int height) { |
| + |
| + if (!headless_) { |
| + window_ = GTK_WINDOW(gtk_window_new(GTK_WINDOW_TOPLEVEL)); |
| + gtk_window_set_title(window_, "Content Shell"); |
| + g_signal_connect(G_OBJECT(window_), "destroy", |
| + G_CALLBACK(OnWindowDestroyedThunk), this); |
| + } |
| SizeTo(width, height); |
| if (headless_) |
| return; |
| - window_ = GTK_WINDOW(gtk_window_new(GTK_WINDOW_TOPLEVEL)); |
| - gtk_window_set_title(window_, "Content Shell"); |
| - g_signal_connect(G_OBJECT(window_), "destroy", |
| - G_CALLBACK(OnWindowDestroyedThunk), this); |
| - |
| vbox_ = gtk_vbox_new(FALSE, 0); |
| // Create the menu bar. |
| @@ -209,10 +211,8 @@ void Shell::PlatformSetContents() { |
| void Shell::SizeTo(int width, int height) { |
| content_width_ = width; |
| content_height_ = height; |
| - if (web_contents_) { |
| - gtk_widget_set_size_request(web_contents_->GetView()->GetNativeView(), |
| - width, height); |
| - } |
| + if (window_) |
| + gtk_window_resize(window_, width, height); |
|
jochen (gone - plz use gerrit)
2013/05/14 07:25:33
this will break headless mode where window_ is alw
mstensho (USE GERRIT)
2013/05/14 09:28:24
So would the right thing be to keep the old code f
jochen (gone - plz use gerrit)
2013/05/14 09:31:39
Not sure. We always want the native view to be the
mstensho (USE GERRIT)
2013/05/14 09:40:16
I'm sorry, I don't understand. Can you provide me
|
| } |
| void Shell::PlatformResizeSubViews() { |