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