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

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: Fixed build problems 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 11 matching lines...) Expand all
22 set_delegate(this); 22 set_delegate(this);
23 23
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 // No open actions for pending app shortcut. 30 // No open actions for pending app shortcut.
31 if (item->status != ash::STATUS_IS_PENDING) { 31 if (item->status != ash::STATUS_IS_PENDING) {
32 AddSeparator(); 32 AddSeparator(ui::NORMAL_SEPARATOR);
33 AddCheckItemWithStringId( 33 AddCheckItemWithStringId(
34 LAUNCH_TYPE_REGULAR_TAB, 34 LAUNCH_TYPE_REGULAR_TAB,
35 IDS_APP_CONTEXT_MENU_OPEN_REGULAR); 35 IDS_APP_CONTEXT_MENU_OPEN_REGULAR);
36 AddCheckItemWithStringId( 36 AddCheckItemWithStringId(
37 LAUNCH_TYPE_PINNED_TAB, 37 LAUNCH_TYPE_PINNED_TAB,
38 IDS_APP_CONTEXT_MENU_OPEN_PINNED); 38 IDS_APP_CONTEXT_MENU_OPEN_PINNED);
39 AddCheckItemWithStringId( 39 AddCheckItemWithStringId(
40 LAUNCH_TYPE_WINDOW, 40 LAUNCH_TYPE_WINDOW,
41 IDS_APP_CONTEXT_MENU_OPEN_WINDOW); 41 IDS_APP_CONTEXT_MENU_OPEN_WINDOW);
42 // Even though the launch type is Full Screen it is more accurately 42 // Even though the launch type is Full Screen it is more accurately
(...skipping 14 matching lines...) Expand all
57 if (item_.type == ash::TYPE_PLATFORM_APP) { 57 if (item_.type == ash::TYPE_PLATFORM_APP) {
58 AddItem( 58 AddItem(
59 MENU_PIN, 59 MENU_PIN,
60 l10n_util::GetStringUTF16(IDS_LAUNCHER_CONTEXT_MENU_PIN)); 60 l10n_util::GetStringUTF16(IDS_LAUNCHER_CONTEXT_MENU_PIN));
61 } 61 }
62 if (controller->IsOpen(item_.id)) { 62 if (controller->IsOpen(item_.id)) {
63 AddItem(MENU_CLOSE, 63 AddItem(MENU_CLOSE,
64 l10n_util::GetStringUTF16(IDS_LAUNCHER_CONTEXT_MENU_CLOSE)); 64 l10n_util::GetStringUTF16(IDS_LAUNCHER_CONTEXT_MENU_CLOSE));
65 } 65 }
66 } 66 }
67 AddSeparator(); 67 AddSeparator(ui::NORMAL_SEPARATOR);
68 } 68 }
69 AddCheckItemWithStringId( 69 AddCheckItemWithStringId(
70 MENU_AUTO_HIDE, ash::LauncherContextMenu::GetAutoHideResourceStringId()); 70 MENU_AUTO_HIDE, ash::LauncherContextMenu::GetAutoHideResourceStringId());
71 if (CommandLine::ForCurrentProcess()->HasSwitch( 71 if (CommandLine::ForCurrentProcess()->HasSwitch(
72 switches::kShowLauncherAlignmentMenu)) { 72 switches::kShowLauncherAlignmentMenu)) {
73 AddSubMenuWithStringId(MENU_ALIGNMENT_MENU, 73 AddSubMenuWithStringId(MENU_ALIGNMENT_MENU,
74 IDS_AURA_LAUNCHER_CONTEXT_MENU_POSITION, 74 IDS_AURA_LAUNCHER_CONTEXT_MENU_POSITION,
75 &alignment_menu_); 75 &alignment_menu_);
76 } 76 }
77 } 77 }
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
150 case MENU_NEW_WINDOW: 150 case MENU_NEW_WINDOW:
151 controller_->CreateNewWindow(); 151 controller_->CreateNewWindow();
152 break; 152 break;
153 case MENU_NEW_INCOGNITO_WINDOW: 153 case MENU_NEW_INCOGNITO_WINDOW:
154 controller_->CreateNewIncognitoWindow(); 154 controller_->CreateNewIncognitoWindow();
155 break; 155 break;
156 case MENU_ALIGNMENT_MENU: 156 case MENU_ALIGNMENT_MENU:
157 break; 157 break;
158 } 158 }
159 } 159 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698