OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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_builder.h" | 5 #include "chrome/browser/ui/views/frame/system_menu_model_builder.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/strings/utf_string_conversions.h" | 8 #include "base/strings/utf_string_conversions.h" |
9 #include "build/build_config.h" | 9 #include "build/build_config.h" |
10 #include "chrome/app/chrome_command_ids.h" | 10 #include "chrome/app/chrome_command_ids.h" |
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
108 model->AddSeparator(ui::NORMAL_SEPARATOR); | 108 model->AddSeparator(ui::NORMAL_SEPARATOR); |
109 model->AddItemWithStringId(IDC_CUT, IDS_CUT); | 109 model->AddItemWithStringId(IDC_CUT, IDS_CUT); |
110 model->AddItemWithStringId(IDC_COPY, IDS_COPY); | 110 model->AddItemWithStringId(IDC_COPY, IDS_COPY); |
111 model->AddItemWithStringId(IDC_PASTE, IDS_PASTE); | 111 model->AddItemWithStringId(IDC_PASTE, IDS_PASTE); |
112 model->AddSeparator(ui::NORMAL_SEPARATOR); | 112 model->AddSeparator(ui::NORMAL_SEPARATOR); |
113 model->AddItemWithStringId(IDC_FIND, IDS_FIND); | 113 model->AddItemWithStringId(IDC_FIND, IDS_FIND); |
114 model->AddItemWithStringId(IDC_PRINT, IDS_PRINT); | 114 model->AddItemWithStringId(IDC_PRINT, IDS_PRINT); |
115 zoom_menu_contents_.reset(new ZoomMenuModel(&menu_delegate_)); | 115 zoom_menu_contents_.reset(new ZoomMenuModel(&menu_delegate_)); |
116 model->AddSubMenuWithStringId(IDC_ZOOM_MENU, IDS_ZOOM_MENU, | 116 model->AddSubMenuWithStringId(IDC_ZOOM_MENU, IDS_ZOOM_MENU, |
117 zoom_menu_contents_.get()); | 117 zoom_menu_contents_.get()); |
118 encoding_menu_contents_.reset(new EncodingMenuModel(browser())); | |
119 model->AddSubMenuWithStringId(IDC_ENCODING_MENU, | |
120 IDS_ENCODING_MENU, | |
121 encoding_menu_contents_.get()); | |
122 if (browser()->is_app() && chrome::CanOpenTaskManager()) { | 118 if (browser()->is_app() && chrome::CanOpenTaskManager()) { |
123 model->AddSeparator(ui::NORMAL_SEPARATOR); | 119 model->AddSeparator(ui::NORMAL_SEPARATOR); |
124 model->AddItemWithStringId(IDC_TASK_MANAGER, IDS_TASK_MANAGER); | 120 model->AddItemWithStringId(IDC_TASK_MANAGER, IDS_TASK_MANAGER); |
125 } | 121 } |
126 #if defined(OS_LINUX) && !defined(OS_CHROMEOS) | 122 #if defined(OS_LINUX) && !defined(OS_CHROMEOS) |
127 model->AddSeparator(ui::NORMAL_SEPARATOR); | 123 model->AddSeparator(ui::NORMAL_SEPARATOR); |
128 model->AddItemWithStringId(IDC_CLOSE_WINDOW, IDS_CLOSE); | 124 model->AddItemWithStringId(IDC_CLOSE_WINDOW, IDS_CLOSE); |
129 #endif | 125 #endif |
130 | 126 |
131 // Avoid appending the teleport menu for the settings window. This window's | 127 // Avoid appending the teleport menu for the settings window. This window's |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
182 const user_manager::UserInfo* user_info = delegate->GetUserInfo(user_index); | 178 const user_manager::UserInfo* user_info = delegate->GetUserInfo(user_index); |
183 model->AddItem( | 179 model->AddItem( |
184 user_index == 1 ? IDC_VISIT_DESKTOP_OF_LRU_USER_2 | 180 user_index == 1 ? IDC_VISIT_DESKTOP_OF_LRU_USER_2 |
185 : IDC_VISIT_DESKTOP_OF_LRU_USER_3, | 181 : IDC_VISIT_DESKTOP_OF_LRU_USER_3, |
186 l10n_util::GetStringFUTF16(IDS_VISIT_DESKTOP_OF_LRU_USER, | 182 l10n_util::GetStringFUTF16(IDS_VISIT_DESKTOP_OF_LRU_USER, |
187 user_info->GetDisplayName(), | 183 user_info->GetDisplayName(), |
188 base::ASCIIToUTF16(user_info->GetEmail()))); | 184 base::ASCIIToUTF16(user_info->GetEmail()))); |
189 } | 185 } |
190 #endif | 186 #endif |
191 } | 187 } |
OLD | NEW |