features.cc 809 B

12345678910111213141516171819202122232425262728
  1. // Copyright 2021 The Chromium Authors. All rights reserved.
  2. // Use of this source code is governed by a BSD-style license that can be
  3. // found in the LICENSE file.
  4. #include "chromeos/ui/wm/features.h"
  5. #if BUILDFLAG(IS_CHROMEOS_LACROS)
  6. #include "chromeos/startup/browser_params_proxy.h"
  7. #endif
  8. namespace chromeos::wm::features {
  9. // Enables a window to float.
  10. // https://crbug.com/1240411
  11. const base::Feature kFloatWindow{"CrOSLabsFloatWindow",
  12. base::FEATURE_DISABLED_BY_DEFAULT};
  13. bool IsFloatWindowEnabled() {
  14. #if BUILDFLAG(IS_CHROMEOS_ASH)
  15. return base::FeatureList::IsEnabled(kFloatWindow);
  16. #elif BUILDFLAG(IS_CHROMEOS_LACROS)
  17. return chromeos::BrowserParamsProxy::Get()->IsFloatWindowEnabled();
  18. #else
  19. return false;
  20. #endif
  21. }
  22. } // namespace chromeos::wm::features