window_stacking_client.h 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. // Copyright (c) 2013 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 UI_AURA_CLIENT_WINDOW_STACKING_CLIENT_H_
  5. #define UI_AURA_CLIENT_WINDOW_STACKING_CLIENT_H_
  6. #include "ui/aura/aura_export.h"
  7. #include "ui/aura/window.h"
  8. namespace aura {
  9. namespace client {
  10. class AURA_EXPORT WindowStackingClient {
  11. public:
  12. // Invoked from the various Window stacking functions. Allows the
  13. // WindowStackingClient to alter the source, target and/or direction to stack.
  14. // Returns true if stacking should continue; false if the stacking should not
  15. // happen.
  16. virtual bool AdjustStacking(Window** child,
  17. Window** target,
  18. Window::StackDirection* direction) = 0;
  19. protected:
  20. virtual ~WindowStackingClient() {}
  21. };
  22. // Sets/gets the WindowStackingClient. This does *not* take ownership of
  23. // |client|. It is assumed the caller will invoke SetWindowStackingClient(NULL)
  24. // before deleting |client|.
  25. AURA_EXPORT void SetWindowStackingClient(WindowStackingClient* client);
  26. AURA_EXPORT WindowStackingClient* GetWindowStackingClient();
  27. } // namespace client
  28. } // namespace aura
  29. #endif // UI_AURA_CLIENT_WINDOW_STACKING_CLIENT_H_