OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/gtk/menu_gtk.h" | 5 #include "chrome/browser/ui/gtk/menu_gtk.h" |
6 | 6 |
7 #include <map> | 7 #include <map> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/i18n/rtl.h" | 10 #include "base/i18n/rtl.h" |
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
125 return false; | 125 return false; |
126 } | 126 } |
127 | 127 |
128 GtkIconSet* MenuGtk::Delegate::GetIconSetForId(int idr) { return NULL; } | 128 GtkIconSet* MenuGtk::Delegate::GetIconSetForId(int idr) { return NULL; } |
129 | 129 |
130 GtkWidget* MenuGtk::Delegate::GetDefaultImageForCommandId(int command_id) { | 130 GtkWidget* MenuGtk::Delegate::GetDefaultImageForCommandId(int command_id) { |
131 const char* stock; | 131 const char* stock; |
132 switch (command_id) { | 132 switch (command_id) { |
133 case IDC_NEW_TAB: | 133 case IDC_NEW_TAB: |
134 case IDC_CONTENT_CONTEXT_OPENIMAGENEWTAB: | 134 case IDC_CONTENT_CONTEXT_OPENIMAGENEWTAB: |
| 135 case IDC_CONTENT_CONTEXT_SEARCHIMAGENEWTAB: |
135 case IDC_CONTENT_CONTEXT_OPENLINKNEWTAB: | 136 case IDC_CONTENT_CONTEXT_OPENLINKNEWTAB: |
136 case IDC_CONTENT_CONTEXT_OPENAVNEWTAB: | 137 case IDC_CONTENT_CONTEXT_OPENAVNEWTAB: |
137 stock = GTK_STOCK_NEW; | 138 stock = GTK_STOCK_NEW; |
138 break; | 139 break; |
139 | 140 |
140 case IDC_CLOSE_TAB: | 141 case IDC_CLOSE_TAB: |
141 stock = GTK_STOCK_CLOSE; | 142 stock = GTK_STOCK_CLOSE; |
142 break; | 143 break; |
143 | 144 |
144 case IDC_CONTENT_CONTEXT_SAVEIMAGEAS: | 145 case IDC_CONTENT_CONTEXT_SAVEIMAGEAS: |
(...skipping 799 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
944 gtk_widget_hide(widget); | 945 gtk_widget_hide(widget); |
945 } | 946 } |
946 | 947 |
947 GtkWidget* submenu = gtk_menu_item_get_submenu(GTK_MENU_ITEM(widget)); | 948 GtkWidget* submenu = gtk_menu_item_get_submenu(GTK_MENU_ITEM(widget)); |
948 if (submenu) { | 949 if (submenu) { |
949 gtk_container_foreach(GTK_CONTAINER(submenu), &SetMenuItemInfo, | 950 gtk_container_foreach(GTK_CONTAINER(submenu), &SetMenuItemInfo, |
950 userdata); | 951 userdata); |
951 } | 952 } |
952 } | 953 } |
953 } | 954 } |
OLD | NEW |