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/metrics/user_metrics_recorder.h" | 10 #include "ash/metrics/user_metrics_recorder.h" |
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
175 if (item_.type == ash::TYPE_PLATFORM_APP) { | 175 if (item_.type == ash::TYPE_PLATFORM_APP) { |
176 return l10n_util::GetStringUTF16(IDS_LAUNCHER_CONTEXT_MENU_NEW_WINDOW); | 176 return l10n_util::GetStringUTF16(IDS_LAUNCHER_CONTEXT_MENU_NEW_WINDOW); |
177 } | 177 } |
178 switch (controller_->GetLaunchType(item_.id)) { | 178 switch (controller_->GetLaunchType(item_.id)) { |
179 case extensions::LAUNCH_TYPE_PINNED: | 179 case extensions::LAUNCH_TYPE_PINNED: |
180 case extensions::LAUNCH_TYPE_REGULAR: | 180 case extensions::LAUNCH_TYPE_REGULAR: |
181 return l10n_util::GetStringUTF16(IDS_LAUNCHER_CONTEXT_MENU_NEW_TAB); | 181 return l10n_util::GetStringUTF16(IDS_LAUNCHER_CONTEXT_MENU_NEW_TAB); |
182 case extensions::LAUNCH_TYPE_FULLSCREEN: | 182 case extensions::LAUNCH_TYPE_FULLSCREEN: |
183 case extensions::LAUNCH_TYPE_WINDOW: | 183 case extensions::LAUNCH_TYPE_WINDOW: |
184 return l10n_util::GetStringUTF16(IDS_LAUNCHER_CONTEXT_MENU_NEW_WINDOW); | 184 return l10n_util::GetStringUTF16(IDS_LAUNCHER_CONTEXT_MENU_NEW_WINDOW); |
| 185 default: |
| 186 NOTREACHED(); |
| 187 return base::string16(); |
185 } | 188 } |
186 } | 189 } |
187 NOTREACHED(); | 190 NOTREACHED(); |
188 return base::string16(); | 191 return base::string16(); |
189 } | 192 } |
190 | 193 |
191 bool LauncherContextMenu::IsCommandIdChecked(int command_id) const { | 194 bool LauncherContextMenu::IsCommandIdChecked(int command_id) const { |
192 switch (command_id) { | 195 switch (command_id) { |
193 case LAUNCH_TYPE_PINNED_TAB: | 196 case LAUNCH_TYPE_PINNED_TAB: |
194 return controller_->GetLaunchType(item_.id) == | 197 return controller_->GetLaunchType(item_.id) == |
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
292 case MENU_CHANGE_WALLPAPER: | 295 case MENU_CHANGE_WALLPAPER: |
293 ash::Shell::GetInstance()->user_wallpaper_delegate()-> | 296 ash::Shell::GetInstance()->user_wallpaper_delegate()-> |
294 OpenSetWallpaperPage(); | 297 OpenSetWallpaperPage(); |
295 break; | 298 break; |
296 #endif | 299 #endif |
297 default: | 300 default: |
298 extension_items_->ExecuteCommand(command_id, NULL, | 301 extension_items_->ExecuteCommand(command_id, NULL, |
299 content::ContextMenuParams()); | 302 content::ContextMenuParams()); |
300 } | 303 } |
301 } | 304 } |
OLD | NEW |