OLD | NEW |
1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 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/toolbar/recent_tabs_sub_menu_model.h" | 5 #include "chrome/browser/ui/toolbar/recent_tabs_sub_menu_model.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/metrics/histogram_macros.h" | 10 #include "base/metrics/histogram_macros.h" |
(...skipping 28 matching lines...) Expand all Loading... |
39 #include "ui/base/resource/resource_bundle.h" | 39 #include "ui/base/resource/resource_bundle.h" |
40 #include "ui/resources/grit/ui_resources.h" | 40 #include "ui/resources/grit/ui_resources.h" |
41 | 41 |
42 #if !defined(OS_MACOSX) | 42 #if !defined(OS_MACOSX) |
43 #include "chrome/app/vector_icons/vector_icons.h" | 43 #include "chrome/app/vector_icons/vector_icons.h" |
44 #include "ui/gfx/color_palette.h" | 44 #include "ui/gfx/color_palette.h" |
45 #include "ui/gfx/paint_vector_icon.h" | 45 #include "ui/gfx/paint_vector_icon.h" |
46 #endif | 46 #endif |
47 | 47 |
48 #if defined(USE_ASH) | 48 #if defined(USE_ASH) |
49 #include "ash/common/accelerators/accelerator_table.h" // nogncheck | 49 #include "ash/accelerators/accelerator_table.h" // nogncheck |
50 #endif // defined(USE_ASH) | 50 #endif // defined(USE_ASH) |
51 | 51 |
52 namespace { | 52 namespace { |
53 | 53 |
54 // Initial comamnd ID's for navigatable (and hence executable) tab/window menu | 54 // Initial comamnd ID's for navigatable (and hence executable) tab/window menu |
55 // items. The menumodel and storage structures are not 1-1: | 55 // items. The menumodel and storage structures are not 1-1: |
56 // - menumodel has "Recently closed" header, "No tabs from other devices", | 56 // - menumodel has "Recently closed" header, "No tabs from other devices", |
57 // device section headers, separators, local and other devices' tab items, and | 57 // device section headers, separators, local and other devices' tab items, and |
58 // local window items. | 58 // local window items. |
59 // - |local_tab_navigation_items_| and |other_devices_tab_navigation_items_| | 59 // - |local_tab_navigation_items_| and |other_devices_tab_navigation_items_| |
(...skipping 669 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
729 | 729 |
730 ui::MenuModelDelegate* menu_model_delegate = GetMenuModelDelegate(); | 730 ui::MenuModelDelegate* menu_model_delegate = GetMenuModelDelegate(); |
731 if (menu_model_delegate) | 731 if (menu_model_delegate) |
732 menu_model_delegate->OnMenuStructureChanged(); | 732 menu_model_delegate->OnMenuStructureChanged(); |
733 } | 733 } |
734 | 734 |
735 void RecentTabsSubMenuModel::TabRestoreServiceDestroyed( | 735 void RecentTabsSubMenuModel::TabRestoreServiceDestroyed( |
736 sessions::TabRestoreService* service) { | 736 sessions::TabRestoreService* service) { |
737 TabRestoreServiceChanged(service); | 737 TabRestoreServiceChanged(service); |
738 } | 738 } |
OLD | NEW |