| 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.h" | 10 #include "base/metrics/histogram.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 "ui/gfx/color_palette.h" | 43 #include "ui/gfx/color_palette.h" |
| 44 #include "ui/gfx/paint_vector_icon.h" | 44 #include "ui/gfx/paint_vector_icon.h" |
| 45 #include "ui/gfx/vector_icons_public.h" | 45 #include "ui/gfx/vector_icons_public.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" | 49 #include "ash/common/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 665 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 725 | 725 |
| 726 ui::MenuModelDelegate* menu_model_delegate = GetMenuModelDelegate(); | 726 ui::MenuModelDelegate* menu_model_delegate = GetMenuModelDelegate(); |
| 727 if (menu_model_delegate) | 727 if (menu_model_delegate) |
| 728 menu_model_delegate->OnMenuStructureChanged(); | 728 menu_model_delegate->OnMenuStructureChanged(); |
| 729 } | 729 } |
| 730 | 730 |
| 731 void RecentTabsSubMenuModel::TabRestoreServiceDestroyed( | 731 void RecentTabsSubMenuModel::TabRestoreServiceDestroyed( |
| 732 sessions::TabRestoreService* service) { | 732 sessions::TabRestoreService* service) { |
| 733 TabRestoreServiceChanged(service); | 733 TabRestoreServiceChanged(service); |
| 734 } | 734 } |
| OLD | NEW |