| 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 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 77 NotificationRegistrar registrar_; | 77 NotificationRegistrar registrar_; |
| 78 | 78 |
| 79 // Our menu bar widget. | 79 // Our menu bar widget. |
| 80 OwnedWidgetGtk menu_bar_; | 80 OwnedWidgetGtk menu_bar_; |
| 81 | 81 |
| 82 // Listens to the TabRestoreService and the HistoryService and keeps the | 82 // Listens to the TabRestoreService and the HistoryService and keeps the |
| 83 // history menu fresh. | 83 // history menu fresh. |
| 84 GlobalHistoryMenu history_menu_; | 84 GlobalHistoryMenu history_menu_; |
| 85 | 85 |
| 86 // Listens to the bookmark model and updates the menu. | 86 // Listens to the bookmark model and updates the menu. |
| 87 GlobalBookmarkMenu bookmark_menu_; | 87 scoped_ptr<GlobalBookmarkMenu> bookmark_menu_; |
| 88 | 88 |
| 89 // For some menu items, we want to show the accelerator, but not actually | 89 // For some menu items, we want to show the accelerator, but not actually |
| 90 // explicitly handle it. To this end we connect those menu items' accelerators | 90 // explicitly handle it. To this end we connect those menu items' accelerators |
| 91 // to this group, but don't attach this group to any top level window. | 91 // to this group, but don't attach this group to any top level window. |
| 92 GtkAccelGroup* dummy_accel_group_; | 92 GtkAccelGroup* dummy_accel_group_; |
| 93 | 93 |
| 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 |