Eliminate USE_ASH macro and replace with OS_CHROMEOS
We have not shipped Windows Ash for years. There is a 1:1 mapping
between USE_ASH and OS_CHROMEOS, so consolidate them.
The BUILD.gn files will be cleaned up separately.
Bug: 673826
Test: compiles, gn check on Chrome OS, Linux and Linux Ozone
Cq-Include-Trybots: master.tryserver.chromium.android:android_optional_gpu_tests_rel;master.tryserver.chromium.linux:linux_optional_gpu_tests_rel;master.tryserver.chromium.mac:mac_optional_gpu_tests_rel;master.tryserver.chromium.win:win_optional_gpu_tests_rel
Change-Id: I5ebf64a133d1032f0d7864ed1a180d0f0b170da1
Reviewed-on: https://chromium-review.googlesource.com/692699
Commit-Queue: James Cook <[email protected]>
Reviewed-by: Scott Violet <[email protected]>
Cr-Commit-Position: refs/heads/master@{#506410}
diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc
index cedbeca..bb8329b 100644
--- a/chrome/browser/about_flags.cc
+++ b/chrome/browser/about_flags.cc
@@ -1487,9 +1487,9 @@
SINGLE_VALUE_TYPE_AND_VALUE(switches::kAllowNaClSocketAPI, "*")},
#endif // ENABLE_PLUGINS
#if defined(OS_CHROMEOS)
- {"mus", flag_descriptions::kUseMusName,
- flag_descriptions::kUseMusDescription, kOsCrOS,
- MULTI_VALUE_TYPE(kUseMusChoices)},
+ {"ash-enable-night-light", flag_descriptions::kEnableNightLightName,
+ flag_descriptions::kEnableNightLightDescription, kOsAll,
+ SINGLE_VALUE_TYPE(ash::switches::kAshEnableNightLight)},
{"allow-touchpad-three-finger-click",
flag_descriptions::kAllowTouchpadThreeFingerClickName,
flag_descriptions::kAllowTouchpadThreeFingerClickDescription, kOsCrOS,
@@ -1498,16 +1498,62 @@
flag_descriptions::kAshEnableUnifiedDesktopName,
flag_descriptions::kAshEnableUnifiedDesktopDescription, kOsCrOS,
SINGLE_VALUE_TYPE(switches::kEnableUnifiedDesktop)},
+ {
+ "disable-boot-animation", flag_descriptions::kBootAnimationName,
+ flag_descriptions::kBootAnimationDescription, kOsCrOSOwnerOnly,
+ SINGLE_DISABLE_VALUE_TYPE(chromeos::switches::kDisableBootAnimation),
+ },
{"disable-easy-unlock-bluetooth-low-energy-detection",
flag_descriptions::kEasyUnlockBluetoothLowEnergyDiscoveryName,
flag_descriptions::kEasyUnlockBluetoothLowEnergyDiscoveryDescription,
kOsCrOS,
SINGLE_DISABLE_VALUE_TYPE(
proximity_auth::switches::kDisableBluetoothLowEnergyDiscovery)},
+ {
+ "disable-office-editing-component-app",
+ flag_descriptions::kOfficeEditingComponentAppName,
+ flag_descriptions::kOfficeEditingComponentAppDescription, kOsCrOS,
+ SINGLE_DISABLE_VALUE_TYPE(
+ chromeos::switches::kDisableOfficeEditingComponentApp),
+ },
+ {
+ "enable-background-blur", flag_descriptions::kEnableBackgroundBlurName,
+ flag_descriptions::kEnableBackgroundBlurDescription, kOsCrOS,
+ FEATURE_VALUE_TYPE(app_list::features::kEnableBackgroundBlur),
+ },
{"enable-easyunlock-promotions",
flag_descriptions::kEasyUnlockPromotionsName,
flag_descriptions::kEasyUnlockPromotionsDescription, kOsCrOS,
FEATURE_VALUE_TYPE(features::kEasyUnlockPromotions)},
+ {
+ "enable-fullscreen-app-list",
+ flag_descriptions::kEnableFullscreenAppListName,
+ flag_descriptions::kEnableFullscreenAppListDescription, kOsCrOS,
+ FEATURE_VALUE_TYPE(app_list::features::kEnableFullscreenAppList),
+ },
+ {
+ "enable-pinch", flag_descriptions::kPinchScaleName,
+ flag_descriptions::kPinchScaleDescription, kOsLinux | kOsWin | kOsCrOS,
+ ENABLE_DISABLE_VALUE_TYPE(switches::kEnablePinch,
+ switches::kDisablePinch),
+ },
+ {"enable-video-player-chromecast-support",
+ flag_descriptions::kVideoPlayerChromecastSupportName,
+ flag_descriptions::kVideoPlayerChromecastSupportDescription, kOsCrOS,
+ SINGLE_VALUE_TYPE(
+ chromeos::switches::kEnableVideoPlayerChromecastSupport)},
+ {"instant-tethering", flag_descriptions::kTetherName,
+ flag_descriptions::kTetherDescription, kOsCrOS,
+ FEATURE_VALUE_TYPE(features::kInstantTethering)},
+ {"multidevice", flag_descriptions::kMultideviceName,
+ flag_descriptions::kMultideviceDescription, kOsCrOS,
+ FEATURE_VALUE_TYPE(features::kMultidevice)},
+ {"mus", flag_descriptions::kUseMusName,
+ flag_descriptions::kUseMusDescription, kOsCrOS,
+ MULTI_VALUE_TYPE(kUseMusChoices)},
+ {"show-touch-hud", flag_descriptions::kShowTouchHudName,
+ flag_descriptions::kShowTouchHudDescription, kOsAll,
+ SINGLE_VALUE_TYPE(ash::switches::kAshTouchHud)},
{"spurious-power-button-window",
flag_descriptions::kSpuriousPowerButtonWindowName,
flag_descriptions::kSpuriousPowerButtonWindowDescription, kOsCrOS,
@@ -1529,56 +1575,6 @@
flag_descriptions::kSpuriousPowerButtonLidAngleChangeDescription, kOsCrOS,
MULTI_VALUE_TYPE(kSpuriousPowerButtonLidAngleChangeChoices)},
#endif // OS_CHROMEOS
-#if defined(USE_ASH)
- {"ash-enable-night-light", flag_descriptions::kEnableNightLightName,
- flag_descriptions::kEnableNightLightDescription, kOsAll,
- SINGLE_VALUE_TYPE(ash::switches::kAshEnableNightLight)},
- {"show-touch-hud", flag_descriptions::kShowTouchHudName,
- flag_descriptions::kShowTouchHudDescription, kOsAll,
- SINGLE_VALUE_TYPE(ash::switches::kAshTouchHud)},
- {
- "enable-pinch", flag_descriptions::kPinchScaleName,
- flag_descriptions::kPinchScaleDescription, kOsLinux | kOsWin | kOsCrOS,
- ENABLE_DISABLE_VALUE_TYPE(switches::kEnablePinch,
- switches::kDisablePinch),
- },
-#endif // USE_ASH
-#if defined(OS_CHROMEOS)
- {
- "disable-boot-animation", flag_descriptions::kBootAnimationName,
- flag_descriptions::kBootAnimationDescription, kOsCrOSOwnerOnly,
- SINGLE_DISABLE_VALUE_TYPE(chromeos::switches::kDisableBootAnimation),
- },
- {"enable-video-player-chromecast-support",
- flag_descriptions::kVideoPlayerChromecastSupportName,
- flag_descriptions::kVideoPlayerChromecastSupportDescription, kOsCrOS,
- SINGLE_VALUE_TYPE(
- chromeos::switches::kEnableVideoPlayerChromecastSupport)},
- {
- "disable-office-editing-component-app",
- flag_descriptions::kOfficeEditingComponentAppName,
- flag_descriptions::kOfficeEditingComponentAppDescription, kOsCrOS,
- SINGLE_DISABLE_VALUE_TYPE(
- chromeos::switches::kDisableOfficeEditingComponentApp),
- },
- {
- "enable-fullscreen-app-list",
- flag_descriptions::kEnableFullscreenAppListName,
- flag_descriptions::kEnableFullscreenAppListDescription, kOsCrOS,
- FEATURE_VALUE_TYPE(app_list::features::kEnableFullscreenAppList),
- },
- {
- "enable-background-blur", flag_descriptions::kEnableBackgroundBlurName,
- flag_descriptions::kEnableBackgroundBlurDescription, kOsCrOS,
- FEATURE_VALUE_TYPE(app_list::features::kEnableBackgroundBlur),
- },
- {"instant-tethering", flag_descriptions::kTetherName,
- flag_descriptions::kTetherDescription, kOsCrOS,
- FEATURE_VALUE_TYPE(features::kInstantTethering)},
- {"multidevice", flag_descriptions::kMultideviceName,
- flag_descriptions::kMultideviceDescription, kOsCrOS,
- FEATURE_VALUE_TYPE(features::kMultidevice)},
-#endif // OS_CHROMEOS
{
"disable-accelerated-video-decode",
flag_descriptions::kAcceleratedVideoDecodeName,
@@ -3120,14 +3116,11 @@
"PauseBackgroundTabs")},
#endif
-#if defined(USE_ASH)
+#if defined(OS_CHROMEOS)
{"ash-disable-smooth-screen-rotation",
flag_descriptions::kAshDisableSmoothScreenRotationName,
flag_descriptions::kAshDisableSmoothScreenRotationDescription, kOsCrOS,
SINGLE_DISABLE_VALUE_TYPE(ash::switches::kAshDisableSmoothScreenRotation)},
-#endif // defined(USE_ASH)
-
-#if defined(OS_CHROMEOS)
{"enable-zip-archiver-on-file-manager",
flag_descriptions::kEnableZipArchiverOnFileManagerName,
flag_descriptions::kEnableZipArchiverOnFileManagerDescription, kOsCrOS,
diff --git a/chrome/browser/apps/app_browsertest.cc b/chrome/browser/apps/app_browsertest.cc
index 5290d1b3..bed64747 100644
--- a/chrome/browser/apps/app_browsertest.cc
+++ b/chrome/browser/apps/app_browsertest.cc
@@ -754,7 +754,7 @@
// This appears to be unreliable.
// TODO(stevenjb): Investigate and enable
-#if defined(OS_LINUX) && !defined(USE_ASH) || defined(OS_WIN) || \
+#if defined(OS_LINUX) && !defined(OS_CHROMEOS) || defined(OS_WIN) || \
defined(OS_MACOSX)
#define MAYBE_AppWindowRestoreState DISABLED_AppWindowRestoreState
#else
diff --git a/chrome/browser/browser_keyevents_browsertest.cc b/chrome/browser/browser_keyevents_browsertest.cc
index 5d842f83..1eaf0cbd 100644
--- a/chrome/browser/browser_keyevents_browsertest.cc
+++ b/chrome/browser/browser_keyevents_browsertest.cc
@@ -584,7 +584,7 @@
"U 18 0 false false true false" }
};
-#if !defined(USE_ASH)
+#if !defined(OS_CHROMEOS)
static const KeyEventTestData kTestAccess1 = {
ui::VKEY_1, false, false, true, false,
false, false, false, false, 4,
@@ -649,9 +649,9 @@
EXPECT_NO_FATAL_FAILURE(SetFocusedElement(tab_index, L""));
// Make sure no element is focused.
EXPECT_NO_FATAL_FAILURE(CheckFocusedElement(tab_index, L""));
-#if !defined(USE_ASH)
- // On Ash, alt-1..9 are assigned as window selection global accelerators, so
- // they can not be used as accesskeys.
+#if !defined(OS_CHROMEOS)
+ // On Chrome OS, alt-1..9 are assigned as window selection global
+ // accelerators, so they cannot be used as accesskeys.
EXPECT_NO_FATAL_FAILURE(TestKeyEvent(tab_index, kTestAccess1));
EXPECT_NO_FATAL_FAILURE(CheckFocusedElement(tab_index, L"1"));
#endif
diff --git a/chrome/browser/chrome_content_browser_client.cc b/chrome/browser/chrome_content_browser_client.cc
index ca20355..1cb2283 100644
--- a/chrome/browser/chrome_content_browser_client.cc
+++ b/chrome/browser/chrome_content_browser_client.cc
@@ -900,11 +900,13 @@
main_parts->AddParts(new ChromeBrowserMainExtraPartsViewsLinux());
#else
main_parts->AddParts(new ChromeBrowserMainExtraPartsViews());
-#if defined(USE_ASH)
+#endif
+#endif
+
+#if defined(OS_CHROMEOS)
+ // TODO(jamescook): Combine with ChromeBrowserMainPartsChromeos.
main_parts->AddParts(new ChromeBrowserMainExtraPartsAsh());
#endif
-#endif
-#endif
#if defined(USE_X11)
main_parts->AddParts(new ChromeBrowserMainExtraPartsX11());
diff --git a/chrome/browser/chrome_notification_types.h b/chrome/browser/chrome_notification_types.h
index fd0d3ce5..da277b66 100644
--- a/chrome/browser/chrome_notification_types.h
+++ b/chrome/browser/chrome_notification_types.h
@@ -397,7 +397,7 @@
// which was installed.
NOTIFICATION_APP_INSTALLED_TO_NTP,
-#if defined(USE_ASH)
+#if defined(OS_CHROMEOS)
// Sent when wallpaper show animation has finished.
NOTIFICATION_WALLPAPER_ANIMATION_FINISHED,
#endif
diff --git a/chrome/browser/extensions/api/desktop_capture/desktop_capture_base.cc b/chrome/browser/extensions/api/desktop_capture/desktop_capture_base.cc
index 93df4fd4..f3c85be 100644
--- a/chrome/browser/extensions/api/desktop_capture/desktop_capture_base.cc
+++ b/chrome/browser/extensions/api/desktop_capture/desktop_capture_base.cc
@@ -116,15 +116,15 @@
screen_list =
g_picker_factory->CreateMediaList(DesktopMediaID::TYPE_SCREEN);
} else {
-#if defined(USE_ASH)
+#if defined(OS_CHROMEOS)
screen_list = base::MakeUnique<DesktopMediaListAsh>(
DesktopMediaID::TYPE_SCREEN);
-#else // !defined(USE_ASH)
+#else // !defined(OS_CHROMEOS)
screen_list = base::MakeUnique<NativeDesktopMediaList>(
content::DesktopMediaID::TYPE_SCREEN,
webrtc::DesktopCapturer::CreateScreenCapturer(
content::CreateDesktopCaptureOptions()));
-#endif // !defined(USE_ASH)
+#endif // !defined(OS_CHROMEOS)
}
have_screen_list = true;
source_lists.push_back(std::move(screen_list));
@@ -139,10 +139,10 @@
window_list =
g_picker_factory->CreateMediaList(DesktopMediaID::TYPE_WINDOW);
} else {
-#if defined(USE_ASH)
+#if defined(OS_CHROMEOS)
window_list = base::MakeUnique<DesktopMediaListAsh>(
DesktopMediaID::TYPE_WINDOW);
-#else // !defined(USE_ASH)
+#else // !defined(OS_CHROMEOS)
// NativeDesktopMediaList calls the capturers on a background thread.
// This means that the two DesktopCapturer instances (for screens and
// windows) created here cannot share the same DesktopCaptureOptions
@@ -152,7 +152,7 @@
content::DesktopMediaID::TYPE_WINDOW,
webrtc::DesktopCapturer::CreateWindowCapturer(
content::CreateDesktopCaptureOptions()));
-#endif // !defined(USE_ASH)
+#endif // !defined(OS_CHROMEOS)
}
have_window_list = true;
source_lists.push_back(std::move(window_list));
diff --git a/chrome/browser/extensions/bookmark_app_helper.cc b/chrome/browser/extensions/bookmark_app_helper.cc
index 976c152..c32a0c8 100644
--- a/chrome/browser/extensions/bookmark_app_helper.cc
+++ b/chrome/browser/extensions/bookmark_app_helper.cc
@@ -80,9 +80,10 @@
#include "base/win/shortcut.h"
#endif // defined(OS_WIN)
-#if defined(USE_ASH)
+#if defined(OS_CHROMEOS)
+// gn check complains on Linux Ozone.
#include "ash/public/cpp/shelf_model.h" // nogncheck
-#include "ash/shell.h" // nogncheck
+#include "ash/shell.h"
#endif
namespace {
@@ -750,15 +751,15 @@
return;
}
-#if !defined(USE_ASH)
+#if !defined(OS_CHROMEOS)
// Pin the app to the relevant launcher depending on the OS.
Profile* current_profile = profile_->GetOriginalProfile();
-#endif // !defined(USE_ASH)
+#endif // !defined(OS_CHROMEOS)
// On Mac, shortcuts are automatically created for hosted apps when they are
// installed, so there is no need to create them again.
#if !defined(OS_MACOSX)
-#if !defined(USE_ASH)
+#if !defined(OS_CHROMEOS)
web_app::ShortcutLocations creation_locations;
#if defined(OS_LINUX) || defined(OS_WIN)
creation_locations.on_desktop = true;
@@ -772,7 +773,7 @@
creation_locations, current_profile, extension);
#else
ash::Shell::Get()->shelf_model()->PinAppWithID(extension->id());
-#endif // !defined(USE_ASH)
+#endif // !defined(OS_CHROMEOS)
#endif // !defined(OS_MACOSX)
#if defined(OS_MACOSX)
diff --git a/chrome/browser/extensions/launch_util.cc b/chrome/browser/extensions/launch_util.cc
index bedaacf..23986968 100644
--- a/chrome/browser/extensions/launch_util.cc
+++ b/chrome/browser/extensions/launch_util.cc
@@ -17,8 +17,8 @@
#include "extensions/browser/pref_names.h"
#include "extensions/common/extension.h"
-#if defined(USE_ASH)
-#include "ash/shell.h" // nogncheck
+#if defined(OS_CHROMEOS)
+#include "ash/shell.h"
#endif
namespace extensions {
@@ -116,7 +116,7 @@
// If the pref is set to launch a window (or no pref is set, and
// window opening is the default), make the container a window.
result = LAUNCH_CONTAINER_WINDOW;
-#if defined(USE_ASH)
+#if defined(OS_CHROMEOS)
} else if (prefs_launch_type == LAUNCH_TYPE_FULLSCREEN) {
// LAUNCH_TYPE_FULLSCREEN launches in a maximized app window in ash.
// For desktop chrome AURA on all platforms we should open the
diff --git a/chrome/browser/extensions/window_open_apitest.cc b/chrome/browser/extensions/window_open_apitest.cc
index 86af3e2..31604c3 100644
--- a/chrome/browser/extensions/window_open_apitest.cc
+++ b/chrome/browser/extensions/window_open_apitest.cc
@@ -38,10 +38,6 @@
#include "net/test/embedded_test_server/embedded_test_server.h"
#include "testing/gtest/include/gtest/gtest.h"
-#if defined(USE_ASH)
-#include "extensions/browser/app_window/app_window_registry.h"
-#endif
-
using content::OpenURLParams;
using content::Referrer;
using content::WebContents;
diff --git a/chrome/browser/flag_descriptions.cc b/chrome/browser/flag_descriptions.cc
index d58814d0..afcce42 100644
--- a/chrome/browser/flag_descriptions.cc
+++ b/chrome/browser/flag_descriptions.cc
@@ -2736,7 +2736,7 @@
#endif // BUILDFLAG(ENABLE_WEBRTC)
-#if defined(USE_ASH)
+#if defined(OS_CHROMEOS)
const char kAshDisableSmoothScreenRotationName[] =
"Disable smooth rotation animations.";
@@ -2791,7 +2791,7 @@
const char kUiSlowAnimationsName[] = "Slow UI animations";
const char kUiSlowAnimationsDescription[] = "Makes all UI animations slow.";
-#endif // defined(USE_ASH)
+#endif // defined(OS_CHROMEOS)
#if defined(TOOLKIT_VIEWS) || defined(OS_ANDROID)
diff --git a/chrome/browser/flag_descriptions.h b/chrome/browser/flag_descriptions.h
index 5d26322..c24fc964 100644
--- a/chrome/browser/flag_descriptions.h
+++ b/chrome/browser/flag_descriptions.h
@@ -1685,7 +1685,7 @@
#endif // BUILDFLAG(ENABLE_WEBRTC)
-#if defined(USE_ASH)
+#if defined(OS_CHROMEOS)
extern const char kAshDisableSmoothScreenRotationName[];
extern const char kAshDisableSmoothScreenRotationDescription[];
@@ -1723,7 +1723,7 @@
extern const char kUiSlowAnimationsName[];
extern const char kUiSlowAnimationsDescription[];
-#endif // defined(USE_ASH)
+#endif // defined(OS_CHROMEOS)
#if defined(TOOLKIT_VIEWS) || defined(OS_ANDROID)
diff --git a/chrome/browser/fullscreen.h b/chrome/browser/fullscreen.h
index cbb916f..71e2c5f 100644
--- a/chrome/browser/fullscreen.h
+++ b/chrome/browser/fullscreen.h
@@ -9,7 +9,7 @@
#include "build/build_config.h"
-// |display_id| is used in USE_ASH build config only, ignored otherwise.
+// |display_id| is used in OS_CHROMEOS build config only, ignored otherwise.
bool IsFullScreenMode(int64_t display_id);
#endif // CHROME_BROWSER_FULLSCREEN_H_
diff --git a/chrome/browser/lifetime/application_lifetime_aura.cc b/chrome/browser/lifetime/application_lifetime_aura.cc
index 6c57833..2aaadfa 100644
--- a/chrome/browser/lifetime/application_lifetime_aura.cc
+++ b/chrome/browser/lifetime/application_lifetime_aura.cc
@@ -15,7 +15,7 @@
#include "ui/aura/window_event_dispatcher.h"
#include "ui/views/widget/widget.h"
-#if defined(USE_ASH)
+#if defined(OS_CHROMEOS)
#include "ash/shell.h" // mash-ok
#endif
@@ -26,7 +26,7 @@
// and windows created by Ash (launcher, background, etc).
g_browser_process->notification_ui_manager()->StartShutdown();
-#if defined(USE_ASH)
+#if defined(OS_CHROMEOS)
// This is a no-op in mash, as shutting down the client will dismiss any of
// the open menus. This check was originally here to work around an x11-ism,
// but has the nice side effect of making this a no-op in mash. When we turn
diff --git a/chrome/browser/prefs/browser_prefs.cc b/chrome/browser/prefs/browser_prefs.cc
index 4df98650..8fd4914 100644
--- a/chrome/browser/prefs/browser_prefs.cc
+++ b/chrome/browser/prefs/browser_prefs.cc
@@ -258,6 +258,10 @@
#include "chrome/browser/ui/app_list/arc/arc_app_list_prefs.h"
#endif
+#if defined(OS_CHROMEOS)
+#include "chrome/browser/ui/ash/chrome_launcher_prefs.h"
+#endif
+
#if defined(OS_MACOSX)
#include "chrome/browser/ui/cocoa/apps/quit_with_apps_controller_mac.h"
#include "chrome/browser/ui/cocoa/confirm_quit.h"
@@ -279,10 +283,6 @@
#include "chrome/browser/ui/browser_view_prefs.h"
#endif
-#if defined(USE_ASH)
-#include "chrome/browser/ui/ash/chrome_launcher_prefs.h"
-#endif
-
#if !defined(OS_ANDROID)
#include "chrome/browser/ui/webui/md_history_ui.h"
#include "chrome/browser/ui/webui/settings/md_settings_ui.h"
@@ -638,7 +638,7 @@
RegisterInvertBubbleUserPrefs(registry);
#endif
-#if defined(USE_ASH)
+#if defined(OS_CHROMEOS)
RegisterChromeLauncherUserPrefs(registry);
#endif
diff --git a/chrome/browser/signin/signin_global_error_factory.cc b/chrome/browser/signin/signin_global_error_factory.cc
index 0d32252..cda5fbb 100644
--- a/chrome/browser/signin/signin_global_error_factory.cc
+++ b/chrome/browser/signin/signin_global_error_factory.cc
@@ -36,7 +36,7 @@
KeyedService* SigninGlobalErrorFactory::BuildServiceInstanceFor(
content::BrowserContext* context) const {
-#if defined(USE_ASH)
+#if defined(OS_CHROMEOS)
return nullptr;
#endif
diff --git a/chrome/browser/ui/app_list/app_list_util.cc b/chrome/browser/ui/app_list/app_list_util.cc
index 37f8e5b3..141ca3f 100644
--- a/chrome/browser/ui/app_list/app_list_util.cc
+++ b/chrome/browser/ui/app_list/app_list_util.cc
@@ -12,7 +12,7 @@
bool IsAppLauncherEnabled() {
#if !BUILDFLAG(ENABLE_APP_LIST)
return false;
-#elif defined(OS_CHROMEOS) || defined(USE_ASH)
+#elif defined(OS_CHROMEOS)
return true;
#else
PrefService* prefs = g_browser_process->local_state();
diff --git a/chrome/browser/ui/apps/chrome_app_delegate.cc b/chrome/browser/ui/apps/chrome_app_delegate.cc
index f8b73be..4058377 100644
--- a/chrome/browser/ui/apps/chrome_app_delegate.cc
+++ b/chrome/browser/ui/apps/chrome_app_delegate.cc
@@ -43,11 +43,8 @@
#include "printing/features/features.h"
#include "services/service_manager/public/cpp/interface_provider.h"
-#if defined(USE_ASH)
-#include "ash/shelf/shelf_constants.h" // nogncheck
-#endif
-
#if defined(OS_CHROMEOS)
+#include "ash/shelf/shelf_constants.h"
#include "chrome/browser/chromeos/lock_screen_apps/state_controller.h"
#endif
@@ -285,7 +282,7 @@
}
int ChromeAppDelegate::PreferredIconSize() const {
-#if defined(USE_ASH)
+#if defined(OS_CHROMEOS)
return ash::kShelfSize;
#else
return extension_misc::EXTENSION_ICON_SMALL;
diff --git a/chrome/browser/ui/bookmarks/bookmark_utils.cc b/chrome/browser/ui/bookmarks/bookmark_utils.cc
index 905d186..bfcac98 100644
--- a/chrome/browser/ui/bookmarks/bookmark_utils.cc
+++ b/chrome/browser/ui/bookmarks/bookmark_utils.cc
@@ -149,8 +149,8 @@
if (profile->IsLegacySupervised())
return false;
-#if defined(USE_ASH)
- // Don't show the apps shortcut in ash since the app launcher is enabled.
+#if defined(OS_CHROMEOS)
+ // Chrome OS uses the app list / app launcher.
return false;
#else
return search::IsInstantExtendedAPIEnabled() && !profile->IsOffTheRecord();
diff --git a/chrome/browser/ui/browser_dialogs.h b/chrome/browser/ui/browser_dialogs.h
index bde13fd..5e91989 100644
--- a/chrome/browser/ui/browser_dialogs.h
+++ b/chrome/browser/ui/browser_dialogs.h
@@ -81,7 +81,7 @@
ui::WebDialogDelegate* delegate);
#endif // !defined(OS_MACOSX)
-#if defined(USE_ASH)
+#if defined(OS_CHROMEOS)
// Creates and shows an HTML dialog with the given delegate and browser context.
// The dialog is placed in the ash window hierarchy in the given container. The
// window is automatically destroyed when it is closed.
@@ -91,7 +91,7 @@
gfx::NativeWindow ShowWebDialogInContainer(int container_id,
content::BrowserContext* context,
ui::WebDialogDelegate* delegate);
-#endif // defined(USE_ASH)
+#endif // defined(OS_CHROMEOS)
// Shows the create chrome app shortcut dialog box.
// |close_callback| may be null.
diff --git a/chrome/browser/ui/browser_navigator.cc b/chrome/browser/ui/browser_navigator.cc
index 10b0de50..fac0160 100644
--- a/chrome/browser/ui/browser_navigator.cc
+++ b/chrome/browser/ui/browser_navigator.cc
@@ -36,7 +36,7 @@
#include "content/public/browser/web_contents.h"
#include "extensions/features/features.h"
-#if defined(USE_ASH)
+#if defined(OS_CHROMEOS)
#include "chrome/browser/ui/ash/multi_user/multi_user_window_manager.h"
#include "components/signin/core/account_id/account_id.h"
#endif
@@ -435,7 +435,7 @@
if (!params->browser)
return;
-#if defined(USE_ASH)
+#if defined(OS_CHROMEOS)
if (source_browser && source_browser != params->browser) {
// When the newly created browser was spawned by a browser which visits
// another user's desktop, it should be shown on the same desktop as the
diff --git a/chrome/browser/ui/extensions/application_launch.cc b/chrome/browser/ui/extensions/application_launch.cc
index e1866291..b258492a 100644
--- a/chrome/browser/ui/extensions/application_launch.cc
+++ b/chrome/browser/ui/extensions/application_launch.cc
@@ -177,7 +177,7 @@
if (chrome::IsRunningInForcedAppMode())
return ui::SHOW_STATE_FULLSCREEN;
-#if defined(USE_ASH)
+#if defined(OS_CHROMEOS)
// In ash, LAUNCH_TYPE_FULLSCREEN launches in a maximized app window and
// LAUNCH_TYPE_WINDOW launches in a default app window.
extensions::LaunchType launch_type =
@@ -304,7 +304,7 @@
contents = params.target_contents;
}
-#if defined(USE_ASH)
+#if defined(OS_CHROMEOS)
// In ash, LAUNCH_FULLSCREEN launches in the OpenApplicationWindow function
// i.e. it should not reach here.
DCHECK(launch_type != extensions::LAUNCH_TYPE_FULLSCREEN);
@@ -317,7 +317,7 @@
!browser->window()->IsFullscreen()) {
chrome::ToggleFullscreenMode(browser);
}
-#endif // USE_ASH
+#endif // OS_CHROMEOS
return contents;
}
diff --git a/chrome/browser/ui/toolbar/app_menu_model.cc b/chrome/browser/ui/toolbar/app_menu_model.cc
index 89a42fe..605596c 100644
--- a/chrome/browser/ui/toolbar/app_menu_model.cc
+++ b/chrome/browser/ui/toolbar/app_menu_model.cc
@@ -74,6 +74,7 @@
#endif
#if defined(OS_CHROMEOS)
+#include "ash/shell.h"
#include "chromeos/chromeos_switches.h"
#endif
@@ -84,10 +85,6 @@
#include "content/public/browser/gpu_data_manager.h"
#endif
-#if defined(USE_ASH)
-#include "ash/shell.h" // nogncheck
-#endif
-
using base::UserMetricsAction;
using content::WebContents;
diff --git a/chrome/browser/ui/toolbar/recent_tabs_sub_menu_model.cc b/chrome/browser/ui/toolbar/recent_tabs_sub_menu_model.cc
index bdd1d2e..32c1367 100644
--- a/chrome/browser/ui/toolbar/recent_tabs_sub_menu_model.cc
+++ b/chrome/browser/ui/toolbar/recent_tabs_sub_menu_model.cc
@@ -45,9 +45,9 @@
#include "ui/gfx/paint_vector_icon.h"
#endif
-#if defined(USE_ASH)
-#include "ash/accelerators/accelerator_table.h" // nogncheck
-#endif // defined(USE_ASH)
+#if defined(OS_CHROMEOS)
+#include "ash/accelerators/accelerator_table.h"
+#endif
namespace {
@@ -220,7 +220,7 @@
// Retrieve accelerator key for IDC_RESTORE_TAB now, because on ASH, it's not
// defined in |accelerator_provider|, but in shell, so simply retrieve it now
// for all ASH and non-ASH for use in |GetAcceleratorForCommandId|.
-#if defined(USE_ASH)
+#if defined(OS_CHROMEOS)
for (size_t i = 0; i < ash::kAcceleratorDataLength; ++i) {
const ash::AcceleratorData& accel_data = ash::kAcceleratorData[i];
if (accel_data.action == ash::RESTORE_TAB) {
@@ -234,7 +234,7 @@
accelerator_provider->GetAcceleratorForCommandId(
IDC_RESTORE_TAB, &reopen_closed_tab_accelerator_);
}
-#endif // defined(USE_ASH)
+#endif // defined(OS_CHROMEOS)
if (accelerator_provider) {
accelerator_provider->GetAcceleratorForCommandId(
diff --git a/chrome/browser/ui/views/accelerator_table.cc b/chrome/browser/ui/views/accelerator_table.cc
index 09cc8f0..4900d554 100644
--- a/chrome/browser/ui/views/accelerator_table.cc
+++ b/chrome/browser/ui/views/accelerator_table.cc
@@ -13,8 +13,8 @@
#include "ui/base/accelerators/accelerator.h"
#include "ui/events/event_constants.h"
-#if defined(USE_ASH)
-#include "ash/accelerators/accelerator_table.h" // nogncheck
+#if defined(OS_CHROMEOS)
+#include "ash/accelerators/accelerator_table.h"
#endif
namespace {
@@ -274,7 +274,7 @@
};
const size_t kRepeatableCommandIdsLength = arraysize(kRepeatableCommandIds);
-#if defined(USE_ASH)
+#if defined(OS_CHROMEOS)
// Below we map Chrome command ids to Ash action ids for commands that have
// an shortcut that is handled by Ash (instead of Chrome). Adding entries
// here will show shortcut text on menus. See comment above.
@@ -298,7 +298,7 @@
};
const size_t kChromeCmdId2AshActionIdLength =
arraysize(kChromeCmdId2AshActionId);
-#endif // defined(USE_ASH)
+#endif // defined(OS_CHROMEOS)
} // namespace
@@ -311,7 +311,7 @@
bool GetAshAcceleratorForCommandId(int command_id,
ui::Accelerator* accelerator) {
-#if defined(USE_ASH)
+#if defined(OS_CHROMEOS)
for (size_t i = 0; i < kChromeCmdId2AshActionIdLength; ++i) {
if (command_id == kChromeCmdId2AshActionId[i].chrome_cmd_id) {
for (size_t j = 0; j < ash::kAcceleratorDataLength; ++j) {
@@ -324,7 +324,7 @@
}
}
}
-#endif // defined(USE_ASH)
+#endif // defined(OS_CHROMEOS)
return false;
}
diff --git a/chrome/browser/ui/views/accelerator_table_unittest.cc b/chrome/browser/ui/views/accelerator_table_unittest.cc
index 6f9a2fa..c3ba8a24 100644
--- a/chrome/browser/ui/views/accelerator_table_unittest.cc
+++ b/chrome/browser/ui/views/accelerator_table_unittest.cc
@@ -11,9 +11,9 @@
#include "testing/gtest/include/gtest/gtest.h"
#include "ui/events/event_constants.h"
-#if defined(USE_ASH)
+#if defined(OS_CHROMEOS)
#include "ash/accelerators/accelerator_table.h"
-#endif // USE_ASH
+#endif
namespace chrome {
@@ -102,6 +102,6 @@
<< (ash_entry.action);
}
}
-#endif // USE_ASH
+#endif // OS_CHROMEOS
} // namespace chrome
diff --git a/chrome/browser/ui/views/accelerator_utils_aura.cc b/chrome/browser/ui/views/accelerator_utils_aura.cc
index 8c6414c9..230ba83 100644
--- a/chrome/browser/ui/views/accelerator_utils_aura.cc
+++ b/chrome/browser/ui/views/accelerator_utils_aura.cc
@@ -8,14 +8,14 @@
#include "chrome/browser/ui/views/accelerator_table.h"
#include "ui/base/accelerators/accelerator.h"
-#if defined(USE_ASH)
-#include "ash/accelerators/accelerator_table.h" // nogncheck
-#endif // USE_ASH
+#if defined(OS_CHROMEOS)
+#include "ash/accelerators/accelerator_table.h"
+#endif
namespace chrome {
bool IsChromeAccelerator(const ui::Accelerator& accelerator, Profile* profile) {
-#if defined(USE_ASH)
+#if defined(OS_CHROMEOS)
for (size_t i = 0; i < ash::kAcceleratorDataLength; ++i) {
const ash::AcceleratorData& accel_data = ash::kAcceleratorData[i];
if (accel_data.keycode == accelerator.key_code() &&
diff --git a/chrome/browser/ui/views/apps/app_info_dialog/app_info_footer_panel.cc b/chrome/browser/ui/views/apps/app_info_dialog/app_info_footer_panel.cc
index 3e27eb1..6b61da37 100644
--- a/chrome/browser/ui/views/apps/app_info_dialog/app_info_footer_panel.cc
+++ b/chrome/browser/ui/views/apps/app_info_dialog/app_info_footer_panel.cc
@@ -21,10 +21,11 @@
#include "ui/views/view.h"
#include "ui/views/widget/widget.h"
-#if defined(USE_ASH)
+#if defined(OS_CHROMEOS)
+// gn check complains on Linux Ozone.
#include "ash/public/cpp/shelf_model.h" // nogncheck
-#include "ash/shell.h" // nogncheck
-#include "chrome/browser/ui/ash/launcher/chrome_launcher_controller_util.h" // nogncheck
+#include "ash/shell.h"
+#include "chrome/browser/ui/ash/launcher/chrome_launcher_controller_util.h"
#endif
AppInfoFooterPanel::AppInfoFooterPanel(gfx::NativeWindow parent_window,
@@ -59,7 +60,7 @@
IDS_APPLICATION_INFO_CREATE_SHORTCUTS_BUTTON_TEXT));
}
-#if defined(USE_ASH)
+#if defined(OS_CHROMEOS)
if (CanSetPinnedToShelf()) {
pin_to_shelf_button_ = views::MdTextButton::CreateSecondaryUiButton(
this, l10n_util::GetStringUTF16(IDS_APP_LIST_CONTEXT_MENU_PIN));
@@ -90,7 +91,7 @@
}
void AppInfoFooterPanel::UpdatePinButtons(bool focus_visible_button) {
-#if defined(USE_ASH)
+#if defined(OS_CHROMEOS)
if (pin_to_shelf_button_ && unpin_from_shelf_button_) {
bool is_pinned = !ash::Shell::Get()->shelf_model()->IsAppPinned(app_->id());
pin_to_shelf_button_->SetVisible(is_pinned);
@@ -109,7 +110,7 @@
const ui::Event& event) {
if (sender == create_shortcuts_button_) {
CreateShortcuts();
-#if defined(USE_ASH)
+#if defined(OS_CHROMEOS)
} else if (sender == pin_to_shelf_button_) {
SetPinnedToShelf(true);
} else if (sender == unpin_from_shelf_button_) {
@@ -142,16 +143,16 @@
}
bool AppInfoFooterPanel::CanCreateShortcuts() const {
-#if defined(USE_ASH)
+#if defined(OS_CHROMEOS)
// Ash platforms can't create shortcuts.
return false;
#else
// Extensions and the Chrome component app can't have shortcuts.
return app_->id() != extension_misc::kChromeAppId && !app_->is_extension();
-#endif // USE_ASH
+#endif // OS_CHROMEOS
}
-#if defined(USE_ASH)
+#if defined(OS_CHROMEOS)
void AppInfoFooterPanel::SetPinnedToShelf(bool value) {
DCHECK(CanSetPinnedToShelf());
ash::ShelfModel* shelf_model = ash::Shell::Get()->shelf_model();
@@ -175,7 +176,7 @@
(GetPinnableForAppID(app_->id(), profile_) ==
AppListControllerDelegate::PIN_EDITABLE);
}
-#endif // USE_ASH
+#endif // OS_CHROMEOS
void AppInfoFooterPanel::UninstallApp() {
DCHECK(CanUninstallApp());
diff --git a/chrome/browser/ui/views/apps/app_info_dialog/app_info_footer_panel.h b/chrome/browser/ui/views/apps/app_info_dialog/app_info_footer_panel.h
index 0dc6740..6499d95 100644
--- a/chrome/browser/ui/views/apps/app_info_dialog/app_info_footer_panel.h
+++ b/chrome/browser/ui/views/apps/app_info_dialog/app_info_footer_panel.h
@@ -62,7 +62,7 @@
void CreateShortcuts();
bool CanCreateShortcuts() const;
-#if defined(USE_ASH)
+#if defined(OS_CHROMEOS)
// Pins and unpins the app from the shelf. Must only be called if
// CanSetPinnedToShelf() returns true.
void SetPinnedToShelf(bool value);
diff --git a/chrome/browser/ui/views/bookmarks/bookmark_bar_view.cc b/chrome/browser/ui/views/bookmarks/bookmark_bar_view.cc
index a0b5cac..8b38d1eb 100644
--- a/chrome/browser/ui/views/bookmarks/bookmark_bar_view.cc
+++ b/chrome/browser/ui/views/bookmarks/bookmark_bar_view.cc
@@ -2144,7 +2144,7 @@
}
void BookmarkBarView::UpdateBookmarksSeparatorVisibility() {
-#if defined(USE_ASH)
+#if defined(OS_CHROMEOS)
// Ash does not paint the bookmarks separator line because it looks odd on
// the flat background. We keep it present for layout, but don't draw it.
bookmarks_separator_view_->SetVisible(false);
diff --git a/chrome/browser/ui/views/chrome_web_dialog_view.cc b/chrome/browser/ui/views/chrome_web_dialog_view.cc
index 041dc9d..1f7f57d5 100644
--- a/chrome/browser/ui/views/chrome_web_dialog_view.cc
+++ b/chrome/browser/ui/views/chrome_web_dialog_view.cc
@@ -8,13 +8,14 @@
#include "ui/views/controls/webview/web_dialog_view.h"
#include "ui/views/widget/widget.h"
-#if defined(USE_ASH)
+#if defined(OS_CHROMEOS)
+// gn check complains on Linux Ozone.
#include "ash/public/cpp/shell_window_ids.h" // nogncheck
-#include "ash/shell.h" // nogncheck
+#include "ash/shell.h"
#include "chrome/browser/ui/ash/ash_util.h"
#include "services/ui/public/cpp/property_type_converters.h"
#include "services/ui/public/interfaces/window_manager.mojom.h"
-#endif // defined(USE_ASH)
+#endif // defined(OS_CHROMEOS)
namespace chrome {
namespace {
@@ -49,7 +50,7 @@
return ShowWebDialogWidget(params, view);
}
-#if defined(USE_ASH)
+#if defined(OS_CHROMEOS)
gfx::NativeWindow ShowWebDialogInContainer(int container_id,
content::BrowserContext* context,
ui::WebDialogDelegate* delegate) {
@@ -68,6 +69,6 @@
}
return ShowWebDialogWidget(params, view);
}
-#endif // defined(USE_ASH)
+#endif // defined(OS_CHROMEOS)
} // namespace chrome
diff --git a/chrome/browser/ui/views/desktop_capture/desktop_media_list_view.cc b/chrome/browser/ui/views/desktop_capture/desktop_media_list_view.cc
index 123d1a1..00e7121b 100644
--- a/chrome/browser/ui/views/desktop_capture/desktop_media_list_view.cc
+++ b/chrome/browser/ui/views/desktop_capture/desktop_media_list_view.cc
@@ -29,7 +29,7 @@
const int kDesktopMediaSourceViewGroupId = 1;
-#if defined(USE_ASH)
+#if defined(OS_CHROMEOS)
// Here we are going to display default app icon for app windows without an
// icon, and display product logo for chrome browser windows.
gfx::ImageSkia LoadDefaultIcon(aura::Window* window) {
@@ -175,7 +175,7 @@
source_view->SetGroup(kDesktopMediaSourceViewGroupId);
if (source.id.type == DesktopMediaID::TYPE_WINDOW) {
gfx::ImageSkia icon_image = GetWindowIcon(source.id);
-#if defined(USE_ASH)
+#if defined(OS_CHROMEOS)
// Empty icons are used to represent default icon for aura windows. By
// detecting this, we load the default icon from resource.
if (icon_image.isNull()) {
diff --git a/chrome/browser/ui/views/desktop_capture/desktop_media_picker_views.cc b/chrome/browser/ui/views/desktop_capture/desktop_media_picker_views.cc
index 9a29360..21e63cfe 100644
--- a/chrome/browser/ui/views/desktop_capture/desktop_media_picker_views.cc
+++ b/chrome/browser/ui/views/desktop_capture/desktop_media_picker_views.cc
@@ -37,7 +37,7 @@
namespace {
-#if !defined(USE_ASH)
+#if !defined(OS_CHROMEOS)
DesktopMediaID::Id AcceleratedWidgetToDesktopMediaId(
gfx::AcceleratedWidget accelerated_widget) {
#if defined(OS_WIN)
@@ -229,7 +229,7 @@
DesktopMediaID::TYPE_WINDOW, widget->GetNativeWindow());
// Set native window ID if the windows is outside Ash.
-#if !defined(USE_ASH)
+#if !defined(OS_CHROMEOS)
dialog_window_id.id = AcceleratedWidgetToDesktopMediaId(
widget->GetNativeWindow()->GetHost()->GetAcceleratedWidget());
#endif
diff --git a/chrome/browser/ui/views/frame/immersive_mode_controller_factory_views.cc b/chrome/browser/ui/views/frame/immersive_mode_controller_factory_views.cc
index c96cd0624..46810e5 100644
--- a/chrome/browser/ui/views/frame/immersive_mode_controller_factory_views.cc
+++ b/chrome/browser/ui/views/frame/immersive_mode_controller_factory_views.cc
@@ -4,18 +4,18 @@
#include "chrome/browser/ui/views/frame/immersive_mode_controller_stub.h"
-#if defined(USE_ASH)
+#if defined(OS_CHROMEOS)
#include "chrome/browser/ui/views/frame/immersive_mode_controller_ash.h"
#endif
namespace chrome {
ImmersiveModeController* CreateImmersiveModeController() {
-#if defined(USE_ASH)
+#if defined(OS_CHROMEOS)
return new ImmersiveModeControllerAsh();
#else
return new ImmersiveModeControllerStub();
-#endif // USE_ASH
+#endif // OS_CHROMEOS
}
} // namespace chrome
diff --git a/chrome/browser/ui/views/harmony/chrome_typography.cc b/chrome/browser/ui/views/harmony/chrome_typography.cc
index 0db1d7d..ab20e9e 100644
--- a/chrome/browser/ui/views/harmony/chrome_typography.cc
+++ b/chrome/browser/ui/views/harmony/chrome_typography.cc
@@ -30,7 +30,7 @@
gfx::Font::Weight font_weight;
GetDefaultFont(context, style, &size_delta, &font_weight);
-#if defined(USE_ASH)
+#if defined(OS_CHROMEOS)
ash::ApplyAshFontStyles(context, style, &size_delta, &font_weight);
#endif
diff --git a/chrome/browser/ui/views/harmony/chrome_typography.h b/chrome/browser/ui/views/harmony/chrome_typography.h
index 5c63e35c..0541287f 100644
--- a/chrome/browser/ui/views/harmony/chrome_typography.h
+++ b/chrome/browser/ui/views/harmony/chrome_typography.h
@@ -10,12 +10,13 @@
#include "ui/views/style/typography.h"
#include "ui/views/style/typography_provider.h"
-#if defined(USE_ASH)
+#if defined(OS_CHROMEOS)
+// gn check complains on Linux Ozone.
#include "ash/public/cpp/ash_typography.h" // nogncheck
#endif
enum ChromeTextContext {
-#if defined(USE_ASH)
+#if defined(OS_CHROMEOS)
CHROME_TEXT_CONTEXT_START = ash::ASH_TEXT_CONTEXT_END,
#else
CHROME_TEXT_CONTEXT_START = views::style::VIEWS_TEXT_CONTEXT_END,
diff --git a/chrome/browser/ui/views/harmony/harmony_typography_provider.cc b/chrome/browser/ui/views/harmony/harmony_typography_provider.cc
index 591e863..b21820f0 100644
--- a/chrome/browser/ui/views/harmony/harmony_typography_provider.cc
+++ b/chrome/browser/ui/views/harmony/harmony_typography_provider.cc
@@ -17,7 +17,8 @@
#include "ui/native_theme/native_theme_win.h"
#endif
-#if defined(USE_ASH)
+#if defined(OS_CHROMEOS)
+// gn check complains on Linux Ozone.
#include "ash/public/cpp/ash_typography.h" // nogncheck
#endif
@@ -114,7 +115,7 @@
int size_delta = kDefaultSize - gfx::PlatformFont::kDefaultBaseFontSize;
gfx::Font::Weight font_weight = gfx::Font::Weight::NORMAL;
-#if defined(USE_ASH)
+#if defined(OS_CHROMEOS)
ash::ApplyAshFontStyles(context, style, &size_delta, &font_weight);
#endif
diff --git a/chrome/browser/ui/views/location_bar/icon_label_bubble_view_unittest.cc b/chrome/browser/ui/views/location_bar/icon_label_bubble_view_unittest.cc
index 3fe2d65..3188adfe 100644
--- a/chrome/browser/ui/views/location_bar/icon_label_bubble_view_unittest.cc
+++ b/chrome/browser/ui/views/location_bar/icon_label_bubble_view_unittest.cc
@@ -16,7 +16,7 @@
#include "ui/views/controls/image_view.h"
#include "ui/views/test/views_test_base.h"
-#if defined(USE_ASH)
+#if defined(OS_CHROMEOS)
#include "ui/aura/window.h"
#endif
@@ -347,7 +347,7 @@
}
#endif
-#if defined(USE_ASH)
+#if defined(OS_CHROMEOS)
// Verifies IconLabelBubbleView::CalculatePreferredSize() doesn't crash when
// there is a widget but no compositor.
using IconLabelBubbleViewCrashTest = views::ViewsTestBase;
diff --git a/chrome/browser/ui/views/location_bar/zoom_bubble_view_browsertest.cc b/chrome/browser/ui/views/location_bar/zoom_bubble_view_browsertest.cc
index a72eb73..c1db4d9 100644
--- a/chrome/browser/ui/views/location_bar/zoom_bubble_view_browsertest.cc
+++ b/chrome/browser/ui/views/location_bar/zoom_bubble_view_browsertest.cc
@@ -13,7 +13,7 @@
#include "chrome/browser/ui/views/frame/immersive_mode_controller.h"
#include "chrome/test/base/in_process_browser_test.h"
-#if defined(USE_ASH)
+#if defined(OS_CHROMEOS)
#include "ash/public/cpp/immersive/immersive_fullscreen_controller_test_api.h"
#include "chrome/browser/ui/views/frame/immersive_mode_controller_ash.h"
#include "ui/aura/test/env_test_helper.h"
diff --git a/chrome/browser/ui/views/screen_capture_notification_ui_views.cc b/chrome/browser/ui/views/screen_capture_notification_ui_views.cc
index 802385a4..e96a4dc 100644
--- a/chrome/browser/ui/views/screen_capture_notification_ui_views.cc
+++ b/chrome/browser/ui/views/screen_capture_notification_ui_views.cc
@@ -29,8 +29,8 @@
#include "ui/views/win/hwnd_util.h"
#endif
-#if defined(USE_ASH)
-#include "ash/shell.h" // nogncheck
+#if defined(OS_CHROMEOS)
+#include "ash/shell.h"
#endif
namespace {
@@ -180,7 +180,7 @@
params.remove_standard_frame = true;
params.keep_on_top = true;
-#if defined(USE_ASH)
+#if defined(OS_CHROMEOS)
// TODO(sergeyu): The notification bar must be shown on the monitor that's
// being captured. Make sure it's always the case. Currently we always capture
// the primary monitor.
diff --git a/chrome/browser/ui/views/status_bubble_views.cc b/chrome/browser/ui/views/status_bubble_views.cc
index a9ff30a..c3dd3cd7 100644
--- a/chrome/browser/ui/views/status_bubble_views.cc
+++ b/chrome/browser/ui/views/status_bubble_views.cc
@@ -39,9 +39,9 @@
#include "ui/views/widget/widget.h"
#include "url/gurl.h"
-#if defined(USE_ASH)
-#include "ash/shell.h" // nogncheck
-#include "ash/wm/window_state.h" // nogncheck
+#if defined(OS_CHROMEOS)
+#include "ash/shell.h"
+#include "ash/wm/window_state.h"
#endif
#if defined(USE_AURA)
diff --git a/chrome/browser/ui/views/tabs/browser_tab_strip_controller.cc b/chrome/browser/ui/views/tabs/browser_tab_strip_controller.cc
index c487b4aa..ba2dacd6 100644
--- a/chrome/browser/ui/views/tabs/browser_tab_strip_controller.cc
+++ b/chrome/browser/ui/views/tabs/browser_tab_strip_controller.cc
@@ -81,7 +81,7 @@
bool DetermineTabStripLayoutStacked(PrefService* prefs, bool* adjust_layout) {
*adjust_layout = false;
// For ash, always allow entering stacked mode.
-#if defined(USE_ASH)
+#if defined(OS_CHROMEOS)
*adjust_layout = true;
return prefs->GetBoolean(prefs::kTabStripStackedLayout);
#else
diff --git a/chrome/browser/ui/views/tabs/tab_drag_controller_interactive_uitest.cc b/chrome/browser/ui/views/tabs/tab_drag_controller_interactive_uitest.cc
index 5804d2f..b2b56a26 100644
--- a/chrome/browser/ui/views/tabs/tab_drag_controller_interactive_uitest.cc
+++ b/chrome/browser/ui/views/tabs/tab_drag_controller_interactive_uitest.cc
@@ -61,7 +61,7 @@
#include "ui/views/widget/desktop_aura/desktop_native_widget_aura.h"
#endif
-#if defined(USE_ASH)
+#if defined(OS_CHROMEOS)
#include "ash/public/cpp/ash_switches.h"
#include "ash/public/cpp/immersive/immersive_fullscreen_controller_test_api.h"
#include "ash/shell.h"
@@ -230,17 +230,17 @@
}
bool GetIsDragged(Browser* browser) {
-#if !defined(USE_ASH) || defined(OS_WIN) // TODO(win_ash)
- return false;
-#else
+#if defined(OS_CHROMEOS)
return ash::wm::GetWindowState(browser->window()->GetNativeWindow())->
is_dragged();
+#else
+ return false;
#endif
}
} // namespace
-#if defined(USE_ASH) && !defined(OS_WIN) // TODO(win_ash)
+#if defined(OS_CHROMEOS)
class ScreenEventGeneratorDelegate
: public aura::test::EventGeneratorDelegateAura {
public:
@@ -2456,7 +2456,7 @@
#endif // OS_CHROMEOS
-#if defined(USE_ASH)
+#if defined(OS_CHROMEOS)
INSTANTIATE_TEST_CASE_P(TabDragging,
DetachToBrowserInSeparateDisplayTabDragControllerTest,
::testing::Values("mouse", "touch"));
diff --git a/chrome/browser/ui/views/tabs/tab_strip.cc b/chrome/browser/ui/views/tabs/tab_strip.cc
index 3f0eff0..2f5b8f4 100644
--- a/chrome/browser/ui/views/tabs/tab_strip.cc
+++ b/chrome/browser/ui/views/tabs/tab_strip.cc
@@ -98,7 +98,7 @@
const int kStackedPadding = 6;
// See UpdateLayoutTypeFromMouseEvent() for a description of these.
-#if !defined(USE_ASH)
+#if !defined(OS_CHROMEOS)
const int kMouseMoveTimeMS = 200;
const int kMouseMoveCountBeforeConsiderReal = 3;
#endif
@@ -720,7 +720,7 @@
}
SkAlpha TabStrip::GetInactiveAlpha(bool for_new_tab_button) const {
-#if defined(USE_ASH)
+#if defined(OS_CHROMEOS)
static const SkAlpha kInactiveTabAlphaAsh = 230;
const SkAlpha base_alpha = kInactiveTabAlphaAsh;
#else
@@ -728,7 +728,7 @@
static const SkAlpha kInactiveTabAlphaOpaque = 255;
const SkAlpha base_alpha = GetWidget()->ShouldWindowContentsBeTransparent() ?
kInactiveTabAlphaGlass : kInactiveTabAlphaOpaque;
-#endif // USE_ASH
+#endif // OS_CHROMEOS
static const double kMultiSelectionMultiplier = 0.6;
return (for_new_tab_button || (GetSelectionModel().size() <= 1)) ?
base_alpha : static_cast<SkAlpha>(kMultiSelectionMultiplier * base_alpha);
@@ -1833,7 +1833,7 @@
break;
case ui::ET_MOUSE_MOVED: {
-#if defined(USE_ASH)
+#if defined(OS_CHROMEOS)
// Ash does not synthesize mouse events from touch events.
SetResetToShrinkOnExit(true);
#else
diff --git a/chrome/browser/ui/views/task_manager_view.cc b/chrome/browser/ui/views/task_manager_view.cc
index cb1bb38..d0cd339 100644
--- a/chrome/browser/ui/views/task_manager_view.cc
+++ b/chrome/browser/ui/views/task_manager_view.cc
@@ -34,17 +34,17 @@
#include "ui/views/widget/widget.h"
#include "ui/views/window/dialog_client_view.h"
-#if defined(USE_ASH)
-// Note: gn check complains here, despite the correct conditional //ash dep.
-#include "ash/public/cpp/shelf_item.h" // nogncheck
-#include "ash/public/cpp/window_properties.h" // nogncheck
-#include "ash/resources/grit/ash_resources.h" // nogncheck
-#include "ash/wm/window_util.h" // nogncheck
-#include "chrome/browser/ui/ash/ash_util.h" // nogncheck
+#if defined(OS_CHROMEOS)
+// gn check complains on Linux Ozone.
+#include "ash/public/cpp/shelf_item.h" // nogncheck
+#include "ash/public/cpp/window_properties.h" // nogncheck
+#include "ash/resources/grit/ash_resources.h"
+#include "ash/wm/window_util.h"
+#include "chrome/browser/ui/ash/ash_util.h"
#include "ui/aura/client/aura_constants.h"
#include "ui/base/resource/resource_bundle.h"
#include "ui/gfx/image/image_skia.h"
-#endif // defined(USE_ASH)
+#endif // defined(OS_CHROMEOS)
#if defined(OS_WIN)
#include "chrome/browser/shell_integration_win.h"
@@ -78,7 +78,7 @@
gfx::NativeWindow context =
browser ? browser->window()->GetNativeWindow() : nullptr;
-#if defined(USE_ASH)
+#if defined(OS_CHROMEOS)
if (!ash_util::IsRunningInMash() && !context)
context = ash::wm::GetActiveWindow();
#endif
@@ -101,7 +101,7 @@
g_task_manager_view->SelectTaskOfActiveTab(browser);
g_task_manager_view->GetWidget()->Show();
-#if defined(USE_ASH)
+#if defined(OS_CHROMEOS)
aura::Window* window = g_task_manager_view->GetWidget()->GetNativeWindow();
// An app id for task manager windows, also used to identify the shelf item.
// Generated as crx_file::id_util::GenerateId("org.chromium.taskmanager")
diff --git a/chrome/browser/ui/views/toolbar/toolbar_view.cc b/chrome/browser/ui/views/toolbar/toolbar_view.cc
index 5c409e7..536516a 100644
--- a/chrome/browser/ui/views/toolbar/toolbar_view.cc
+++ b/chrome/browser/ui/views/toolbar/toolbar_view.cc
@@ -81,25 +81,11 @@
#include "chrome/browser/ui/views/outdated_upgrade_bubble_view.h"
#endif
-#if defined(USE_ASH)
-#include "ash/shell.h" // nogncheck
-#endif
-
using base::UserMetricsAction;
using content::WebContents;
namespace {
-#if !defined(OS_CHROMEOS)
-bool HasAshShell() {
-#if defined(USE_ASH)
- return ash::Shell::HasInstance();
-#else
- return false;
-#endif // USE_ASH
-}
-#endif // OS_CHROMEOS
-
int GetToolbarHorizontalPadding() {
using Md = ui::MaterialDesignController;
return Md::GetMode() == Md::MATERIAL_HYBRID ? 8 : 4;
@@ -224,10 +210,7 @@
// Start global error services now so we set the icon on the menu correctly.
#if !defined(OS_CHROMEOS)
- if (!HasAshShell()) {
- SigninGlobalErrorFactory::GetForProfile(browser_->profile());
- }
-
+ SigninGlobalErrorFactory::GetForProfile(browser_->profile());
#if defined(OS_WIN)
RecoveryInstallGlobalErrorFactory::GetForProfile(browser_->profile());
#endif
diff --git a/chrome/browser/ui/window_sizer/window_sizer.cc b/chrome/browser/ui/window_sizer/window_sizer.cc
index 0823a6b..f7788c5 100644
--- a/chrome/browser/ui/window_sizer/window_sizer.cc
+++ b/chrome/browser/ui/window_sizer/window_sizer.cc
@@ -22,11 +22,11 @@
#include "ui/display/display.h"
#include "ui/display/screen.h"
-#if defined(USE_ASH)
+#if defined(OS_CHROMEOS)
#include "ash/public/cpp/ash_switches.h" // nogncheck
-#include "ash/shell.h" // nogncheck
-#include "ash/wm/window_positioner.h" // nogncheck
-#include "chrome/browser/ui/ash/ash_util.h" // nogncheck
+#include "ash/shell.h"
+#include "ash/wm/window_positioner.h"
+#include "chrome/browser/ui/ash/ash_util.h"
#endif
namespace {
@@ -147,7 +147,7 @@
display::Display GetTargetDisplay(const display::Screen* screen,
const gfx::Rect& bounds) const override {
-#if defined(USE_ASH)
+#if defined(OS_CHROMEOS)
// Use the target display on ash.
if (ash_util::ShouldOpenAshOnStartup()) {
aura::Window* target = ash::Shell::GetRootWindowForNewWindows();
@@ -223,7 +223,7 @@
*show_state = GetWindowDefaultShowState();
*bounds = specified_bounds;
-#if defined(USE_ASH)
+#if defined(OS_CHROMEOS)
// See if ash should decide the window placement.
if (GetBrowserBoundsAsh(bounds, show_state))
return;
@@ -288,7 +288,7 @@
void WindowSizer::GetDefaultWindowBounds(const display::Display& display,
gfx::Rect* default_bounds) const {
DCHECK(default_bounds);
-#if defined(USE_ASH)
+#if defined(OS_CHROMEOS)
// TODO(beng): insufficient but currently necessary. http://crbug.com/133312
if (ash_util::ShouldOpenAshOnStartup()) {
*default_bounds = ash::WindowPositioner::GetDefaultWindowBounds(display);
diff --git a/chrome/browser/ui/window_sizer/window_sizer.h b/chrome/browser/ui/window_sizer/window_sizer.h
index 3b9ffff..546e2cc 100644
--- a/chrome/browser/ui/window_sizer/window_sizer.h
+++ b/chrome/browser/ui/window_sizer/window_sizer.h
@@ -161,7 +161,7 @@
// ash's the target root window.
display::Display GetTargetDisplay(const gfx::Rect& bounds) const;
-#if defined(USE_ASH)
+#if defined(OS_CHROMEOS)
// Ash specific logic for window placement. Returns true if |bounds| and
// |show_state| have been fully determined, otherwise returns false (but
// may still affect |show_state|).