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

Side by Side Diff: chrome/browser/ui/views/frame/global_menu_bar_x11.cc

Issue 1130753007: Start axing NTP4 dead code. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: estade@ review Created 5 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 unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/ui/views/frame/global_menu_bar_x11.h" 5 #include "chrome/browser/ui/views/frame/global_menu_bar_x11.h"
6 6
7 #include <dlfcn.h> 7 #include <dlfcn.h>
8 #include <glib-object.h> 8 #include <glib-object.h>
9 9
10 #include "base/debug/leak_annotations.h" 10 #include "base/debug/leak_annotations.h"
(...skipping 744 matching lines...) Expand 10 before | Expand all | Expand 10 after
755 static_cast<TabRestoreService::Window*>(entry); 755 static_cast<TabRestoreService::Window*>(entry);
756 std::vector<TabRestoreService::Tab>& tabs = entry_win->tabs; 756 std::vector<TabRestoreService::Tab>& tabs = entry_win->tabs;
757 if (tabs.empty()) 757 if (tabs.empty())
758 continue; 758 continue;
759 759
760 // Create the item for the parent/window. 760 // Create the item for the parent/window.
761 HistoryItem* item = new HistoryItem(); 761 HistoryItem* item = new HistoryItem();
762 item->session_id = entry_win->id; 762 item->session_id = entry_win->id;
763 763
764 std::string title = l10n_util::GetPluralStringFUTF8( 764 std::string title = l10n_util::GetPluralStringFUTF8(
765 IDS_NEW_TAB_RECENTLY_CLOSED_WINDOW, tabs.size()); 765 IDS_RECENTLY_CLOSED_WINDOW, tabs.size());
766 DbusmenuMenuitem* parent_item = BuildMenuItem( 766 DbusmenuMenuitem* parent_item = BuildMenuItem(
767 title, TAG_RECENTLY_CLOSED); 767 title, TAG_RECENTLY_CLOSED);
768 menuitem_child_add_position(history_menu_, parent_item, index++); 768 menuitem_child_add_position(history_menu_, parent_item, index++);
769 g_object_unref(parent_item); 769 g_object_unref(parent_item);
770 770
771 // The mac version of this code allows the user to click on the parent 771 // The mac version of this code allows the user to click on the parent
772 // menu item to have the same effect as clicking the restore window 772 // menu item to have the same effect as clicking the restore window
773 // submenu item. GTK+ helpfully activates a menu item when it shows a 773 // submenu item. GTK+ helpfully activates a menu item when it shows a
774 // submenu so toss that feature out. 774 // submenu so toss that feature out.
775 DbusmenuMenuitem* restore_item = BuildMenuItem( 775 DbusmenuMenuitem* restore_item = BuildMenuItem(
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
887 int id = GPOINTER_TO_INT(g_object_get_data(G_OBJECT(sender), kProfileId)); 887 int id = GPOINTER_TO_INT(g_object_get_data(G_OBJECT(sender), kProfileId));
888 avatar_menu_->EditProfile(id); 888 avatar_menu_->EditProfile(id);
889 } 889 }
890 890
891 void GlobalMenuBarX11::OnCreateProfileItemActivated(DbusmenuMenuitem* sender, 891 void GlobalMenuBarX11::OnCreateProfileItemActivated(DbusmenuMenuitem* sender,
892 unsigned int timestamp) { 892 unsigned int timestamp) {
893 profiles::CreateAndSwitchToNewProfile(chrome::HOST_DESKTOP_TYPE_NATIVE, 893 profiles::CreateAndSwitchToNewProfile(chrome::HOST_DESKTOP_TYPE_NATIVE,
894 ProfileManager::CreateCallback(), 894 ProfileManager::CreateCallback(),
895 ProfileMetrics::ADD_NEW_USER_MENU); 895 ProfileMetrics::ADD_NEW_USER_MENU);
896 } 896 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/toolbar/recent_tabs_sub_menu_model.cc ('k') | chrome/browser/ui/webui/app_launcher_page_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698