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" |
11 #include "ash/root_window_controller.h" | 11 #include "ash/root_window_controller.h" |
12 #include "ash/shelf/shelf_item_delegate.h" | 12 #include "ash/shelf/shelf_item_delegate.h" |
13 #include "ash/shelf/shelf_widget.h" | 13 #include "ash/shelf/shelf_widget.h" |
14 #include "ash/shell.h" | 14 #include "ash/shell.h" |
15 #include "base/bind.h" | 15 #include "base/bind.h" |
16 #include "base/command_line.h" | 16 #include "base/command_line.h" |
17 #include "base/prefs/pref_service.h" | 17 #include "base/prefs/pref_service.h" |
18 #include "chrome/browser/extensions/context_menu_matcher.h" | 18 #include "chrome/browser/extensions/context_menu_matcher.h" |
19 #include "chrome/browser/fullscreen.h" | 19 #include "chrome/browser/fullscreen.h" |
20 #include "chrome/browser/prefs/incognito_mode_prefs.h" | 20 #include "chrome/browser/prefs/incognito_mode_prefs.h" |
21 #include "chrome/browser/profiles/profile.h" | 21 #include "chrome/browser/profiles/profile.h" |
22 #include "chrome/browser/ui/ash/chrome_shell_delegate.h" | 22 #include "chrome/browser/ui/ash/chrome_shell_delegate.h" |
23 #include "chrome/browser/ui/ash/launcher/chrome_launcher_controller.h" | 23 #include "chrome/browser/ui/ash/launcher/chrome_launcher_controller.h" |
24 #include "chrome/common/chrome_switches.h" | 24 #include "chrome/common/chrome_switches.h" |
25 #include "chrome/common/extensions/extension_constants.h" | 25 #include "chrome/common/extensions/extension_constants.h" |
| 26 #include "chrome/grit/generated_resources.h" |
26 #include "content/public/common/context_menu_params.h" | 27 #include "content/public/common/context_menu_params.h" |
27 #include "grit/ash_strings.h" | 28 #include "grit/ash_strings.h" |
28 #include "grit/generated_resources.h" | |
29 #include "ui/base/l10n/l10n_util.h" | 29 #include "ui/base/l10n/l10n_util.h" |
30 | 30 |
31 namespace { | 31 namespace { |
32 | 32 |
33 bool MenuItemHasLauncherContext(const extensions::MenuItem* item) { | 33 bool MenuItemHasLauncherContext(const extensions::MenuItem* item) { |
34 return item->contexts().Contains(extensions::MenuItem::LAUNCHER); | 34 return item->contexts().Contains(extensions::MenuItem::LAUNCHER); |
35 } | 35 } |
36 | 36 |
37 } // namespace | 37 } // namespace |
38 | 38 |
(...skipping 305 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
344 case MENU_CHANGE_WALLPAPER: | 344 case MENU_CHANGE_WALLPAPER: |
345 ash::Shell::GetInstance()->user_wallpaper_delegate()-> | 345 ash::Shell::GetInstance()->user_wallpaper_delegate()-> |
346 OpenSetWallpaperPage(); | 346 OpenSetWallpaperPage(); |
347 break; | 347 break; |
348 #endif | 348 #endif |
349 default: | 349 default: |
350 extension_items_->ExecuteCommand(command_id, NULL, | 350 extension_items_->ExecuteCommand(command_id, NULL, |
351 content::ContextMenuParams()); | 351 content::ContextMenuParams()); |
352 } | 352 } |
353 } | 353 } |
OLD | NEW |