| OLD | NEW |
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 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/common/session/session_state_delegate.h" | 9 #include "ash/common/session/session_state_delegate.h" |
| 10 #include "ash/common/shelf/shelf_model.h" | 10 #include "ash/common/shelf/shelf_model.h" |
| 11 #include "ash/common/shelf/shelf_widget.h" | 11 #include "ash/common/shelf/shelf_widget.h" |
| 12 #include "ash/common/shelf/wm_shelf.h" | 12 #include "ash/common/shelf/wm_shelf.h" |
| 13 #include "ash/common/strings/grit/ash_strings.h" |
| 13 #include "ash/common/wallpaper/wallpaper_delegate.h" | 14 #include "ash/common/wallpaper/wallpaper_delegate.h" |
| 14 #include "ash/common/wm_shell.h" | 15 #include "ash/common/wm_shell.h" |
| 15 #include "build/build_config.h" | 16 #include "build/build_config.h" |
| 16 #include "chrome/browser/fullscreen.h" | 17 #include "chrome/browser/fullscreen.h" |
| 17 #include "chrome/browser/profiles/profile.h" | 18 #include "chrome/browser/profiles/profile.h" |
| 18 #include "chrome/browser/ui/app_list/arc/arc_app_list_prefs.h" | 19 #include "chrome/browser/ui/app_list/arc/arc_app_list_prefs.h" |
| 19 #include "chrome/browser/ui/ash/launcher/arc_launcher_context_menu.h" | 20 #include "chrome/browser/ui/ash/launcher/arc_launcher_context_menu.h" |
| 20 #include "chrome/browser/ui/ash/launcher/chrome_launcher_controller_impl.h" | 21 #include "chrome/browser/ui/ash/launcher/chrome_launcher_controller_impl.h" |
| 21 #include "chrome/browser/ui/ash/launcher/chrome_launcher_controller_util.h" | 22 #include "chrome/browser/ui/ash/launcher/chrome_launcher_controller_util.h" |
| 22 #include "chrome/browser/ui/ash/launcher/desktop_shell_launcher_context_menu.h" | 23 #include "chrome/browser/ui/ash/launcher/desktop_shell_launcher_context_menu.h" |
| 23 #include "chrome/browser/ui/ash/launcher/extension_launcher_context_menu.h" | 24 #include "chrome/browser/ui/ash/launcher/extension_launcher_context_menu.h" |
| 24 #include "chrome/common/pref_names.h" | 25 #include "chrome/common/pref_names.h" |
| 25 #include "chrome/grit/generated_resources.h" | 26 #include "chrome/grit/generated_resources.h" |
| 26 #include "components/prefs/pref_service.h" | 27 #include "components/prefs/pref_service.h" |
| 27 #include "content/public/common/context_menu_params.h" | 28 #include "content/public/common/context_menu_params.h" |
| 28 #include "grit/ash_strings.h" | |
| 29 | 29 |
| 30 namespace { | 30 namespace { |
| 31 | 31 |
| 32 // Returns true if the user can modify the |shelf|'s auto-hide behavior. | 32 // Returns true if the user can modify the |shelf|'s auto-hide behavior. |
| 33 bool CanUserModifyShelfAutoHideBehavior(const Profile* profile) { | 33 bool CanUserModifyShelfAutoHideBehavior(const Profile* profile) { |
| 34 const std::string& pref = prefs::kShelfAutoHideBehaviorLocal; | 34 const std::string& pref = prefs::kShelfAutoHideBehaviorLocal; |
| 35 return profile->GetPrefs()->FindPreference(pref)->IsUserModifiable(); | 35 return profile->GetPrefs()->FindPreference(pref)->IsUserModifiable(); |
| 36 } | 36 } |
| 37 | 37 |
| 38 } // namespace | 38 } // namespace |
| (...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 196 case MENU_PIN: | 196 case MENU_PIN: |
| 197 case MENU_AUTO_HIDE: | 197 case MENU_AUTO_HIDE: |
| 198 case MENU_ALIGNMENT_MENU: | 198 case MENU_ALIGNMENT_MENU: |
| 199 case MENU_CHANGE_WALLPAPER: | 199 case MENU_CHANGE_WALLPAPER: |
| 200 LauncherContextMenu::ExecuteCommand(command_id, event_flags); | 200 LauncherContextMenu::ExecuteCommand(command_id, event_flags); |
| 201 return true; | 201 return true; |
| 202 default: | 202 default: |
| 203 return false; | 203 return false; |
| 204 } | 204 } |
| 205 } | 205 } |
| OLD | NEW |