scoped_disable_client_side_decorations_for_test.cc 745 B

12345678910111213141516171819202122232425
  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 "chrome/browser/scoped_disable_client_side_decorations_for_test.h"
  5. #if defined(USE_OZONE)
  6. #include "ui/ozone/public/ozone_platform.h"
  7. #endif
  8. namespace ui {
  9. ScopedDisableClientSideDecorationsForTest::
  10. ScopedDisableClientSideDecorationsForTest() {
  11. #if defined(USE_OZONE)
  12. if (auto* platform_utils = OzonePlatform::GetInstance()->GetPlatformUtils()) {
  13. disabled_csd_ = platform_utils->DisableClientSideDecorationsForTest();
  14. }
  15. #endif
  16. }
  17. ScopedDisableClientSideDecorationsForTest::
  18. ~ScopedDisableClientSideDecorationsForTest() = default;
  19. } // namespace ui