split_view_observer.h 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. // Copyright 2019 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_WM_SPLITVIEW_SPLIT_VIEW_OBSERVER_H_
  5. #define ASH_WM_SPLITVIEW_SPLIT_VIEW_OBSERVER_H_
  6. #include "ash/ash_export.h"
  7. #include "ash/wm/splitview/split_view_controller.h"
  8. namespace ash {
  9. class ASH_EXPORT SplitViewObserver {
  10. public:
  11. // Called when split view state changed from |previous_state| to |state|.
  12. virtual void OnSplitViewStateChanged(
  13. SplitViewController::State previous_state,
  14. SplitViewController::State state) {}
  15. // Called when split view divider's position has changed.
  16. virtual void OnSplitViewDividerPositionChanged() {}
  17. // Called when a snapped window in split view finished resizing.
  18. virtual void OnSplitViewWindowResized() {}
  19. // Called when the user double taps the split view divider to swap the
  20. // windows in split view.
  21. virtual void OnSplitViewWindowSwapped() {}
  22. protected:
  23. SplitViewObserver() = default;
  24. virtual ~SplitViewObserver() = default;
  25. };
  26. } // namespace ash
  27. #endif // ASH_WM_SPLITVIEW_SPLIT_VIEW_OBSERVER_H_