OLD | NEW |
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 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
88 } | 88 } |
89 if (!controller_->IsPlatformApp(item_.id) && | 89 if (!controller_->IsPlatformApp(item_.id) && |
90 item_.type != ash::TYPE_WINDOWED_APP) { | 90 item_.type != ash::TYPE_WINDOWED_APP) { |
91 AddSeparator(ui::NORMAL_SEPARATOR); | 91 AddSeparator(ui::NORMAL_SEPARATOR); |
92 AddCheckItemWithStringId( | 92 AddCheckItemWithStringId( |
93 LAUNCH_TYPE_REGULAR_TAB, | 93 LAUNCH_TYPE_REGULAR_TAB, |
94 IDS_APP_CONTEXT_MENU_OPEN_REGULAR); | 94 IDS_APP_CONTEXT_MENU_OPEN_REGULAR); |
95 AddCheckItemWithStringId( | 95 AddCheckItemWithStringId( |
96 LAUNCH_TYPE_PINNED_TAB, | 96 LAUNCH_TYPE_PINNED_TAB, |
97 IDS_APP_CONTEXT_MENU_OPEN_PINNED); | 97 IDS_APP_CONTEXT_MENU_OPEN_PINNED); |
98 AddCheckItemWithStringId( | 98 if (!ash::Shell::IsForcedMaximizeMode()) { |
99 LAUNCH_TYPE_WINDOW, | 99 AddCheckItemWithStringId( |
100 IDS_APP_CONTEXT_MENU_OPEN_WINDOW); | 100 LAUNCH_TYPE_WINDOW, |
101 // Even though the launch type is Full Screen it is more accurately | 101 IDS_APP_CONTEXT_MENU_OPEN_WINDOW); |
102 // described as Maximized in Ash. | 102 // Even though the launch type is Full Screen it is more accurately |
103 AddCheckItemWithStringId( | 103 // described as Maximized in Ash. |
104 LAUNCH_TYPE_FULLSCREEN, | 104 AddCheckItemWithStringId( |
105 IDS_APP_CONTEXT_MENU_OPEN_MAXIMIZED); | 105 LAUNCH_TYPE_FULLSCREEN, |
| 106 IDS_APP_CONTEXT_MENU_OPEN_MAXIMIZED); |
| 107 } |
106 } | 108 } |
107 } else if (item_.type == ash::TYPE_BROWSER_SHORTCUT) { | 109 } else if (item_.type == ash::TYPE_BROWSER_SHORTCUT) { |
108 AddItem(MENU_NEW_WINDOW, | 110 AddItem(MENU_NEW_WINDOW, |
109 l10n_util::GetStringUTF16(IDS_LAUNCHER_NEW_WINDOW)); | 111 l10n_util::GetStringUTF16(IDS_LAUNCHER_NEW_WINDOW)); |
110 if (!controller_->IsLoggedInAsGuest()) { | 112 if (!controller_->IsLoggedInAsGuest()) { |
111 AddItem(MENU_NEW_INCOGNITO_WINDOW, | 113 AddItem(MENU_NEW_INCOGNITO_WINDOW, |
112 l10n_util::GetStringUTF16(IDS_LAUNCHER_NEW_INCOGNITO_WINDOW)); | 114 l10n_util::GetStringUTF16(IDS_LAUNCHER_NEW_INCOGNITO_WINDOW)); |
113 } | 115 } |
114 } else { | 116 } else { |
115 if (item_.type == ash::TYPE_PLATFORM_APP) { | 117 if (item_.type == ash::TYPE_PLATFORM_APP) { |
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
277 case MENU_CHANGE_WALLPAPER: | 279 case MENU_CHANGE_WALLPAPER: |
278 ash::Shell::GetInstance()->user_wallpaper_delegate()-> | 280 ash::Shell::GetInstance()->user_wallpaper_delegate()-> |
279 OpenSetWallpaperPage(); | 281 OpenSetWallpaperPage(); |
280 break; | 282 break; |
281 #endif | 283 #endif |
282 default: | 284 default: |
283 extension_items_->ExecuteCommand(command_id, NULL, | 285 extension_items_->ExecuteCommand(command_id, NULL, |
284 content::ContextMenuParams()); | 286 content::ContextMenuParams()); |
285 } | 287 } |
286 } | 288 } |
OLD | NEW |