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

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

Issue 6142013: Allow printing/saving a plugin through right click menu, even if it's in a fr... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 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
« no previous file with comments | « chrome/browser/ui/cocoa/menu_controller.mm ('k') | chrome/common/render_messages_internal.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 <map> 7 #include <map>
8 8
9 #include "base/i18n/rtl.h" 9 #include "base/i18n/rtl.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 716 matching lines...) Expand 10 before | Expand all | Expand 10 after
727 } 727 }
728 728
729 void MenuGtk::OnMenuShow(GtkWidget* widget) { 729 void MenuGtk::OnMenuShow(GtkWidget* widget) {
730 MessageLoop::current()->PostTask(FROM_HERE, 730 MessageLoop::current()->PostTask(FROM_HERE,
731 factory_.NewRunnableMethod(&MenuGtk::UpdateMenu)); 731 factory_.NewRunnableMethod(&MenuGtk::UpdateMenu));
732 } 732 }
733 733
734 void MenuGtk::OnMenuHidden(GtkWidget* widget) { 734 void MenuGtk::OnMenuHidden(GtkWidget* widget) {
735 if (delegate_) 735 if (delegate_)
736 delegate_->StoppedShowing(); 736 delegate_->StoppedShowing();
737 model_->MenuClosed();
737 } 738 }
738 739
739 // static 740 // static
740 void MenuGtk::SetButtonItemInfo(GtkWidget* button, gpointer userdata) { 741 void MenuGtk::SetButtonItemInfo(GtkWidget* button, gpointer userdata) {
741 ui::ButtonMenuItemModel* model = 742 ui::ButtonMenuItemModel* model =
742 reinterpret_cast<ui::ButtonMenuItemModel*>( 743 reinterpret_cast<ui::ButtonMenuItemModel*>(
743 g_object_get_data(G_OBJECT(button), "button-model")); 744 g_object_get_data(G_OBJECT(button), "button-model"));
744 int index = GPOINTER_TO_INT(g_object_get_data( 745 int index = GPOINTER_TO_INT(g_object_get_data(
745 G_OBJECT(button), "button-model-id")); 746 G_OBJECT(button), "button-model-id"));
746 747
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
831 gtk_widget_hide(widget); 832 gtk_widget_hide(widget);
832 } 833 }
833 834
834 GtkWidget* submenu = gtk_menu_item_get_submenu(GTK_MENU_ITEM(widget)); 835 GtkWidget* submenu = gtk_menu_item_get_submenu(GTK_MENU_ITEM(widget));
835 if (submenu) { 836 if (submenu) {
836 gtk_container_foreach(GTK_CONTAINER(submenu), &SetMenuItemInfo, 837 gtk_container_foreach(GTK_CONTAINER(submenu), &SetMenuItemInfo,
837 userdata); 838 userdata);
838 } 839 }
839 } 840 }
840 } 841 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/cocoa/menu_controller.mm ('k') | chrome/common/render_messages_internal.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698