| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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/views/frame/system_menu_model_delegate.h" | 5 #include "chrome/browser/ui/views/frame/system_menu_model_delegate.h" |
| 6 | 6 |
| 7 #include "base/prefs/pref_service.h" | |
| 8 #include "chrome/app/chrome_command_ids.h" | 7 #include "chrome/app/chrome_command_ids.h" |
| 9 #include "chrome/browser/command_updater.h" | 8 #include "chrome/browser/command_updater.h" |
| 10 #include "chrome/browser/profiles/profile.h" | 9 #include "chrome/browser/profiles/profile.h" |
| 11 #include "chrome/browser/sessions/tab_restore_service_factory.h" | 10 #include "chrome/browser/sessions/tab_restore_service_factory.h" |
| 12 #include "chrome/browser/ui/browser_commands.h" | 11 #include "chrome/browser/ui/browser_commands.h" |
| 13 #include "chrome/common/pref_names.h" | 12 #include "chrome/common/pref_names.h" |
| 14 #include "chrome/grit/generated_resources.h" | 13 #include "chrome/grit/generated_resources.h" |
| 14 #include "components/prefs/pref_service.h" |
| 15 #include "components/sessions/core/tab_restore_service.h" | 15 #include "components/sessions/core/tab_restore_service.h" |
| 16 #include "ui/base/l10n/l10n_util.h" | 16 #include "ui/base/l10n/l10n_util.h" |
| 17 | 17 |
| 18 SystemMenuModelDelegate::SystemMenuModelDelegate( | 18 SystemMenuModelDelegate::SystemMenuModelDelegate( |
| 19 ui::AcceleratorProvider* provider, | 19 ui::AcceleratorProvider* provider, |
| 20 Browser* browser) | 20 Browser* browser) |
| 21 : provider_(provider), | 21 : provider_(provider), |
| 22 browser_(browser) { | 22 browser_(browser) { |
| 23 } | 23 } |
| 24 | 24 |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 78 if (trs && !trs->entries().empty() && | 78 if (trs && !trs->entries().empty() && |
| 79 trs->entries().front()->type == sessions::TabRestoreService::WINDOW) | 79 trs->entries().front()->type == sessions::TabRestoreService::WINDOW) |
| 80 string_id = IDS_RESTORE_WINDOW; | 80 string_id = IDS_RESTORE_WINDOW; |
| 81 } | 81 } |
| 82 return l10n_util::GetStringUTF16(string_id); | 82 return l10n_util::GetStringUTF16(string_id); |
| 83 } | 83 } |
| 84 | 84 |
| 85 void SystemMenuModelDelegate::ExecuteCommand(int command_id, int event_flags) { | 85 void SystemMenuModelDelegate::ExecuteCommand(int command_id, int event_flags) { |
| 86 chrome::ExecuteCommand(browser_, command_id); | 86 chrome::ExecuteCommand(browser_, command_id); |
| 87 } | 87 } |
| OLD | NEW |