lock_screen_action_background_controller_impl_test_api.h 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. // Copyright 2017 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. #ifndef ASH_LOCK_SCREEN_ACTION_LOCK_SCREEN_ACTION_BACKGROUND_CONTROLLER_IMPL_TEST_API_H_
  5. #define ASH_LOCK_SCREEN_ACTION_LOCK_SCREEN_ACTION_BACKGROUND_CONTROLLER_IMPL_TEST_API_H_
  6. #include "ash/ash_export.h"
  7. #include "ash/lock_screen_action/lock_screen_action_background_controller_impl.h"
  8. namespace views {
  9. class Widget;
  10. }
  11. namespace ash {
  12. class LockScreenActionBackgroundControllerImpl;
  13. class LockScreenActionBackgroundView;
  14. // Class that provides access to LockScreenActionBackgroundControllerImpl
  15. // implementation details in tests.
  16. class ASH_EXPORT LockScreenActionBackgroundControllerImplTestApi {
  17. public:
  18. explicit LockScreenActionBackgroundControllerImplTestApi(
  19. LockScreenActionBackgroundControllerImpl* controller)
  20. : controller_(controller) {}
  21. LockScreenActionBackgroundControllerImplTestApi(
  22. const LockScreenActionBackgroundControllerImplTestApi&) = delete;
  23. LockScreenActionBackgroundControllerImplTestApi& operator=(
  24. const LockScreenActionBackgroundControllerImplTestApi&) = delete;
  25. ~LockScreenActionBackgroundControllerImplTestApi() = default;
  26. views::Widget* GetWidget() { return controller_->background_widget_; }
  27. LockScreenActionBackgroundView* GetContentsView() {
  28. return controller_->contents_view_;
  29. }
  30. private:
  31. LockScreenActionBackgroundControllerImpl* controller_;
  32. };
  33. } // namespace ash
  34. #endif // ASH_LOCK_SCREEN_ACTION_LOCK_SCREEN_ACTION_BACKGROUND_CONTROLLER_IMPL_TEST_API_H_