| 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 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 Loading... |
| 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 } |
| OLD | NEW |