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

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

Issue 11471027: Added more tests for IncognitoModeAvailability. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add render_view_context_menu_test_util to unit_test and browser_tests. Created 7 years, 11 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 <string> 7 #include <string>
8 8
9 #include "ash/desktop_background/user_wallpaper_delegate.h" 9 #include "ash/desktop_background/user_wallpaper_delegate.h"
10 #include "ash/root_window_controller.h" 10 #include "ash/root_window_controller.h"
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 int index = 0; 124 int index = 0;
125 extension_items_->AppendExtensionItems( 125 extension_items_->AppendExtensionItems(
126 app_id, string16(), &index); 126 app_id, string16(), &index);
127 AddSeparatorIfNecessary(ui::NORMAL_SEPARATOR); 127 AddSeparatorIfNecessary(ui::NORMAL_SEPARATOR);
128 } 128 }
129 } 129 }
130 } 130 }
131 // Don't show the auto-hide menu item while in immersive mode because the 131 // Don't show the auto-hide menu item while in immersive mode because the
132 // launcher always auto-hides in this mode and it's confusing when the 132 // launcher always auto-hides in this mode and it's confusing when the
133 // preference appears not to apply. 133 // preference appears not to apply.
134 if (!ash::GetRootWindowController(root_window_)->IsImmersiveMode()) { 134 ash::internal::RootWindowController* root_window_controller =
135 ash::GetRootWindowController(root_window_);
136 if (root_window_controller != NULL &&
137 !root_window_controller->IsImmersiveMode()) {
135 AddCheckItemWithStringId( 138 AddCheckItemWithStringId(
136 MENU_AUTO_HIDE, IDS_AURA_LAUNCHER_CONTEXT_MENU_AUTO_HIDE); 139 MENU_AUTO_HIDE, IDS_AURA_LAUNCHER_CONTEXT_MENU_AUTO_HIDE);
137 } 140 }
138 if (CommandLine::ForCurrentProcess()->HasSwitch( 141 if (CommandLine::ForCurrentProcess()->HasSwitch(
139 switches::kShowLauncherAlignmentMenu)) { 142 switches::kShowLauncherAlignmentMenu)) {
140 AddSubMenuWithStringId(MENU_ALIGNMENT_MENU, 143 AddSubMenuWithStringId(MENU_ALIGNMENT_MENU,
141 IDS_AURA_LAUNCHER_CONTEXT_MENU_POSITION, 144 IDS_AURA_LAUNCHER_CONTEXT_MENU_POSITION,
142 &launcher_alignment_menu_); 145 &launcher_alignment_menu_);
143 } 146 }
144 AddItem(MENU_CHANGE_WALLPAPER, 147 AddItem(MENU_CHANGE_WALLPAPER,
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
261 break; 264 break;
262 case MENU_CHANGE_WALLPAPER: 265 case MENU_CHANGE_WALLPAPER:
263 ash::Shell::GetInstance()->user_wallpaper_delegate()-> 266 ash::Shell::GetInstance()->user_wallpaper_delegate()->
264 OpenSetWallpaperPage(); 267 OpenSetWallpaperPage();
265 break; 268 break;
266 default: 269 default:
267 extension_items_->ExecuteCommand(command_id, NULL, 270 extension_items_->ExecuteCommand(command_id, NULL,
268 content::ContextMenuParams()); 271 content::ContextMenuParams());
269 } 272 }
270 } 273 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698