OLD | NEW |
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 #ifndef CHROME_BROWSER_UI_GTK_GLOBAL_MENU_BAR_H_ | 5 #ifndef CHROME_BROWSER_UI_GTK_GLOBAL_MENU_BAR_H_ |
6 #define CHROME_BROWSER_UI_GTK_GLOBAL_MENU_BAR_H_ | 6 #define CHROME_BROWSER_UI_GTK_GLOBAL_MENU_BAR_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 | 9 |
10 #include "chrome/browser/command_updater.h" | 10 #include "chrome/browser/command_updater.h" |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
58 GtkWidget* BuildMenuItem(int string_id, | 58 GtkWidget* BuildMenuItem(int string_id, |
59 int command_id, | 59 int command_id, |
60 int tag_id, | 60 int tag_id, |
61 std::map<int, GtkWidget*>* id_to_menu_item, | 61 std::map<int, GtkWidget*>* id_to_menu_item, |
62 GtkWidget* menu_to_add_to); | 62 GtkWidget* menu_to_add_to); |
63 | 63 |
64 // CommandUpdater::CommandObserver: | 64 // CommandUpdater::CommandObserver: |
65 virtual void EnabledStateChangedForCommand(int id, bool enabled); | 65 virtual void EnabledStateChangedForCommand(int id, bool enabled); |
66 | 66 |
67 // NotificationObserver: | 67 // NotificationObserver: |
68 virtual void Observe(NotificationType type, | 68 virtual void Observe(int type, |
69 const NotificationSource& source, | 69 const NotificationSource& source, |
70 const NotificationDetails& details); | 70 const NotificationDetails& details); |
71 | 71 |
72 CHROMEGTK_CALLBACK_0(GlobalMenuBar, void, OnItemActivated); | 72 CHROMEGTK_CALLBACK_0(GlobalMenuBar, void, OnItemActivated); |
73 | 73 |
74 Browser* browser_; | 74 Browser* browser_; |
75 Profile* profile_; | 75 Profile* profile_; |
76 | 76 |
77 NotificationRegistrar registrar_; | 77 NotificationRegistrar registrar_; |
78 | 78 |
(...skipping 15 matching lines...) Expand all Loading... |
94 // A mapping from command ids to GtkMenuItem objects. We use this to update | 94 // A mapping from command ids to GtkMenuItem objects. We use this to update |
95 // the command enable state. | 95 // the command enable state. |
96 CommandIDMenuItemMap id_to_menu_item_; | 96 CommandIDMenuItemMap id_to_menu_item_; |
97 | 97 |
98 // gtk_check_menu_item_set_active() will call the "activate" signal. We need | 98 // gtk_check_menu_item_set_active() will call the "activate" signal. We need |
99 // to block this activation while we change the checked state. | 99 // to block this activation while we change the checked state. |
100 bool block_activation_; | 100 bool block_activation_; |
101 }; | 101 }; |
102 | 102 |
103 #endif // CHROME_BROWSER_UI_GTK_GLOBAL_MENU_BAR_H_ | 103 #endif // CHROME_BROWSER_UI_GTK_GLOBAL_MENU_BAR_H_ |
OLD | NEW |