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

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

Issue 13934007: Adding experimental maximize mode (behind a flag) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Changed as requested Created 7 years, 7 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 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 } 87 }
88 if (!controller_->IsPlatformApp(item_.id) && 88 if (!controller_->IsPlatformApp(item_.id) &&
89 item_.type != ash::TYPE_WINDOWED_APP) { 89 item_.type != ash::TYPE_WINDOWED_APP) {
90 AddSeparator(ui::NORMAL_SEPARATOR); 90 AddSeparator(ui::NORMAL_SEPARATOR);
91 AddCheckItemWithStringId( 91 AddCheckItemWithStringId(
92 LAUNCH_TYPE_REGULAR_TAB, 92 LAUNCH_TYPE_REGULAR_TAB,
93 IDS_APP_CONTEXT_MENU_OPEN_REGULAR); 93 IDS_APP_CONTEXT_MENU_OPEN_REGULAR);
94 AddCheckItemWithStringId( 94 AddCheckItemWithStringId(
95 LAUNCH_TYPE_PINNED_TAB, 95 LAUNCH_TYPE_PINNED_TAB,
96 IDS_APP_CONTEXT_MENU_OPEN_PINNED); 96 IDS_APP_CONTEXT_MENU_OPEN_PINNED);
97 AddCheckItemWithStringId( 97 if (!ash::Shell::IsForcedMaximizeMode()) {
98 LAUNCH_TYPE_WINDOW, 98 AddCheckItemWithStringId(
99 IDS_APP_CONTEXT_MENU_OPEN_WINDOW); 99 LAUNCH_TYPE_WINDOW,
100 // Even though the launch type is Full Screen it is more accurately 100 IDS_APP_CONTEXT_MENU_OPEN_WINDOW);
101 // described as Maximized in Ash. 101 // Even though the launch type is Full Screen it is more accurately
102 AddCheckItemWithStringId( 102 // described as Maximized in Ash.
103 LAUNCH_TYPE_FULLSCREEN, 103 AddCheckItemWithStringId(
104 IDS_APP_CONTEXT_MENU_OPEN_MAXIMIZED); 104 LAUNCH_TYPE_FULLSCREEN,
105 IDS_APP_CONTEXT_MENU_OPEN_MAXIMIZED);
106 }
105 } 107 }
106 } else if (item_.type == ash::TYPE_BROWSER_SHORTCUT) { 108 } else if (item_.type == ash::TYPE_BROWSER_SHORTCUT) {
107 AddItem(MENU_NEW_WINDOW, 109 AddItem(MENU_NEW_WINDOW,
108 l10n_util::GetStringUTF16(IDS_LAUNCHER_NEW_WINDOW)); 110 l10n_util::GetStringUTF16(IDS_LAUNCHER_NEW_WINDOW));
109 if (!controller_->IsLoggedInAsGuest()) { 111 if (!controller_->IsLoggedInAsGuest()) {
110 AddItem(MENU_NEW_INCOGNITO_WINDOW, 112 AddItem(MENU_NEW_INCOGNITO_WINDOW,
111 l10n_util::GetStringUTF16(IDS_LAUNCHER_NEW_INCOGNITO_WINDOW)); 113 l10n_util::GetStringUTF16(IDS_LAUNCHER_NEW_INCOGNITO_WINDOW));
112 } 114 }
113 } else { 115 } else {
114 if (item_.type == ash::TYPE_PLATFORM_APP) { 116 if (item_.type == ash::TYPE_PLATFORM_APP) {
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after
278 case MENU_CHANGE_WALLPAPER: 280 case MENU_CHANGE_WALLPAPER:
279 ash::Shell::GetInstance()->user_wallpaper_delegate()-> 281 ash::Shell::GetInstance()->user_wallpaper_delegate()->
280 OpenSetWallpaperPage(); 282 OpenSetWallpaperPage();
281 break; 283 break;
282 #endif 284 #endif
283 default: 285 default:
284 extension_items_->ExecuteCommand(command_id, NULL, 286 extension_items_->ExecuteCommand(command_id, NULL,
285 content::ContextMenuParams()); 287 content::ContextMenuParams());
286 } 288 }
287 } 289 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698