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

Side by Side Diff: chrome/browser/ui/gtk/menu_gtk.cc

Issue 12036003: Move window_open_disposition.h from webkit/ into ui/base. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix win Created 7 years, 11 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 | Annotate | Revision Log
OLDNEW
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"
11 #include "base/logging.h" 11 #include "base/logging.h"
12 #include "base/message_loop.h" 12 #include "base/message_loop.h"
13 #include "base/stl_util.h" 13 #include "base/stl_util.h"
14 #include "base/utf_string_conversions.h" 14 #include "base/utf_string_conversions.h"
15 #include "chrome/app/chrome_command_ids.h" 15 #include "chrome/app/chrome_command_ids.h"
16 #include "chrome/browser/ui/gtk/event_utils.h" 16 #include "chrome/browser/ui/gtk/event_utils.h"
17 #include "chrome/browser/ui/gtk/gtk_custom_menu.h" 17 #include "chrome/browser/ui/gtk/gtk_custom_menu.h"
18 #include "chrome/browser/ui/gtk/gtk_custom_menu_item.h" 18 #include "chrome/browser/ui/gtk/gtk_custom_menu_item.h"
19 #include "chrome/browser/ui/gtk/gtk_util.h" 19 #include "chrome/browser/ui/gtk/gtk_util.h"
20 #include "third_party/skia/include/core/SkBitmap.h" 20 #include "third_party/skia/include/core/SkBitmap.h"
21 #include "ui/base/accelerators/platform_accelerator_gtk.h" 21 #include "ui/base/accelerators/platform_accelerator_gtk.h"
22 #include "ui/base/gtk/menu_label_accelerator_util.h" 22 #include "ui/base/gtk/menu_label_accelerator_util.h"
23 #include "ui/base/models/button_menu_item_model.h" 23 #include "ui/base/models/button_menu_item_model.h"
24 #include "ui/base/models/menu_model.h" 24 #include "ui/base/models/menu_model.h"
25 #include "ui/base/window_open_disposition.h"
25 #include "ui/gfx/gtk_util.h" 26 #include "ui/gfx/gtk_util.h"
26 #include "ui/gfx/image/image.h" 27 #include "ui/gfx/image/image.h"
27 #include "webkit/glue/window_open_disposition.h"
28 28
29 bool MenuGtk::block_activation_ = false; 29 bool MenuGtk::block_activation_ = false;
30 30
31 namespace { 31 namespace {
32 32
33 // Sets the ID of a menu item. 33 // Sets the ID of a menu item.
34 void SetMenuItemID(GtkWidget* menu_item, int menu_id) { 34 void SetMenuItemID(GtkWidget* menu_item, int menu_id) {
35 DCHECK_GE(menu_id, 0); 35 DCHECK_GE(menu_id, 0);
36 36
37 // Add 1 to the menu_id to avoid setting zero (null) to "menu-id". 37 // Add 1 to the menu_id to avoid setting zero (null) to "menu-id".
(...skipping 907 matching lines...) Expand 10 before | Expand all | Expand 10 after
945 gtk_widget_hide(widget); 945 gtk_widget_hide(widget);
946 } 946 }
947 947
948 GtkWidget* submenu = gtk_menu_item_get_submenu(GTK_MENU_ITEM(widget)); 948 GtkWidget* submenu = gtk_menu_item_get_submenu(GTK_MENU_ITEM(widget));
949 if (submenu) { 949 if (submenu) {
950 gtk_container_foreach(GTK_CONTAINER(submenu), &SetMenuItemInfo, 950 gtk_container_foreach(GTK_CONTAINER(submenu), &SetMenuItemInfo,
951 userdata); 951 userdata);
952 } 952 }
953 } 953 }
954 } 954 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/gtk/location_bar_view_gtk.cc ('k') | chrome/browser/ui/gtk/omnibox/omnibox_popup_view_gtk.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698