| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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/gtk/menu_gtk.h" | 5 #include "chrome/browser/gtk/menu_gtk.h" |
| 6 | 6 |
| 7 #include "app/l10n_util.h" | 7 #include "app/l10n_util.h" |
| 8 #include "base/logging.h" | 8 #include "base/logging.h" |
| 9 #include "base/stl_util-inl.h" | 9 #include "base/stl_util-inl.h" |
| 10 #include "base/string_util.h" | 10 #include "base/string_util.h" |
| 11 #include "chrome/common/gtk_util.h" | 11 #include "chrome/common/gtk_util.h" |
| 12 #include "skia/include/SkBitmap.h" | 12 #include "third_party/skia/include/core/SkBitmap.h" |
| 13 | 13 |
| 14 namespace { | 14 namespace { |
| 15 | 15 |
| 16 struct SetIconState { | 16 struct SetIconState { |
| 17 bool found; | 17 bool found; |
| 18 const SkBitmap* icon; | 18 const SkBitmap* icon; |
| 19 int id; | 19 int id; |
| 20 }; | 20 }; |
| 21 | 21 |
| 22 void SetIconImpl(GtkWidget* widget, void* raw) { | 22 void SetIconImpl(GtkWidget* widget, void* raw) { |
| (...skipping 341 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 364 gtk_widget_set_sensitive( | 364 gtk_widget_set_sensitive( |
| 365 widget, menu->delegate_->IsCommandEnabled(id)); | 365 widget, menu->delegate_->IsCommandEnabled(id)); |
| 366 | 366 |
| 367 GtkWidget* submenu = gtk_menu_item_get_submenu(GTK_MENU_ITEM(widget)); | 367 GtkWidget* submenu = gtk_menu_item_get_submenu(GTK_MENU_ITEM(widget)); |
| 368 if (submenu) { | 368 if (submenu) { |
| 369 gtk_container_foreach(GTK_CONTAINER(submenu), &SetMenuItemInfo, | 369 gtk_container_foreach(GTK_CONTAINER(submenu), &SetMenuItemInfo, |
| 370 userdata); | 370 userdata); |
| 371 } | 371 } |
| 372 } | 372 } |
| 373 } | 373 } |
| OLD | NEW |