Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(295)

Unified Diff: chrome/browser/ui/ash/launcher/launcher_context_menu.cc

Issue 1960293003: Remove OS_CHROMEOS from ui/ash code (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/ash/launcher/launcher_context_menu.cc
diff --git a/chrome/browser/ui/ash/launcher/launcher_context_menu.cc b/chrome/browser/ui/ash/launcher/launcher_context_menu.cc
index defd9023a8e0696ab58066b6ea56f24fd7acb875..0544d310c3434545052100c04e4c78f3c6a9ed69 100644
--- a/chrome/browser/ui/ash/launcher/launcher_context_menu.cc
+++ b/chrome/browser/ui/ash/launcher/launcher_context_menu.cc
@@ -14,6 +14,8 @@
#include "build/build_config.h"
#include "chrome/browser/fullscreen.h"
#include "chrome/browser/profiles/profile.h"
+#include "chrome/browser/ui/app_list/arc/arc_app_list_prefs.h"
+#include "chrome/browser/ui/ash/launcher/arc_launcher_context_menu.h"
#include "chrome/browser/ui/ash/launcher/chrome_launcher_controller.h"
#include "chrome/browser/ui/ash/launcher/desktop_shell_launcher_context_menu.h"
#include "chrome/browser/ui/ash/launcher/extension_launcher_context_menu.h"
@@ -24,11 +26,6 @@
#include "grit/ash_strings.h"
#include "ui/base/l10n/l10n_util.h"
-#if defined(OS_CHROMEOS)
-#include "chrome/browser/ui/app_list/arc/arc_app_list_prefs.h"
-#include "chrome/browser/ui/ash/launcher/arc_launcher_context_menu.h"
-#endif // defined(OS_CHROMEOS)
-
namespace {
// Returns true if the user can modify the |shelf|'s auto-hide behavior.
@@ -51,13 +48,11 @@ LauncherContextMenu* LauncherContextMenu::Create(
return new DesktopShellLauncherContextMenu(controller, item, shelf);
// Create ArcLauncherContextMenu if the item is an Arc app.
-#if defined(OS_CHROMEOS)
const std::string& app_id = controller->GetAppIDForShelfID(item->id);
ArcAppListPrefs* arc_prefs = ArcAppListPrefs::Get(controller->profile());
DCHECK(arc_prefs);
if (arc_prefs->IsRegistered(app_id))
return new ArcLauncherContextMenu(controller, item, shelf);
-#endif // defined(OS_CHROMEOS)
// Create ExtensionLauncherContextMenu for the item.
return new ExtensionLauncherContextMenu(controller, item, shelf);
@@ -196,10 +191,8 @@ void LauncherContextMenu::AddShelfOptionsMenu() {
IDS_ASH_SHELF_CONTEXT_MENU_POSITION,
&shelf_alignment_menu_);
}
-#if defined(OS_CHROMEOS)
if (!controller_->IsLoggedInAsGuest())
AddItemWithStringId(MENU_CHANGE_WALLPAPER, IDS_AURA_SET_DESKTOP_WALLPAPER);
-#endif
}
bool LauncherContextMenu::ExecuteCommonCommand(int command_id,

Powered by Google App Engine
This is Rietveld 408576698