OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 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/app_list/app_context_menu.h" | 5 #include "chrome/browser/ui/app_list/app_context_menu.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "chrome/app/chrome_command_ids.h" | 9 #include "chrome/app/chrome_command_ids.h" |
10 #include "chrome/browser/extensions/context_menu_matcher.h" | 10 #include "chrome/browser/extensions/context_menu_matcher.h" |
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
146 USE_LAUNCH_TYPE_FULLSCREEN, | 146 USE_LAUNCH_TYPE_FULLSCREEN, |
147 IDS_APP_CONTEXT_MENU_OPEN_MAXIMIZED); | 147 IDS_APP_CONTEXT_MENU_OPEN_MAXIMIZED); |
148 #endif | 148 #endif |
149 } | 149 } |
150 menu_model_->AddSeparator(ui::NORMAL_SEPARATOR); | 150 menu_model_->AddSeparator(ui::NORMAL_SEPARATOR); |
151 } | 151 } |
152 | 152 |
153 // Assign unique IDs to commands added by the app itself. | 153 // Assign unique IDs to commands added by the app itself. |
154 int index = USE_LAUNCH_TYPE_COMMAND_END; | 154 int index = USE_LAUNCH_TYPE_COMMAND_END; |
155 extension_menu_items_->AppendExtensionItems( | 155 extension_menu_items_->AppendExtensionItems( |
156 extensions::MenuItem::ExtensionKey(app_id_), base::string16(), &index); | 156 extensions::MenuItem::ExtensionKey(app_id_), |
| 157 base::string16(), |
| 158 &index, |
| 159 false); // is_action_menu |
157 | 160 |
158 // If at least 1 item was added, add another separator after the list. | 161 // If at least 1 item was added, add another separator after the list. |
159 if (index > USE_LAUNCH_TYPE_COMMAND_END) | 162 if (index > USE_LAUNCH_TYPE_COMMAND_END) |
160 menu_model_->AddSeparator(ui::NORMAL_SEPARATOR); | 163 menu_model_->AddSeparator(ui::NORMAL_SEPARATOR); |
161 | 164 |
162 if (!is_platform_app_) | 165 if (!is_platform_app_) |
163 menu_model_->AddItemWithStringId(OPTIONS, IDS_NEW_TAB_APP_OPTIONS); | 166 menu_model_->AddItemWithStringId(OPTIONS, IDS_NEW_TAB_APP_OPTIONS); |
164 | 167 |
165 menu_model_->AddItemWithStringId(UNINSTALL, | 168 menu_model_->AddItemWithStringId(UNINSTALL, |
166 is_platform_app_ | 169 is_platform_app_ |
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
279 extension_menu_items_->ExecuteCommand(command_id, NULL, | 282 extension_menu_items_->ExecuteCommand(command_id, NULL, |
280 content::ContextMenuParams()); | 283 content::ContextMenuParams()); |
281 } else if (command_id == MENU_NEW_WINDOW) { | 284 } else if (command_id == MENU_NEW_WINDOW) { |
282 controller_->CreateNewWindow(profile_, false); | 285 controller_->CreateNewWindow(profile_, false); |
283 } else if (command_id == MENU_NEW_INCOGNITO_WINDOW) { | 286 } else if (command_id == MENU_NEW_INCOGNITO_WINDOW) { |
284 controller_->CreateNewWindow(profile_, true); | 287 controller_->CreateNewWindow(profile_, true); |
285 } | 288 } |
286 } | 289 } |
287 | 290 |
288 } // namespace app_list | 291 } // namespace app_list |
OLD | NEW |