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

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

Issue 10411010: [Gtk, WebIntents] Support autosizing of inline content. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years, 7 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/web_intent_picker_gtk.cc
diff --git a/chrome/browser/ui/gtk/web_intent_picker_gtk.cc b/chrome/browser/ui/gtk/web_intent_picker_gtk.cc
index aa74d13fdc5fb8c2715dc405d383d5f5be429a01..f80e6aaf7f70d3464f054d56c01c5e994690a406 100644
--- a/chrome/browser/ui/gtk/web_intent_picker_gtk.cc
+++ b/chrome/browser/ui/gtk/web_intent_picker_gtk.cc
@@ -242,7 +242,6 @@ void WebIntentPickerGtk::OnInlineDisposition(WebIntentPickerModel* model,
std::string());
// Replace the picker contents with the inline disposition.
-
gtk_util::RemoveAllChildren(contents_);
GtkWidget* service_hbox = gtk_hbox_new(FALSE, ui::kControlSpacing);
@@ -266,17 +265,24 @@ void WebIntentPickerGtk::OnInlineDisposition(WebIntentPickerModel* model,
// The separator between the icon/title/close and the inline renderer.
gtk_box_pack_start(GTK_BOX(vbox), gtk_hseparator_new(), FALSE, TRUE, 0);
- gtk_box_pack_end(GTK_BOX(vbox), tab_contents_container_->widget(),
- TRUE, TRUE, 0);
-
+ // hbox for the web contents, so we can have spacing on the borders.
+ GtkWidget* content_hbox_ = gtk_hbox_new(FALSE, ui::kControlSpacing);
Evan Stade 2012/05/18 20:35:19 use an alignment for this
groby-ooo-7-16 2012/05/18 21:07:22 Done.
+ gtk_box_pack_start(GTK_BOX(content_hbox_), tab_contents_container_->widget(),
+ TRUE, TRUE, ui::kControlSpacing);
+ gtk_box_pack_end(GTK_BOX(vbox), content_hbox_, TRUE, TRUE, 0);
gtk_container_add(GTK_CONTAINER(contents_), vbox);
- gfx::Size size = GetDefaultInlineDispositionSize(web_contents);
+ gfx::Size size = GetMinInlineDispositionSize();
gtk_widget_set_size_request(tab_contents_container_->widget(),
size.width(), size.height());
gtk_widget_show_all(contents_);
}
+void WebIntentPickerGtk::OnInlineDispositionAutoResize(const gfx::Size& size) {
+ gtk_widget_set_size_request(tab_contents_container_->widget(),
+ size.width(), size.height());
+}
+
GtkWidget* WebIntentPickerGtk::GetWidgetRoot() {
return contents_;
}
« no previous file with comments | « chrome/browser/ui/gtk/web_intent_picker_gtk.h ('k') | chrome/browser/ui/intents/web_intent_inline_disposition_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698