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

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

Issue 12737003: Use GOOGLE_CHROME_BUILD instead of OFFICIAL BUILD for wallpaper picker (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 9 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
« no previous file with comments | « chrome/browser/ui/ash/launcher/launcher_context_menu.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 !root_window_controller->IsImmersiveMode()) { 141 !root_window_controller->IsImmersiveMode()) {
142 AddCheckItemWithStringId( 142 AddCheckItemWithStringId(
143 MENU_AUTO_HIDE, IDS_AURA_LAUNCHER_CONTEXT_MENU_AUTO_HIDE); 143 MENU_AUTO_HIDE, IDS_AURA_LAUNCHER_CONTEXT_MENU_AUTO_HIDE);
144 } 144 }
145 if (!CommandLine::ForCurrentProcess()->HasSwitch( 145 if (!CommandLine::ForCurrentProcess()->HasSwitch(
146 switches::kHideLauncherAlignmentMenu)) { 146 switches::kHideLauncherAlignmentMenu)) {
147 AddSubMenuWithStringId(MENU_ALIGNMENT_MENU, 147 AddSubMenuWithStringId(MENU_ALIGNMENT_MENU,
148 IDS_AURA_LAUNCHER_CONTEXT_MENU_POSITION, 148 IDS_AURA_LAUNCHER_CONTEXT_MENU_POSITION,
149 &launcher_alignment_menu_); 149 &launcher_alignment_menu_);
150 } 150 }
151 #if defined(OS_CHROMEOS) && defined(OFFICIAL_BUILD) 151 #if defined(OS_CHROMEOS) && defined(GOOGLE_CHROME_BUILD)
152 AddItem(MENU_CHANGE_WALLPAPER, 152 AddItem(MENU_CHANGE_WALLPAPER,
153 l10n_util::GetStringUTF16(IDS_AURA_SET_DESKTOP_WALLPAPER)); 153 l10n_util::GetStringUTF16(IDS_AURA_SET_DESKTOP_WALLPAPER));
154 #endif 154 #endif
155 } 155 }
156 156
157 LauncherContextMenu::~LauncherContextMenu() { 157 LauncherContextMenu::~LauncherContextMenu() {
158 } 158 }
159 159
160 bool LauncherContextMenu::IsItemForCommandIdDynamic(int command_id) const { 160 bool LauncherContextMenu::IsItemForCommandIdDynamic(int command_id) const {
161 return command_id == MENU_OPEN_NEW; 161 return command_id == MENU_OPEN_NEW;
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
199 default: 199 default:
200 return extension_items_->IsCommandIdChecked(command_id); 200 return extension_items_->IsCommandIdChecked(command_id);
201 } 201 }
202 } 202 }
203 203
204 bool LauncherContextMenu::IsCommandIdEnabled(int command_id) const { 204 bool LauncherContextMenu::IsCommandIdEnabled(int command_id) const {
205 switch (command_id) { 205 switch (command_id) {
206 case MENU_PIN: 206 case MENU_PIN:
207 return item_.type == ash::TYPE_PLATFORM_APP || 207 return item_.type == ash::TYPE_PLATFORM_APP ||
208 controller_->IsPinnable(item_.id); 208 controller_->IsPinnable(item_.id);
209 #if defined(OS_CHROMEOS) && defined(OFFICIAL_BUILD) 209 #if defined(OS_CHROMEOS) && defined(GOOGLE_CHROME_BUILD)
210 case MENU_CHANGE_WALLPAPER: 210 case MENU_CHANGE_WALLPAPER:
211 return ash::Shell::GetInstance()->user_wallpaper_delegate()-> 211 return ash::Shell::GetInstance()->user_wallpaper_delegate()->
212 CanOpenSetWallpaperPage(); 212 CanOpenSetWallpaperPage();
213 #endif 213 #endif
214 case MENU_NEW_WINDOW: 214 case MENU_NEW_WINDOW:
215 // "Normal" windows are not allowed when incognito is enforced. 215 // "Normal" windows are not allowed when incognito is enforced.
216 return IncognitoModePrefs::GetAvailability( 216 return IncognitoModePrefs::GetAvailability(
217 controller_->profile()->GetPrefs()) != IncognitoModePrefs::FORCED; 217 controller_->profile()->GetPrefs()) != IncognitoModePrefs::FORCED;
218 case MENU_AUTO_HIDE: 218 case MENU_AUTO_HIDE:
219 return controller_->CanUserModifyShelfAutoHideBehavior(root_window_); 219 return controller_->CanUserModifyShelfAutoHideBehavior(root_window_);
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
263 controller_->ToggleShelfAutoHideBehavior(root_window_); 263 controller_->ToggleShelfAutoHideBehavior(root_window_);
264 break; 264 break;
265 case MENU_NEW_WINDOW: 265 case MENU_NEW_WINDOW:
266 controller_->CreateNewWindow(); 266 controller_->CreateNewWindow();
267 break; 267 break;
268 case MENU_NEW_INCOGNITO_WINDOW: 268 case MENU_NEW_INCOGNITO_WINDOW:
269 controller_->CreateNewIncognitoWindow(); 269 controller_->CreateNewIncognitoWindow();
270 break; 270 break;
271 case MENU_ALIGNMENT_MENU: 271 case MENU_ALIGNMENT_MENU:
272 break; 272 break;
273 #if defined(OS_CHROMEOS) && defined(OFFICIAL_BUILD) 273 #if defined(OS_CHROMEOS) && defined(GOOGLE_CHROME_BUILD)
274 case MENU_CHANGE_WALLPAPER: 274 case MENU_CHANGE_WALLPAPER:
275 ash::Shell::GetInstance()->user_wallpaper_delegate()-> 275 ash::Shell::GetInstance()->user_wallpaper_delegate()->
276 OpenSetWallpaperPage(); 276 OpenSetWallpaperPage();
277 break; 277 break;
278 #endif 278 #endif
279 default: 279 default:
280 extension_items_->ExecuteCommand(command_id, NULL, 280 extension_items_->ExecuteCommand(command_id, NULL,
281 content::ContextMenuParams()); 281 content::ContextMenuParams());
282 } 282 }
283 } 283 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/ash/launcher/launcher_context_menu.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698