Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1866)

Side by Side Diff: chrome/browser/ui/ash/launcher/launcher_context_menu.cc

Issue 10837317: Setting the touch wrench menu as default menu for ChromeOS (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: And another merge! Created 8 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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/ash/launcher/launcher_context_menu.h" 5 #include "chrome/browser/ui/ash/launcher/launcher_context_menu.h"
6 6
7 #include "ash/launcher/launcher_context_menu.h" 7 #include "ash/launcher/launcher_context_menu.h"
8 #include "ash/shell.h" 8 #include "ash/shell.h"
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "chrome/browser/extensions/extension_prefs.h" 10 #include "chrome/browser/extensions/extension_prefs.h"
(...skipping 13 matching lines...) Expand all
24 if (is_valid_item()) { 24 if (is_valid_item()) {
25 if (item_.type == ash::TYPE_APP_SHORTCUT) { 25 if (item_.type == ash::TYPE_APP_SHORTCUT) {
26 DCHECK(controller->IsPinned(item_.id)); 26 DCHECK(controller->IsPinned(item_.id));
27 AddItem( 27 AddItem(
28 MENU_PIN, 28 MENU_PIN,
29 l10n_util::GetStringUTF16(IDS_LAUNCHER_CONTEXT_MENU_UNPIN)); 29 l10n_util::GetStringUTF16(IDS_LAUNCHER_CONTEXT_MENU_UNPIN));
30 if (controller->IsOpen(item->id)) { 30 if (controller->IsOpen(item->id)) {
31 AddItem(MENU_CLOSE, 31 AddItem(MENU_CLOSE,
32 l10n_util::GetStringUTF16(IDS_LAUNCHER_CONTEXT_MENU_CLOSE)); 32 l10n_util::GetStringUTF16(IDS_LAUNCHER_CONTEXT_MENU_CLOSE));
33 } 33 }
34 AddSeparator(); 34 AddSeparator(ui::NORMAL_SEPARATOR);
35 AddCheckItemWithStringId( 35 AddCheckItemWithStringId(
36 LAUNCH_TYPE_REGULAR_TAB, 36 LAUNCH_TYPE_REGULAR_TAB,
37 IDS_APP_CONTEXT_MENU_OPEN_REGULAR); 37 IDS_APP_CONTEXT_MENU_OPEN_REGULAR);
38 AddCheckItemWithStringId( 38 AddCheckItemWithStringId(
39 LAUNCH_TYPE_PINNED_TAB, 39 LAUNCH_TYPE_PINNED_TAB,
40 IDS_APP_CONTEXT_MENU_OPEN_PINNED); 40 IDS_APP_CONTEXT_MENU_OPEN_PINNED);
41 AddCheckItemWithStringId( 41 AddCheckItemWithStringId(
42 LAUNCH_TYPE_WINDOW, 42 LAUNCH_TYPE_WINDOW,
43 IDS_APP_CONTEXT_MENU_OPEN_WINDOW); 43 IDS_APP_CONTEXT_MENU_OPEN_WINDOW);
44 // Even though the launch type is Full Screen it is more accurately 44 // Even though the launch type is Full Screen it is more accurately
(...skipping 13 matching lines...) Expand all
58 if (item_.type == ash::TYPE_PLATFORM_APP) { 58 if (item_.type == ash::TYPE_PLATFORM_APP) {
59 AddItem( 59 AddItem(
60 MENU_PIN, 60 MENU_PIN,
61 l10n_util::GetStringUTF16(IDS_LAUNCHER_CONTEXT_MENU_PIN)); 61 l10n_util::GetStringUTF16(IDS_LAUNCHER_CONTEXT_MENU_PIN));
62 } 62 }
63 if (controller->IsOpen(item_.id)) { 63 if (controller->IsOpen(item_.id)) {
64 AddItem(MENU_CLOSE, 64 AddItem(MENU_CLOSE,
65 l10n_util::GetStringUTF16(IDS_LAUNCHER_CONTEXT_MENU_CLOSE)); 65 l10n_util::GetStringUTF16(IDS_LAUNCHER_CONTEXT_MENU_CLOSE));
66 } 66 }
67 } 67 }
68 AddSeparator(); 68 AddSeparator(ui::NORMAL_SEPARATOR);
69 } 69 }
70 AddCheckItemWithStringId( 70 AddCheckItemWithStringId(
71 MENU_AUTO_HIDE, ash::LauncherContextMenu::GetAutoHideResourceStringId()); 71 MENU_AUTO_HIDE, ash::LauncherContextMenu::GetAutoHideResourceStringId());
72 if (CommandLine::ForCurrentProcess()->HasSwitch( 72 if (CommandLine::ForCurrentProcess()->HasSwitch(
73 switches::kShowLauncherAlignmentMenu)) { 73 switches::kShowLauncherAlignmentMenu)) {
74 AddSubMenuWithStringId(MENU_ALIGNMENT_MENU, 74 AddSubMenuWithStringId(MENU_ALIGNMENT_MENU,
75 IDS_AURA_LAUNCHER_CONTEXT_MENU_POSITION, 75 IDS_AURA_LAUNCHER_CONTEXT_MENU_POSITION,
76 &alignment_menu_); 76 &alignment_menu_);
77 } 77 }
78 } 78 }
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
151 case MENU_NEW_WINDOW: 151 case MENU_NEW_WINDOW:
152 controller_->CreateNewWindow(); 152 controller_->CreateNewWindow();
153 break; 153 break;
154 case MENU_NEW_INCOGNITO_WINDOW: 154 case MENU_NEW_INCOGNITO_WINDOW:
155 controller_->CreateNewIncognitoWindow(); 155 controller_->CreateNewIncognitoWindow();
156 break; 156 break;
157 case MENU_ALIGNMENT_MENU: 157 case MENU_ALIGNMENT_MENU:
158 break; 158 break;
159 } 159 }
160 } 160 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/ash/app_list/extension_app_item.cc ('k') | chrome/browser/ui/cocoa/menu_controller_unittest.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698