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

Unified Diff: chrome/browser/gtk/browser_toolbar_gtk.cc

Issue 244029: GTK: Implement popup favicon menu. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 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
« no previous file with comments | « chrome/browser/gtk/browser_toolbar_gtk.h ('k') | chrome/browser/gtk/standard_menus.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/gtk/browser_toolbar_gtk.cc
===================================================================
--- chrome/browser/gtk/browser_toolbar_gtk.cc (revision 27516)
+++ chrome/browser/gtk/browser_toolbar_gtk.cc (working copy)
@@ -103,33 +103,6 @@
g_object_unref(accel_group_);
}
-// Construct an "encodings" menu based on profile settings.
-static MenuGtk* BuildEncodingsMenu(Profile* profile,
- MenuGtk::Delegate* delegate) {
- EncodingMenuController controller;
- EncodingMenuController::EncodingMenuItemList items;
- controller.GetEncodingMenuItems(profile, &items);
-
- MenuGtk* menu = new MenuGtk(delegate, false);
- GSList* radio_group = NULL;
- for (EncodingMenuController::EncodingMenuItemList::const_iterator i =
- items.begin();
- i != items.end(); ++i) {
- if (i == items.begin()) {
- menu->AppendCheckMenuItemWithLabel(i->first, UTF16ToUTF8(i->second));
- } else if (i->first == 0) {
- menu->AppendSeparator();
- } else {
- GtkWidget* item =
- gtk_radio_menu_item_new_with_label(radio_group,
- UTF16ToUTF8(i->second).c_str());
- radio_group = gtk_radio_menu_item_get_group(GTK_RADIO_MENU_ITEM(item));
- menu->AppendMenuItem(i->first, item);
- }
- }
- return menu;
-}
-
void BrowserToolbarGtk::Init(Profile* profile,
GtkWindow* top_level_window) {
// Make sure to tell the location bar the profile before calling its Init.
@@ -222,8 +195,7 @@
theme_provider_->GetRTLEnabledPixbufNamed(IDR_MENU_PAGE));
gtk_container_add(GTK_CONTAINER(page_menu), page_menu_image_);
- encodings_menu_.reset(BuildEncodingsMenu(profile, this));
- page_menu_.reset(new MenuGtk(this, GetStandardPageMenu(encodings_menu_.get()),
+ page_menu_.reset(new MenuGtk(this, GetStandardPageMenu(profile_, this),
accel_group_));
gtk_box_pack_start(GTK_BOX(menus_hbox_), page_menu, FALSE, FALSE, 0);
« no previous file with comments | « chrome/browser/gtk/browser_toolbar_gtk.h ('k') | chrome/browser/gtk/standard_menus.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698