| 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 "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/metrics/histogram.h" | 8 #include "base/metrics/histogram.h" |
| 9 #include "base/prefs/scoped_user_pref_update.h" | 9 #include "base/prefs/scoped_user_pref_update.h" |
| 10 #include "base/strings/string_number_conversions.h" | 10 #include "base/strings/string_number_conversions.h" |
| (...skipping 12 matching lines...) Expand all Loading... |
| 23 #include "chrome/browser/sync/profile_sync_service_factory.h" | 23 #include "chrome/browser/sync/profile_sync_service_factory.h" |
| 24 #include "chrome/browser/ui/browser.h" | 24 #include "chrome/browser/ui/browser.h" |
| 25 #include "chrome/browser/ui/browser_commands.h" | 25 #include "chrome/browser/ui/browser_commands.h" |
| 26 #include "chrome/browser/ui/tabs/tab_strip_model.h" | 26 #include "chrome/browser/ui/tabs/tab_strip_model.h" |
| 27 #include "chrome/browser/ui/toolbar/wrench_menu_model.h" | 27 #include "chrome/browser/ui/toolbar/wrench_menu_model.h" |
| 28 #include "chrome/common/pref_names.h" | 28 #include "chrome/common/pref_names.h" |
| 29 #include "components/favicon_base/favicon_types.h" | 29 #include "components/favicon_base/favicon_types.h" |
| 30 #include "grit/browser_resources.h" | 30 #include "grit/browser_resources.h" |
| 31 #include "grit/generated_resources.h" | 31 #include "grit/generated_resources.h" |
| 32 #include "grit/theme_resources.h" | 32 #include "grit/theme_resources.h" |
| 33 #include "grit/ui_resources.h" | |
| 34 #include "ui/base/accelerators/accelerator.h" | 33 #include "ui/base/accelerators/accelerator.h" |
| 35 #include "ui/base/l10n/l10n_util.h" | 34 #include "ui/base/l10n/l10n_util.h" |
| 36 #include "ui/base/resource/resource_bundle.h" | 35 #include "ui/base/resource/resource_bundle.h" |
| 36 #include "ui/resources/grit/ui_resources.h" |
| 37 | 37 |
| 38 #if defined(USE_ASH) | 38 #if defined(USE_ASH) |
| 39 #include "ash/accelerators/accelerator_table.h" | 39 #include "ash/accelerators/accelerator_table.h" |
| 40 #endif // defined(USE_ASH) | 40 #endif // defined(USE_ASH) |
| 41 | 41 |
| 42 namespace { | 42 namespace { |
| 43 | 43 |
| 44 // Initial comamnd ID's for navigatable (and hence executable) tab/window menu | 44 // Initial comamnd ID's for navigatable (and hence executable) tab/window menu |
| 45 // items. The menumodel and storage structures are not 1-1: | 45 // items. The menumodel and storage structures are not 1-1: |
| 46 // - menumodel has "Recently closed" header, "No tabs from other devices", | 46 // - menumodel has "Recently closed" header, "No tabs from other devices", |
| (...skipping 636 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 683 | 683 |
| 684 ui::MenuModelDelegate* menu_model_delegate = GetMenuModelDelegate(); | 684 ui::MenuModelDelegate* menu_model_delegate = GetMenuModelDelegate(); |
| 685 if (menu_model_delegate) | 685 if (menu_model_delegate) |
| 686 menu_model_delegate->OnMenuStructureChanged(); | 686 menu_model_delegate->OnMenuStructureChanged(); |
| 687 } | 687 } |
| 688 | 688 |
| 689 void RecentTabsSubMenuModel::TabRestoreServiceDestroyed( | 689 void RecentTabsSubMenuModel::TabRestoreServiceDestroyed( |
| 690 TabRestoreService* service) { | 690 TabRestoreService* service) { |
| 691 TabRestoreServiceChanged(service); | 691 TabRestoreServiceChanged(service); |
| 692 } | 692 } |
| OLD | NEW |