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 "chrome/browser/extensions/context_menu_matcher.h" | 8 #include "chrome/browser/extensions/context_menu_matcher.h" |
9 #include "chrome/browser/extensions/extension_util.h" | 9 #include "chrome/browser/extensions/extension_util.h" |
10 #include "chrome/browser/extensions/menu_manager.h" | 10 #include "chrome/browser/extensions/menu_manager.h" |
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
110 | 110 |
111 if (controller_->CanDoCreateShortcutsFlow()) { | 111 if (controller_->CanDoCreateShortcutsFlow()) { |
112 menu_model_->AddItemWithStringId(CREATE_SHORTCUTS, | 112 menu_model_->AddItemWithStringId(CREATE_SHORTCUTS, |
113 IDS_NEW_TAB_APP_CREATE_SHORTCUT); | 113 IDS_NEW_TAB_APP_CREATE_SHORTCUT); |
114 } | 114 } |
115 menu_model_->AddSeparator(ui::NORMAL_SEPARATOR); | 115 menu_model_->AddSeparator(ui::NORMAL_SEPARATOR); |
116 | 116 |
117 if (!is_platform_app_) { | 117 if (!is_platform_app_) { |
118 // When bookmark apps are enabled, hosted apps can only toggle between | 118 // When bookmark apps are enabled, hosted apps can only toggle between |
119 // USE_LAUNCH_TYPE_WINDOW and USE_LAUNCH_TYPE_REGULAR. | 119 // USE_LAUNCH_TYPE_WINDOW and USE_LAUNCH_TYPE_REGULAR. |
120 if (extensions::util::IsNewBookmarkAppsEnabled()) { | 120 if (extensions::util::IsNewBookmarkAppsEnabled()) { |
benwells
2015/08/19 02:39:21
Ditto
dominickn
2015/08/19 05:21:58
Done.
| |
121 menu_model_->AddCheckItemWithStringId(USE_LAUNCH_TYPE_WINDOW, | 121 if (extensions::util::CanHostedAppsOpenInWindows()) { |
122 IDS_APP_CONTEXT_MENU_OPEN_WINDOW); | 122 menu_model_->AddCheckItemWithStringId( |
123 USE_LAUNCH_TYPE_WINDOW, IDS_APP_CONTEXT_MENU_OPEN_WINDOW); | |
124 } | |
123 } else { | 125 } else { |
124 menu_model_->AddCheckItemWithStringId( | 126 menu_model_->AddCheckItemWithStringId( |
125 USE_LAUNCH_TYPE_REGULAR, | 127 USE_LAUNCH_TYPE_REGULAR, |
126 IDS_APP_CONTEXT_MENU_OPEN_REGULAR); | 128 IDS_APP_CONTEXT_MENU_OPEN_REGULAR); |
127 menu_model_->AddCheckItemWithStringId( | 129 menu_model_->AddCheckItemWithStringId( |
128 USE_LAUNCH_TYPE_PINNED, | 130 USE_LAUNCH_TYPE_PINNED, |
129 IDS_APP_CONTEXT_MENU_OPEN_PINNED); | 131 IDS_APP_CONTEXT_MENU_OPEN_PINNED); |
130 #if defined(OS_MACOSX) | 132 #if defined(OS_MACOSX) |
131 // Mac does not support standalone web app browser windows or maximize. | 133 // Mac does not support standalone web app browser windows or maximize. |
132 menu_model_->AddCheckItemWithStringId( | 134 menu_model_->AddCheckItemWithStringId( |
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
288 extension_menu_items_->ExecuteCommand(command_id, NULL, | 290 extension_menu_items_->ExecuteCommand(command_id, NULL, |
289 content::ContextMenuParams()); | 291 content::ContextMenuParams()); |
290 } else if (command_id == MENU_NEW_WINDOW) { | 292 } else if (command_id == MENU_NEW_WINDOW) { |
291 controller_->CreateNewWindow(profile_, false); | 293 controller_->CreateNewWindow(profile_, false); |
292 } else if (command_id == MENU_NEW_INCOGNITO_WINDOW) { | 294 } else if (command_id == MENU_NEW_INCOGNITO_WINDOW) { |
293 controller_->CreateNewWindow(profile_, true); | 295 controller_->CreateNewWindow(profile_, true); |
294 } | 296 } |
295 } | 297 } |
296 | 298 |
297 } // namespace app_list | 299 } // namespace app_list |
OLD | NEW |